Skip to content

Avaiga/taipy-workshop

Repository files navigation

Taipy Workshop

Sales Dashboard screenshot

In this workshop, we are going to use Taipy to create a web-based sales dashboard using Python only. The dashboard will show general metrics, plots and a map of sales data. We will also create a page to make predictions based on the sales data.

Check out Taipy's documentation here

Installing dependencies

  1. Create a virtual environment
  2. Install dependencies with pip install -r requirements.txt

Creating the Overview page

This page will contain a map and a few plots of the sales data.

Overview Page screenshot

Go to pages pages/Overview/Overview.py and follow the instructions there. You can find an example of how plots and layouts work in Taipy in examples/plot.py

Visualizing the Overview page

  1. Go to main.py at the root of the project and:

    a. Import the Overview.py file

    b. Add the entry "Overview": Overview in first place in the pages dictionary

  2. Run taipy run main.py and take a look at your page!

Creating the Analysis page

This page will contain plots as well as selection widgets to filter the data.

Analysis Page screenshot

Go to pages/Analysis/Analysis.py and follow the instructions there. You can find an example of how selectors work in Taipy in examples/selector.py

Visualizing the Analysis page

  1. Go to main.py at the root of the project and:

    a. Import the Analysis.py file

    b. Add the entry "Analysis": Analysis in second place in the pages dictionary

  2. Run taipy run main.py and take a look at your page

  3. Change the URL to /Analysis to see the Analysis page

Creating a shared header for all pages

We will now add a header to show some general metrics in all pages, as well as a navbar to navigate between pages.

Root Page screenshot

The header is already written in pages/root.md. All you have to do is load the page within pages/root.py using Markdown(filepath); import it in main.py and add it to the pages dictionary as the first entry with the key "/".

Creating the Predictions page

In this part, we will configure the following prediction pipeline:

Configuration DAG

Go to configuration/config.py and follow the instructions there to learn about data nodes, tasks and scenarios. You can find an example of how to create a prediction pipeline in examples/config.py

Then, in main.py, import scenario_cfg from configuration/config.py so that the configuration is loaded when the application is run.

You can then run main.py and interact with the predictions page to submit a scenario and see the results.

Prediction Parameters Page

Prediction Results

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages