Over 60 recipes that will enable you to learn how to create attractive visualizations using Python's most popular libraries Overview Learn how to set up an optimal Python environment for data visualization Understand the topics such as importing data for visualization and formatting data for
Python Data Visualization Cookbook
β Scribed by MilovanoviΔ, Igor
- Publisher
- Packt Publishing, Limited
- Year
- 2013
- Tongue
- English
- Leaves
- 280
- Edition
- New edition
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Over 60 recipes that will enable you to learn how to create attractive visualizations using Python's most popular libraries
Overview
Learn how to set up an optimal Python environment for data visualization
Understand the topics such as importing data for visualization and formatting data for visualization
Understand the underlying data and how to use the right visualizations
In Detail
Today, data visualization is a hot topic as a direct result of the vast amount of data created every second. Transforming that data into information is a complex task for data visualization professionals, who, at the same time, try to understand the data and objectively transfer that understanding to others. This book is a set of practical recipes that strive to help the reader get a firm grasp of the area of data visualization using Python and its popular visualization and data libraries.
Python Data Visualization Cookbook will progress the reader from the point of installing and setting up a Python environment for data manipulation and visualization all the way to 3D animations using Python libraries. Readers will benefit from over 60 precise and reproducible recipes that guide the reader towards a better understanding of data concepts and the building blocks for subsequent and sometimes more advanced concepts.
Python Data Visualization Cookbook starts by showing you how to set up matplotlib and the related libraries that are required for most parts of the book, before moving on to discuss some of the lesser-used diagrams and charts such as Gantt Charts or Sankey diagrams. During the book, we go from simple plots and charts to more advanced ones, thoroughly explaining why we used them and how not to use them. As we go through the book, we will also discuss 3D diagrams. We will peep into animations just to show you what it takes to go into that area. Maps are irreplaceable for displaying geo-spatial data, so we also show you how to build them. In the last chapter, we show you how to incorporate matplotlib into different environments, such as a writing system, LaTeX, or how to create Gantt charts using Python.
This book will help those who already know how to program in Python to explore a new field β one of data visualization. As this book is all about recipes that explain how to do something, code samples are abundant, and they are followed by visual diagrams and charts to help you understand the logic and compare your own results with what is explained in the book.
What you will learn from this book
Install and use iPython
Use Python's virtual environments
Install and customize NumPy and matplotlib
Draw common and advanced plots
Visualize data using maps
Create 3D animated data visualizations
Import data from various formats
Export data from various formats
Approach
This book is written in a Cookbook style targeted towards an advanced audience. It covers the advanced topics of data visualization in Python.
β¦ Table of Contents
Cover......Page 1
Copyright......Page 3
Credits......Page 4
About the Author......Page 5
About the Reviewers......Page 6
www.PacktPub.com......Page 8
Table of Contents......Page 10
Preface......Page 14
Introduction......Page 18
Installing matplotlib, NumPy, and SciPy......Page 19
Installing virtualenv and virtualenvwrapper......Page 21
Installing matplotlib on Mac OS X......Page 23
Installing matplotlib on Windows......Page 24
Installing Python Imaging Library (PIL) for image processing......Page 25
Customizing matplotlib's parameters in code......Page 27
Customizing matplotlib's parameters per project......Page 29
Introduction......Page 32
Importing data from CSV......Page 33
Importing data from Microsoft Excel files......Page 35
Importing data from fixed-width data files......Page 38
Importing data from tab-delimited files......Page 40
Importing data from a JSON resource......Page 41
Exporting data to JSON, CSV, and Excel......Page 44
Importing data from a database......Page 49
Cleaning up data from outliers......Page 53
Reading files in chunks......Page 59
Reading streaming data sources......Page 61
Importing image data into NumPy arrays......Page 63
Generating controlled random datasets......Page 69
Smoothing the noise in real-world data......Page 77
Chapter 3: Drawing Your First Plots and Customizing Them......Page 84
Defining plot types β bar, line, and stacked charts......Page 85
Drawing simple sine and cosine plot......Page 91
Defining axis lengths and limits......Page 94
Defining plot line styles, properties, and format strings......Page 97
Setting ticks, labels, and grids......Page 102
Adding legend and annotations......Page 105
Moving spines to the center......Page 108
Making histograms......Page 109
Making bar charts with error bars......Page 112
Making pie charts count......Page 114
Plotting with filled areas......Page 116
Drawing scatter plots with colored markers......Page 118
Introduction......Page 122
Setting the transparency and size of axis labels......Page 123
Adding a shadow to the chart line......Page 126
Adding a data table to the figure......Page 129
Using subplots......Page 131
Customizing grids......Page 134
Creating contour plots......Page 138
Filling an under-plot area......Page 141
Drawing polar plots......Page 144
Visualizing the file system tree using a polar bar......Page 147
Creating 3D bars......Page 152
Creating 3D histograms......Page 156
Animating in matplotlib......Page 159
Animating with OpenGL......Page 163
Introduction......Page 170
Processing images with PIL......Page 171
Plotting with images......Page 177
Displaying image with other plots in the figure......Page 181
Plotting data on a map using Basemap......Page 185
Plotting data on a map using Google Map API......Page 190
Generating CAPTCHA images......Page 196
Introduction......Page 202
Understanding logarithmic plots......Page 203
Understanding spectrograms......Page 206
Creating a stem plot......Page 211
Drawing streamlines of vector flow......Page 214
Using colormaps......Page 218
Using scatter plots and histograms......Page 223
Plotting the cross-correlation between two variables......Page 230
Importance of autocorrelation......Page 233
Drawing barbs......Page 238
Making a box and whisker plot......Page 242
Making Gantt charts......Page 245
Making errorbars......Page 250
Making use of text and font properties......Page 253
Rendering text with LaTeX......Page 259
Understanding the difference between pyplot and OO API......Page 263
Index......Page 270
β¦ Subjects
Reference;Computer Science;Programming;Computers
π SIMILAR VOLUMES
In Detail Today, data visualization is a hot topic as a direct result of the vast amount of data created every second. Transforming that data into information is a complex task for data visualization professionals, who, at the same time, try to understand the data and objectively transfer that under
Today, data visualization is a hot topic as a direct result of the vast amount of data created every second. Transforming that data into information is a complex task for data visualization professionals, who, at the same time, try to understand the data and objectively transfer that understanding t
<p>Over 60 recipes that will enable you to learn how to create attractive visualizations using Python's most popular libraries</p> <p><b>Overview</b></p> <ul> <li>Learn how to set up an optimal Python environment for data visualization</li> <li>Understand the topics such as importing data for visual
<p>Over 60 recipes that will enable you to learn how to create attractive visualizations using Python's most popular libraries</p> <p><b>Overview</b></p> <ul> <li>Learn how to set up an optimal Python environment for data visualization</li> <li>Understand the topics such as importing data for visual
2nd ed. β Packt Publishing, 2015. β 302 p. β ISBN: 1784396699, 9781784396695<div class="bb-sep"></div>Python Data Visualization Cookbook will progress the reader from the point of installing and setting up a Python environment for data manipulation and visualization all the way to 3D animations usin