This exercise is entirely freeform. Get into groups of 3-4 people (if available!) and start building a dashboard, with everything you have learned in this tutorial. By the end of the exercise you should have a dashboard that:
.interactive
methodpanel serve Advanced_Dashboarding.ipynb
in the exercise directoryimport colorcet as cc # noqa
import holoviews as hv # noqa
import numpy as np # noqa
import pandas as pd
import panel as pn
import xarray as xr
import hvplot.pandas # noqa: API import
import hvplot.xarray # noqa: API import
pn.extension()
As a starting point we will load the data; everything else is up to you:
%%time
df = pd.read_parquet('../../data/earthquakes-projected.parq')
df.time = df.time.astype('datetime64[ns]')
df = df.set_index(df.time)
ds = xr.open_dataarray('../../data/raster/gpw_v4_population_density_rev11_2010_2pt5_min.nc')
cleaned_ds = ds.where(ds.values != ds.nodatavals).sel(band=1)
cleaned_ds.name = 'population'
You don't really know what to build? Here are some ideas:
RangeSlider
or time using a DateRangeSlider
) and then datashades it