This notebook is a dashboard publication tool via Jupyter-Voila. It is developed based on this tutorial by Martin Renou.
This notebook is organized into modules to complete the following tasks:
- Data Analysis
- Data Visualization
- Dashboard Publication
This repository is organized into the following folders:
- Data - Contains CSV files used for analysis
- Modules (Notebook) - Individual modules used for data analysis
- Modules (Voila) - Individual modules used for data publication
- Notebooks - Voila publishes from file named "bqplot.ipynb"
This dashboard visualizes cumulative monthly ridership from the VTA Open Data Portal. The Portal is described as "central location for access to VTA's open data, including transit, active transportation, congestion management and more."
The monthly ridership data includes fields for train route, line type, ridership and cumulative monthly period. It consists of data from 2013 to 2018; chart below shows monthly cumulative passenger boarding count by VTA train line type.
This is an example of Voila deployed on Heroku, try it out: https://voila-heroku-demo.herokuapp.com
-
First, create an Heroku account (free account is fine for testing)
-
Install Heroku on your machine: https://devcenter.heroku.com/articles/getting-started-with-python#set-up
-
Clone this repository, or create your own repository that follows the same structure:
git clone https://github.com/voila-dashboards/voila-heroku
cd voila-heroku
-
Create your Notebook and put it in the
notebooks
directory -
Add the dependencies needed for running your Notebook in the
requirements.txt
file -
Edit the
Procfile
file by replacingnotebooks/bqplot.ipynb
by the path to your awesome Notebook -
Commit everything
git commit -m "My awesome app on Heroku!"
- Create the Heroku app:
heroku create
- Now deploy your code:
git push heroku master
- That's it! Easy right? Now you can open your app using:
heroku open
Note that this last command is only a handy shortcut for opening your browser following the right url, you can also do that manually.
- You can rename your application on the Heroku website, in the applicaion settings. If you rename it, don't forget to update the remote repository doing
git remote remove heroku && git remote add heroku https://git.heroku.com/your-application-name.git
- You can add/remove/update voila command line arguments in the
Procfile
file, e.g. you can use the dark theme by adding--theme=dark