Today, I found a great Python drawing tool library on the web. Very simple API calls can produce beautiful diagrams. And you can have some interaction.
Pyecharts is a library for generating Echarts diagrams. Echarts is an open source DATA visualization JS library of Baidu. The visualizations generated with Echarts are great. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah…
Install it before using: the install command is very simple: Pip can install:
PIP install Pyecharts PIP install Pyecharts
The official documentation and demo are very detailed. Check it out.
Here are a few simple examples to illustrate the visualization of data.
1: Generate a bar chart:
This will generate an HTML file in your current folder. Open it and you’ll see the image you want:
One and two positions on the page are interactive. You can download it and save it as a picture.
This is explained in detail in the official documentation. Set is_more_utils to True in your add() and you’ll see more useful buttons:
I can help you turn it into a line chart.
For ease of use you can use Jupyter Notebook to display diagrams directly, which Matplotlib has, and Pyecharts will have. For details about other features, see the official documentation.
2: Generate a pie chart:
Generate as follows:
This is also interactive:
For example: We click on pants and heels to remove them:
3: Generate a funnel diagram:
The resulting funnel plot is also interactive:
Remove pants:
4: Generate a dashboard:
5: Generate a map:
Support rendering maps according to data:
Maps require a number of plugins, which PIP can do:
An example from the official website:
What is useful here is the air quality of major cities in China, which can be customized to its own data: for example, annual precipitation and other scenes that need to be displayed geographically.
It can also be displayed separately for each province:
6: Generate a water balloon diagram:
A few simple lines of code:
7: Generate a radar map:
This results in the graph we see after a MOBA game:
Is that familiar?
8: Generate a word cloud:
Word clouds are often seen:
It can also generate:
This creates a beautiful word cloud:
If you do meet a good coworker, you’ll be lucky. Come on! Q Group :766610200 Includes Python, PythonWeb, crawler, data analysis and other Python skills, as well as artificial intelligence, big data, data mining, automation and other learning methods. Build from zero to the project development hands-on combat all-round analysis!
Click: Join