Essentials for data analysis: The best visualization tools in Python

Author: Lty Beautiful Life 

https://blog.csdn.net/weixin_44208569

This time I share 10 Python data visualization libraries suitable for multiple disciplines, some of which are well-known and some are little-known!

1、matplotlib

4f4f99aaa165a3422353f03980b1a457.png

Two histograms

matplotlib is the dean of Python visualization libraries. After more than ten years, it is still the most commonly used drawing library for Python users. Its design is very close to MATLAB, a commercial programming language designed in the 1980s.

Since matplotlib is the first Python visualization library, many other libraries are built on top of it or call it directly.

For example, pandas and Seaborn are outsourcing of matplotlib, which allow you to call matplotlib methods with less code.

Although matplotlib can easily get general information about the data, it is not so easy to make charts for publication more quickly and easily.

As Chris Moffitt mentioned in "Introduction to Python Visualization Tools": "It is very powerful and very complex."

The default plotting style of matplotlib, which has a strong 1990s flavor, has been complained about for many years. The upcoming release of matplotlib 2.0 is said to include many more fashionable styles.

Developer: John D. Hunter

More information: http://matplotlib.org/

2. Seaborn

715506ca7ec43a84592b4dc10e8e072d.png

Violin plot (Michael Waskom)

Seaborn uses matplotlib to create beautiful charts with concise code.

The biggest difference between Seaborn and matplotlib is that its default drawing style and color matching have a modern aesthetic.

Since Seaborn is built on matplotlib, you need to understand matplotlib to adjust Seaborn's default parameters.

Developer: Michael Waskom

More information: http://seaborn.pydata.org/index.html

3、ggplot

b18544ba82ab527107f8bc135e3ef283.png

Small multiples (ŷhat)

ggplot is a graphics package based on R, ggplot2, and uses concepts from "The Grammar of Graphics".

The difference between ggplot and matplotlib is that it allows you to overlay different layers to complete a picture. For example you can start with the axis, then add points, add lines, trend lines, etc.

Although "Image Grammar" has been praised for its drawing method that is "close to the thinking process", users who are accustomed to matplotlib may need some time to adapt to this new way of thinking.

The author of ggplot mentioned that ggplot is not suitable for making very personalized images. It sacrifices image complexity for operational simplicity.

ggplot is tightly integrated with pandas, so it’s best to store your data in a DataFrame when using ggplot.

ggplot is very well integrated with pandas, so when you use it, it is best to read your data into a DataFrame.

Developer: ŷhat

More information: http://ggplot.yhathq.com/

4、Bokeh

b461566ce28f63fc99a8b74036696127.png

Interactive weather statistics for three cities (Continuum Analytics)

Like ggplot, Bokeh is also based on the concept of "Grammar of Graphics".

But unlike ggplot, it is completely based on Python and not referenced from R.

Its strength is that it can be used to create interactive diagrams that can be used directly on the web. Charts can be output as JSON objects, HTML documents or interactive web applications.

Boken also supports data streaming and real-time data. Bokeh offers three levels of control for different users.

The highest level of control is used for quick graphing, primarily for producing common images such as histograms, box plots, and histograms.

The medium level of control allows you to control basic elements of the image (such as points in a distribution plot) just like matplotlib.

The lowest level of control is primarily intended for developers and software engineers.

It has no default value, you have to define each element of the chart.

Developer: Continuum Analytics

More information: https://docs.bokeh.org/en/latest/

5、pygal

0ac9365a8c5a868f7bda5c490b980f7f.png

Box plot (Florian Mounier)

pygal, like Bokeh and Plotly, provides interactive graphics that can be embedded directly into the web browser.

The main difference from the other two is that it can output charts into SVG format.

If your data size is relatively small, SVG will suffice. But if you have hundreds or thousands of data points, the SVG rendering process will become very slow.

Since all charts are encapsulated into methods and the default styles are beautiful, you can easily create beautiful charts with just a few lines of code.

Developer: Florian Mounier

More information: http://www.pygal.org/en/latest/index.html

6、Plotly

c7ebe416d78f29c5daa8ecdf27ca161c.png

Line plot (Plotly)

You may have heard of the online graphing tool Plotly, but did you know you can use it with Python?

Plotly, like Bokeh, is dedicated to the production of interactive charts, but it provides several chart types that are hard to find in other libraries, such as contour plots, tree plots, and three-dimensional charts.

Developer: Plotly

More information: https://plotly.com/python/

7、geoplotlib

e3834576350f4ca289b278f564ef490c.png

Choropleth (Andrea Cuttone)

geoplotlib is a toolbox for making maps and geography-related data.

You can use it to create a variety of maps, such as choropleth maps, heat maps, and point density maps.

You must install Pyglet (an object-oriented programming interface) to use geoplotlib. However, since most Python visualization tools do not provide maps, it is quite convenient to have a tool dedicated to drawing maps.

Developer: Andrea Cuttone

More information: https://github.com/andrea-cuttone/geoplotlib

8、Gleam

6e253013d928b3967b6a91160469a73d.png

Scatter plot with trend line (David Robinson)

Gleam borrows inspiration from Shiny in R. It allows you to turn your analysis into an interactive web application using only Python programs. You don't need to know HTML CSS or JavaScript.

Gleam can use any Python visualization library.

When you create a chart, you can add a field to it so that users can sort and filter the data.

Developer: David Robinson
More information: https://github.com/dgrtwo/gleam

9、missingno

9ae381b23ed03e67e416e2411e88b0f9.png

Nullity matrix (Aleksey Bilogur) 

Missing data is a permanent pain.

missingno uses images to quickly assess the situation of missing data, instead of wading through the data table.

You can sort or filter data based on its completeness, or consider corrections based on heat maps or treemaps.

Developer: Aleksey Bilogur

More information: https://github.com/ResidentMario/missingno

10、Leather

e18e72eca32d6d75e2c0bb308bee39aa.png

Chart grid with consistent scales (Christopher Groskopf)

The best definition of Leather comes from its author, Christopher Groskopf.

"Leather is for people who need a chart now and don't care if the chart is perfect."

It works with all data types and generates SVG images so you don't lose image quality when you resize the image.

 
  

Donate books

内容简介
《Python数据分析与入门实战》*3 本书从数据分析的基本概念和Python的基础语法讲起,
然后逐步深入到Python数据分析的编程技术方面,
并结合实战重点讲解了如何使用主流Python数据分析库进行数据分析,
让读者快速掌握Python的编程基础知识,并对Python数据分析有更加深入的理解。
本书分为13章,涵盖的主要内容有数据分析概述、Python的特点和编程基础、
NumPy数组的基础和进阶用法、Pandas数据处理和数据分析、数据的导入导出、
数据可视化,以及Python网络爬虫和Scikit-learn机器学习的入门知识。

Gift rules: Give away through comments, likes and lucky draws.

1. Leave a message at the end of the article + share with your circle of friends: give away three copies by leaving a message and liking it ! ! The two friends with the most likes will each receive 1 copy

Additional rules: Those who have won the prize in the past month will no longer be given a book this time, and others will also be given a chance to win!

Lottery draw time: 16:00, August 18 (Friday)

Note: Winners please add their WeChat account within 24 hours. Winning after the expiration date will be invalid.

80276dfdd43f8c0072934db16153d647.jpeg

Guess you like

Origin blog.csdn.net/spider_py/article/details/132353295