Skip to main content

Create, deploy, and share dashboards and apps

Analyzing data with visualizations provides insights, and a dashboard stitches these insights into a meaningful story. There are many great open source dashboarding tools out there that you can use to organize and display your data in an engaging and digestible way.

In this tutorial, you'll learn how to create a new dashboard with Panel within Nebari. You'll also learn how to share your newly created dashboard with other users using JHub App Launcher.

important

JHub App Launcher was added in Nebari version 2024.1.1. Until version 2023.7.1, Nebari used CDS Dashboards for dashboard sharing. This page has instructions for both tools. Since, CDS Dashboards is deprecated, the documentation will be removed soon.

Supported frameworks​

This tutorial demonstrates a Panel dashboard built with HoloViews and Bokeh as the backend, but Nebari supports several other frameworks:

JHub App launcher supports Panel, Bokeh, Streamlit, Plotly Dash, Voila, Gradio, JupyterLab, and Any generic Python command.

Create the dashboard​

1. Create environment and notebook​

Create a new environment in conda-store for your work with the libraries needed to run your notebook.

To use JHub Apps, your environment must include jhub-apps and the corresponding dashboard/app creation framework, in addition to other libraries required in the notebook.

Hence, for this tutorial:

- pandas
- panel
- holoviews
- bokeh
- jupyter_bokeh
- jhub-apps

Launch JupyterLab in Nebari, create a new Jupyter Notebook with a meaningful name (such as panel-trees-dashboard.ipynb), and select the environment your created for this notebook from the select kernel dropdown (this dropdown menu is located in the top right corner of your notebook).

2. Create a panel dashboard​

Copy the code below into a code cell of your notebook:

panel-trees-dashboard.ipynb
import pandas as pd
import holoviews as hv
from bokeh.models import HoverTool
import panel as pn

hv.extension('bokeh')
pn.extension()

# creating a sample dataset
data_trees = { 'species_name': ['live oak', 'pecan', 'bur oak', 'cedar elm'],
'avg_diameter_inch': [20, 30, 40, 35]
}

df = pd.DataFrame(data_trees)

# adding curve/line and bar plots
plot_bar = hv.Bars(df, 'species_name', 'avg_diameter_inch')
plot_curve = hv.Curve(df)

# creating hover tooltip
hover = HoverTool(tooltips=[("avg diameter", "@avg_diameter_inch"),
("species", "@species_name")])
# plot customization
combine_plot = plot_bar.opts(tools=[hover]) + plot_curve.opts(line_dash='dashed')

# creating a dashboard using panel
pn.Row(combine_plot).servable()

You can run all the cells in your notebook and view the Panel dashboard using the "Preview with Panel" button in the notebook toolbar:

About 🌳 - Species and more dashboard screenshot displaying a bar and line chart of avg_diameter_inch vs species_name

This interactive feature of Panel makes it possible to rapidly prototype and iterate on dashboards. Feel free to add more plots or different styles to your plots!

Deploy the dashboard​

  1. On the Nebari Home Page (from JupyterLab, click on the Nebari logo in the top right corner or go to File -> Home) click on "Create App" to create a new web application for your dashboard.
  2. Follow the general instructions from the JHub Apps documentation to fill out the Create app form.
  3. Click Next. You'll be redirected to the Spawner profile page. This page will allow you to select the server in which you want your app to run. These options will vary based on the setup of your Nebari deployment (which server types are available overall) and the permissions of your user (which server types you personally have access to).
  4. JHub App Launcher will deploy your app (which can take several minutes to complete) and automatically redirect you to it.

Your dashboard app will be available in the Nebari Home page, under "My Apps". If you allowed shared access, it will be available under "Shared Apps" for those with whom you have shared the app.

Manage apps in Nebari​

All applications are available on the Nebari home page (from JupyterLab, click on the Nebari logo in the top right corner or go to File -> Home).

To manage an application, click on the three dots in the top right of the corresponding application card where you can:

  • Start the app is it's not running
  • Stop a running app
  • Edit the application details
  • Delete the app

important

While the dashboard is running, it will continue to consume resources. You should be mindful of the incurring ongoing costs while the dashboard is running, and stop it when not needed.


Dashboards and apps can be very handy tools to share information and insights with colleagues and external customers or collaborators. You can use this basic dashboard to build more complex dashboards, add more dynamic features, and start sharing data insights with others.