Programming with Ai Wenwen "Zero-Basic Data Learning Python" (02) pyecharts data visualization

Author: Ai Wen, a master's degree in computer science, an in-house training lecturer and a gold medal interviewer, a senior algorithm expert in the company, is now working in a BAT first-tier factory.
E-mail: [email protected]
Content: Program with Ai Wenxue "Zero-Basic Data Learning Python"

Learning Content

Learning pyecharts, we can start learning through these conveniences

Pyecharts introduction and installation

Introduction to pyecharts

ECharts, an open source visualization library implemented using JavaScript, can run smoothly on PCs and mobile devices, and is compatible with most current browsers (IE8/9/10/11, Chrome, Firefox, Safari, etc.), with light underlying dependencies ZRender, an advanced vector graphics library, provides intuitive, interactive and highly customizable data visualization charts.

  1. Echarts Baidu open source visualization tool

http://echarts.baidu.com

  1. pyecharts: The domestic gods implement Python to call the echarts library

pyecharts features

  • Simple API design, smooth as silk, supports chain calls
  • Includes 30+ common charts, everything you need
  • Support mainstream Notebook environment, Jupyter Notebook and JupyterLab
  • Can be easily integrated into mainstream web frameworks such as Flask and Django
  • Highly flexible configuration items, easy to match beautiful charts
  • Detailed documentation and examples to help developers get started with projects faster
  • Up to 400+ map files and native Baidu maps provide strong support for geographic data visualization

pyecharts installation

Interactive visualization library of pyecharts-python - Programmer Sought

1. Anaconda imports pyecharts library

  • Official website download pyecharts

pyecharts · PyPI

  • Put the file in the anaconda pkgs folder
  • Just enter pip install pyecharts-1.9.1-py3-none-any.whl

  • Check if the installation is successful

2. Install the map file (learning pyecharts is not necessary to install)

If you need to draw geographic map related content, you need to install the following content together:

Global country map: echarts-countries-pypkg

China provincial map: echarts-china-provinces-pypkg

China city-level map: echarts-china-cities-pypkg

pip install echarts-countries-pypkg

pip install echarts-china-provinces-pypkg

pip install echarts-china-cities-pypkg

Use release notes:

  1. Python version: 3.x
  2. pyecharts: 1.x

pyecharts Line line chart

Provide tired TooltipOpts in pyecharts

trigger Trigger type. Optional:

item: data item graphics trigger, mainly used for scatter charts, pie charts

axis: coordinate axis trigger, mainly used in bar chart, line chart none: do nothing

pyecharts Bar histogram

pyecharts Pie pie chart

pyecharts Scatter

pyecharts WordCloud word cloud

pyecharts Geo geographic map

More comprehensive cases

1d6e8b02dba44b6624ae0ac27ae5110f.png

There are many related codes, so I won’t share them here. If you need them, please pay attention to private messages.

Let's refuel to learn Python programming.

Guess you like

Origin blog.csdn.net/shenfuli/article/details/127977873