Plotting#

In this exercise we will try making some of our own visualizations using hvplot.

Loading the data#

We will be building a new visualization based on the same data we have cleaned and filtered in the rest of the tutorial. First we load the earthquakes DataFrame and filter to those with >=7 magnitude:

import pathlib
import pandas as pd 
import xarray as xr

import hvplot.pandas # noqa: adds hvplot method to pandas objects
import hvplot.xarray # noqa: adds hvplot method to xarray objects

df = pd.read_parquet(pathlib.Path('../../data/earthquakes-projected.parq'))
df = df.set_index(df.time)
most_severe = df[df.mag >= 7]