Skip to content

Example dashboard code

This page explains the dashboard code examples found in the examples folder of the Vizro GitHub repository.

Vizro live demo

For an example of Vizro in action, take a look at the live demo running at, which uses the Plotly gapminder data.

The dashboard launches with a home page that offers four other pages:

  • Variable analysis: Analyzes population, GDP per capita and life expectancy on country and continent level.
  • Relationship analysis: Investigates the interconnection between population, GDP per capita and life expectancy.
  • Benchmark analysis: Explores how the metrics differ for each country and offers the option to export data for further investigation.
  • Continent summary: Summarizes the main findings for each continent.

You can find the code for each of the charts, for each page of the dashboard, in the examples folder of the vizro-core package, within Vizro's GitHub repository. The code is available as a .py file or as a Jupyter Notebook.


If you have any problems running the example code, please raise an issue on the Vizro repository.

Vizro features

The examples/features folder of the vizro-core package within Vizro's GitHub repository contains an example that illustrates Vizro's features. The code is available as a Python script, plus there is an alternative yaml_version that offers the same example as the pydantic model but via YAML configuration.

Ways to configure a dashboard

In most cases, the pydantic model should be your preferred method of dashboard configuration, but you can also define a dashboard with YAML, JSON, or as a Python dictionary.

Examples from Vizro users

We maintain a separate, curated page of videos, blog posts, and examples of Vizro usage from our community.