Week 14B: Dashboarding with Panel and the Holoviz Ecosystem

December 8, 2020

Last class!

Final project details: https://github.com/MUSA-550-Fall-2020/final-project

Office Hours Next Week

I'll hold office hours next week during the regular class slots:

Details

Today: Panel

Two example apps

We'll walk through two examples that can serve as reference/templates for the final project:

  1. Visualizing recent shootings in Philadelphia using Altair, Folium, and Holoviews
  2. Visualizing NYC taxi trips with Datashader and Altair

PyData talk in Dec 2019 from the creator of Panel:

https://www.youtube.com/watch?v=Ohr29FJjBi0

But first: an introduction to Python classes

Let's take a quick look at this nice tutorial

Back to Panel...

Dashboard apps in Panel

We'll define our app in a declarative fashion using a custom Python class that defines the various components of our dashboard, which include:

Similar workflow to Dash

This is a reactive workflow.

Panel key concepts

  1. Panes
    • A Pane wraps external viewable items like Bokeh, Plotly, Vega/Altair, or HoloViews plots, so they can be embedded in a dashboard. When the wrapped object or any parameter changes, a pane will update the view accordingly.
  2. Parameters
    • A wrapper for the values the user selects, which determines which Panes get updated and which data is shown in the dashboard
  3. Panels
    • Layout objects allow combining plots into a Row, Column, Tabs or a Grid.

Overall, the concepts are similar to Dash: a layout piece and a reactive parameter/callback piece

Default Templates

See more: https://panel.holoviz.org/user_guide/Templates.html

The Param library

Great examples on their documentation

I'd encourage you to spend some time reading through their documentation...

Two example repositories on the course's Github

Example 1: Philadelphia shootings

Tools: Panel, Hvplot/Holoviews, Altair, Folium

https://github.com/MUSA-550-Fall-2020/philadelphia-shootings-app

Example 2: NYC Taxi Trips

Tools: Panel, Hvplot/Holoviews, Altair, Datashader

https://github.com/MUSA-550-Fall-2020/datashader-nyc-taxi-app

Web-based visualization options for the final project

See notes in this week's repository: https://github.com/MUSA-550-Fall-2020/week-14/blob/master/WebVisualizationOptions.md

Deployment Options

See notes in this week's repository: https://github.com/MUSA-550-Fall-2020/week-14/blob/master/DeploymentOptions.md

That's it!

Reminder: Office hours next week

Details

Thank you for a great semester!!