Python Data Visualization Cookbook - Second Edition
eBook - ePub

Python Data Visualization Cookbook - Second Edition

  1. 302 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Python Data Visualization Cookbook - Second Edition

About this book

Over 70 recipes to get you started with popular Python libraries based on the principal concepts of data visualizationAbout This Book• Learn how to set up an optimal Python environment for data visualization• Understand how to import, clean and organize your data• Determine different approaches to data visualization and how to choose the most appropriate for your needsWho This Book Is ForIf you already know about Python programming and want to understand data, data formats, data visualization, and how to use Python to visualize data then this book is for you.What You Will Learn• Introduce yourself to the essential tooling to set up your working environment• Explore your data using the capabilities of standard Python Data Library and Panda Library• Draw your first chart and customize it• Use the most popular data visualization Python libraries• Make 3D visualizations mainly using mplot3d• Create charts with images and maps• Understand the most appropriate charts to describe your data• Know the matplotlib hidden gems• Use plot.ly to share your visualization onlineIn DetailPython 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 will 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 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. Initially it uses simple plots and charts to more advanced ones, to make it easy to understand for readers. As the readers will go through the book, they will get to know about the 3D diagrams and animations. Maps are irreplaceable for displaying geo-spatial data, so this book will also show how to build them. In the last chapter, it includes explanation on how to incorporate matplotlib into different environments, such as a writing system, LaTeX, or how to create Gantt charts using Python.Style and approachA step-by-step recipe based approach to data visualization. The topics are explained sequentially as cookbook recipes consisting of a code snippet and the resulting visualization.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Python Data Visualization Cookbook - Second Edition by Igor Milovanovic, Dimitry Foures, Giuseppe Vettigli, Dimitry Foures, Giuseppe Vettigli in PDF and/or ePUB format, as well as other popular books in Computer Science & Data Processing. We have over one million books available in our catalogue for you to explore.

Information

Python Data Visualization Cookbook Second Edition


Table of Contents

Python Data Visualization Cookbook Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Preparing Your Working Environment
Introduction
Installing matplotlib, NumPy, and SciPy
Getting ready
How to do it...
How it works...
There's more...
Installing virtualenv and virtualenvwrapper
Getting ready
How to do it...
Installing matplotlib on Mac OS X
Getting ready
How to do it...
Installing matplotlib on Windows
Getting ready
How to do it...
There's more...
Installing Python Imaging Library (PIL) for image processing
How to do it...
How it works...
There's more...
Installing a requests module
How to do it...
How it works...
Customizing matplotlib's parameters in code
Getting ready
How to do it...
How it works…
Customizing matplotlib's parameters per project
Getting ready
How to do it...
How it works...
There's more...
2. Knowing Your Data
Introduction
Importing data from CSV
Getting ready
How to do it...
How it works...
There's more...
Importing data from Microsoft Excel files
Getting ready
How to do it...
How it works...
There's more...
Importing data from fixed-width data files
Getting ready
How to do it...
How it works...
Importing data from tab-delimited files
Getting ready
How to do it...
How it works...
There's more...
Importing data from a JSON resource
Getting ready
How to do it...
How it works...
There's more...
Exporting data to JSON, CSV, and Excel
Getting ready
How to do it...
How it works...
There's more...
Importing and manipulating data with Pandas
Getting ready
How to do it...
How it works...
There's more...
Importing data from a database
Getting ready
How to do it...
How it works...
There's more...
Cleaning up data from outliers
Getting ready
How to do it...
There's more...
Reading files in chunks
How to do it...
How it works...
There's more...
Reading streaming data sources
How to do it...
How it works...
There's more...
Importing image data into NumPy arrays
Getting ready
How to do it...
How it works...
There's more...
Generating controlled random datasets
Getting ready
How to do it...
Smoothing the noise in real-world data
Getting ready
How to do it...
How it works...
There's more...
3. Drawing Your First Plots and Customizing Them
Introduction
Defining plot types – bar, line, and stacked charts
Getting ready
How to do it...
How it works...
There's more...
Drawing simple sine and cosine plots
Getting ready
How to do it...
Defining axis lengths and limits
Getting ready
How to do it...
How it works...
There's more...
Defining plot line styles, properties, and format strings
Getting ready
How to do it...
How it works...
Color
Background color
Setting ticks, labels, and grids
Getting ready
How to do it...
Adding legends and annotations
Getting ready
How to do it...
How it works...
Moving spines to the center
How to do it...
How it works...
There's more...
Making histograms
Getting ready
How to do it...
How it works...
Making bar charts with error bars
Getting ready
How to do it...
How it works...
There's more...
Making pie charts count
Getting ready
How to do it...
Plotting with filled areas
Getting ready
How to do it...
How it works...
There's more...
Making stacked plots
Getting ready
How to do it...
How it works...
Drawing scatter plots with colored markers
Getting ready
How to do it...
How it works...
4. More Plots and Customizations
Introduction
Setting the transparency and size of axis labels
Getting ready
How to do it...
How it works...
There's more...
Adding a shadow to the chart line
Getting ready
How to do it...
How it works...
There's more...
Adding a data table to the figure
Getting ready
How to do it...
How it works...
There's more...
Using subplots
Getting ready
How to do it...
How it works...
There's more...
Customizing grids
Getting ready
How to do it...
How it works...
Creating contour plots
Getting ready
How to do it...
How it works...
Filling an under-plot area
Getting ready
How to do it...
How it works...
Drawing polar plots
Getting ready
How to do it...
How it works...
Visualizing the filesystem tree using a polar bar
Getting ready
How to do it...
How it works...
Customizing matplotlib with style
Getting ready
How to do it...
How it works...
5. Making 3D Visualizations
Introduction
Creating 3D bars
Getting ready
How to do it...
How it works...
There's more...
Creating 3D histograms
Getting ready
How to do it...
How it works...
Animating in matplotlib
Getting ready
How to do it...
How it works...
There's more...
Animating with OpenGL
Getting ready
How to do it...
How it works...
There's more...
6. Plotting Charts with Image...

Table of contents

  1. Python Data Visualization Cookbook Second Edition