Explore global data trends and animated visualizations.
This project is lightweight and runs well on most modern laptops. It does not require a GPU or high-end hardware.
Recommended:
- Python 3.9+ (tested on 3.12)
- At least 4 GB RAM
- Windows, macOS, or Linux
Required tools:
- ffmpeg must be installed and available in your system PATH
- All Python packages listed in requirements.txt
For Windows, the precompiled option is recommended:
- Visit: https://www.gyan.dev/ffmpeg/builds/
- Download the latest release FULL .zip
- Extract it (e.g., to
C:\ffmpeg
) - Add the bin folder to your system PATH:
- Search "Environment Variables"
- Edit Path, add:
C:\ffmpeg\bin
- Verify:
ffmpeg -version
Use the professional Python workflow described in pro-analytics-01
py -m venv .venv
.\.venv\Scripts\activate
py -m pip install --upgrade pip setuptools wheel
py -m pip install --upgrade -r requirements.txt --timeout 100
py ./scripts/make_bar_chart.py
Pull and activate the .venv if not already active.
git pull
.\.venv\Scripts\activate
Git add, commit, and push changes to GitHub repo.
git add .
git commit -m "did this"
git push -u origin main
Top 30 countries by life expectancy at birth from 1960 to 2022, visualized as a bar chart race.
Source: World Bank Life Expectancy Data
This project uses Voilà to publish notebooks using interactive widgets (e.g., drop-downs).
From the project root, run the following command to launch a notebook as a standalone interactive web app.
voila notebooks/life_expectancy_compare.ipynb
To publish with Voilà, add notebook
and voila
packages to requirements.txt.
This may affect how charts are rendered during development especially in VS Code.
For example, fig.show() may cause charts to appear multiple times in VS Code notebooks after these two packages are installed.
When publishing with interactive widgets, it is better to return fig
from a function (e.g., get_chart()
) and let let Jupyter/Voilà handle the rendering with something like:
widgets.interactive_output(get_chart, {...})