Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Interactive Data Visualization with Python

You're reading from   Interactive Data Visualization with Python Present your data as an effective and compelling story

Arrow left icon
Product type Paperback
Published in Apr 2020
Publisher
ISBN-13 9781800200944
Length 362 pages
Edition 2nd Edition
Languages
Arrow right icon
Authors (4):
Arrow left icon
Shubhangi Hora Shubhangi Hora
Author Profile Icon Shubhangi Hora
Shubhangi Hora
Abha Belorkar Abha Belorkar
Author Profile Icon Abha Belorkar
Abha Belorkar
Anshu Kumar Anshu Kumar
Author Profile Icon Anshu Kumar
Anshu Kumar
Sharath Chandra Guntuku Sharath Chandra Guntuku
Author Profile Icon Sharath Chandra Guntuku
Sharath Chandra Guntuku
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Introduction to Visualization with Python – Basic and Customized Plotting 2. Static Visualization – Global Patterns and Summary Statistics FREE CHAPTER 3. From Static to Interactive Visualization 4. Interactive Visualization of Data across Strata 5. Interactive Visualization of Data across Time 6. Interactive Visualization of Geographical Data 7. Avoiding Common Pitfalls to Create Interactive Visualizations Appendix

Interactive Scatter Plots

As you know by now, scatter plots are one of the most essential types of plots for presenting global patterns within a dataset. Naturally, it is important to know how to introduce interactivity in these plots. We will first look at the zoom and reset actions on plots. Before that, though, let's have a look at the dataset.

We can view the HPI dataset using the following code:

import pandas as pd
#Download the data from Github repo 
hpi_url = "https://raw.githubusercontent.com/TrainingByPackt/Interactive-Data-Visualization-with-Python/master/datasets/hpi_data_countries.tsv"
# Once downloaded, read it into a DataFrame using pandas
hpi_df = pd.read_csv(hpi_url, sep='\t')
hpi_df.head()

The output is as follows:

Figure 4.1: HPI dataset

Note that there are 5 numerical/quantitative features in this dataset: Life Expectancy (years), Wellbeing (0-10), Inequality of outcomes, Ecological Footprint...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime