Book description
Create your own clear and impactful interactive data visualizations with the powerful data visualization libraries of Python
Key Features
- Study and use Python interactive libraries, such as Bokeh and Plotly
- Explore different visualization principles and understand when to use which one
- Create interactive data visualizations with real-world data
Book Description
With so much data being continuously generated, developers, who can present data as impactful and interesting visualizations, are always in demand. Interactive Data Visualization with Python sharpens your data exploration skills, tells you everything there is to know about interactive data visualization in Python.
You'll begin by learning how to draw various plots with Matplotlib and Seaborn, the non-interactive data visualization libraries. You'll study different types of visualizations, compare them, and find out how to select a particular type of visualization to suit your requirements. After you get a hang of the various non-interactive visualization libraries, you'll learn the principles of intuitive and persuasive data visualization, and use Bokeh and Plotly to transform your visuals into strong stories. You'll also gain insight into how interactive data and model visualization can optimize the performance of a regression model.
By the end of the course, you'll have a new skill set that'll make you the go-to person for transforming data visualizations into engaging and interesting stories.
What you will learn
- Explore and apply different interactive data visualization techniques
- Manipulate plotting parameters and styles to create appealing plots
- Customize data visualization for different audiences
- Design data visualizations using interactive libraries
- Use Matplotlib, Seaborn, Altair and Bokeh for drawing appealing plots
- Customize data visualization for different scenarios
Who this book is for
This book intends to provide a solid training ground for Python developers, data analysts and data scientists to enable them to present critical data insights in a way that best captures the user's attention and imagination. It serves as a simple step-by-step guide that demonstrates the different types and components of visualization, the principles, and techniques of effective interactivity, as well as common pitfalls to avoid when creating interactive data visualizations. Students should have an intermediate level of competency in writing Python code, as well as some familiarity with using libraries such as pandas.
Table of contents
- Preface
-
1. Introduction to Visualization with Python – Basic and Customized Plotting
- Introduction
-
Handling Data with pandas DataFrame
- Reading Data from Files
- Exercise 1: Reading Data from Files
- Observing and Describing Data
- Exercise 2: Observing and Describing Data
- Selecting Columns from a DataFrame
- Adding New Columns to a DataFrame
- Exercise 3: Adding New Columns to the DataFrame
- Applying Functions on DataFrame Columns
- Exercise 4: Applying Functions on DataFrame columns
- Exercise 5: Applying Functions on Multiple Columns
- Deleting Columns from a DataFrame
- Exercise 6: Deleting Columns from a DataFrame
- Writing a DataFrame to a File
- Exercise 7: Writing a DataFrame to a File
- Plotting with pandas and seaborn
- Tweaking Plot Parameters
- Summary
-
2. Static Visualization – Global Patterns and Summary Statistics
- Introduction
-
Creating Plots that Present Global Patterns in Data
- Scatter Plots
- Exercise 13: Creating a Static Scatter Plot
- Hexagonal Binning Plots
- Exercise 14: Creating a Static Hexagonal Binning Plot
- Contour Plots
- Exercise 15: Creating a Static Contour Plot
- Line Plots
- Exercise 16: Creating a Static Line Plot
- Exercise 17: Presenting Data across Time with multiple Line Plots
- Heatmaps
- Exercise 18: Creating and Exploring a Static Heatmap
- The Concept of Linkage in Heatmaps
- Exercise 19: Creating Linkage in Static Heatmaps
- Creating Plots That Present Summary Statistics of Your Data
- Summary
-
3. From Static to Interactive Visualization
- Introduction
- Static versus Interactive Visualization
- Applications of Interactive Data Visualizations
-
Getting Started with Interactive Data Visualizations
- Interactive Data Visualization with Bokeh
- Exercise 22: Preparing Our Dataset
- Exercise 23: Creating the Base Static Plot for an Interactive Data Visualization
- Exercise 24: Adding a Slider to the Static Plot
- Exercise 25: Adding a Hover Tool
- Interactive Data Visualization with Plotly Express
- Exercise 26: Creating an Interactive Scatter Plot
- Activity 3: Creating Different Interactive Visualizations Using Plotly Express
- Summary
-
4. Interactive Visualization of Data across Strata
- Introduction
-
Interactive Scatter Plots
- Exercise 27: Adding Zoom-In and Zoom-Out to a Static Scatter Plot
- Exercise 28: Adding Hover and Tooltip Functionality to a Scatter Plot
- Exercise 29: Exploring Select and Highlight Functionality on a Scatter Plot
- Exercise 30: Generating a Plot with Selection, Zoom, and Hover/Tooltip Functions
- Selection across Multiple Plots
- Exercise 31: Selection across Multiple Plots
- Selection Based on the Values of a Feature
- Exercise 32: Selection Based on the Values of a Feature
-
Other Interactive Plots in altair
- Exercise 33: Adding a Zoom-In and Zoom-Out Feature and Calculating the Mean on a Static Bar Plot
- Exercise 34: An Alternative Shortcut for Representing the Mean on a Bar Plot
- Exercise 35: Adding a Zoom Feature on a Static Heatmap
- Exercise 36: Creating a Bar Plot and a Heatmap Next to Each Other
- Exercise 37: Dynamically Linking a Bar Plot and a Heatmap
- Activity 4: Generate a Bar Plot and a Heatmap to Represent Content Rating Types in the Google Play Store Apps Dataset
- Summary
-
5. Interactive Visualization of Data across Time
- Introduction
- Temporal Data
- Types of Temporal Data
- Understanding the Relation between Temporal Data and Time‑Series Data
- Examples of Domains That Use Temporal Data
- Visualization of Temporal Data
- Choosing the Right Aggregation Level for Temporal Data
- Resampling in Temporal Data
-
Interactive Temporal Visualization
- Bokeh Basics
- Advantages of Using Bokeh
- Exercise 42: Adding Interactivity to Static Line Plots Using Bokeh
- Exercise 43: Changing the Line Color and Width on a Line Plot
- Exercise 44: Adding Box Annotations to Find Anomalies in a Dataset
- Interactivity in Bokeh
- Activity 5: Create an Interactive Temporal Visualization
- Summary
-
6. Interactive Visualization of Geographical Data
- Introduction
- Choropleth Maps
-
Plots on Geographical Maps
- Scatter Plots
- Exercise 49: Creating a Scatter Plot on a Geographical Map
- Bubble Plots
- Exercise 50: Creating a Bubble Plot on a Geographical Map
- Line Plots on Geographical Maps
- Exercise 51: Creating Line Plots on a Geographical Map
- Activity 6: Creating a Choropleth Map to Represent Total Renewable Energy Production and Consumption across the World
- Summary
-
7. Avoiding Common Pitfalls to Create Interactive Visualizations
- Introduction
-
Data Formatting and Interpretation
- Avoiding Common Pitfalls while Dealing with Dirty Data
- Outliers
- Exercise 52: Visualizing Outliers in a Dataset with a Box Plot
- Exercise 53: Dealing with Outliers
- Missing Data
- Exercise 54: Dealing with Missing Values
- Duplicate Instances and/or Features
- Bad Feature Selection
- Activity 7: Determining Which Features to Visualize on a Scatter Plot
- Data Visualization
- Cheat Sheet for the Visualization Process
- Summary
-
Appendix
- 1. Introduction to Visualization with Python – Basic and Customized Plotting
- 2. Static Visualization – Global Patterns and Summary Statistics
- 3. From Static to Interactive Visualization
- 4. Interactive Visualization of Data across Strata
- 5. Interactive Visualization of Data across Time
- 6. Interactive Visualizations of Data across Geographical Regions
- 7. Avoiding Common Pitfalls to Create Interactive Visualizations
Product information
- Title: Interactive Data Visualization with Python - Second Edition
- Author(s):
- Release date: April 2020
- Publisher(s): Packt Publishing
- ISBN: 9781800200944
You might also like
book
Practical Python Data Visualization: A Fast Track Approach To Learning Data Visualization With Python
Quickly start programming with Python 3 for data visualization with this step-by-step, detailed guide. This book’s …
book
Data Visualization with Python and JavaScript, 2nd Edition
How do you turn raw, unprocessed, or malformed data into dynamic, interactive web visualizations? In this …
book
Hands-On Exploratory Data Analysis with Python
Discover techniques to summarize the characteristics of your data using PyPlot, NumPy, SciPy, and pandas Key …
book
Python Data Analysis - Third Edition
Understand data analysis pipelines using machine learning algorithms and techniques with this practical guide Key Features …