01 Workflow Introduction ¶
Revealing your data (nearly) effortlessly,
at every step in your workflow
Workflow from data to decision ¶
If there's no visualization at any of these stages, you're flying blind.
But visualization is often skipped as too hard to construct, particularly for big data.
What if it were simple to visualize anything, anywhere?
Lots of choices!
Too hard to
try them all,
learn them all, or
get them to work together.
Supported by Anaconda, Inc.
Exploring Pandas Dataframes ¶
If your data is in a Pandas dataframe, it's natural to explore it using the
method (based on Matplotlib). Let's look at a
dataset of the number of cases of measles and pertussis
(per 100,000 people) over time in each state:
import pandas as pd df = pd.read_csv('../data/diseases.csv.gz') df.head()
won't give anything meaningful, because it doesn't know what should be plotted against what:
%matplotlib inline df.plot();
But with some Pandas operations we can pull out parts of the data that make sense to plot:
import numpy as np by_year = df[["Year","measles"]].groupby("Year").aggregate(np.sum) by_year.plot();
Here it is easy to see that the 1963 introduction of a measles vaccine brought the cases down to negligible levels.
The above plots are just static images, but if you import the
package, you can use the same plotting API to get fully interactive plots with hover, pan, and zoom in a web browser:
import hvplot.pandas by_year.hvplot()