π Interactive City Dashboard
Explore world cities with an interactive map, charts, and live data
This project demonstrates professional-grade Dash engineering, clean separation of concerns, and a fully tested callback + layout system.
Click below to watch the 1 minute demo:
πΈScreenshots



project_flask_api/
β
βββ api.py # Dash app entrypoint
β
βββ data/
β βββ populations.py # City dataset
β
βββ services/
β βββ wiki.py # Wikipedia summary fetcher
β
βββ components/
β βββ map_builder.py # Map figure builder
β βββ charts.py # Population chart builder
β βββ details_panel.py # Wiki/details panel builder
β βββ theme.py # Light/Dark theme definitions
β
βββ layout/
β βββ layout.py # serve_layout() β full UI tree
β
βββ callbacks/
β βββ callbacks.py # Pure callback logic + register_callbacks()
β
βββ tests/
βββ test_layout.py
βββ test_callbacks.py
βββ test_integration_app.py
git clone https://github.com/reory/Interactive-City-Dashboard.git
cd Interactive-City-Dashboard
pip install -r requirements.txt
python api.py
Then open: http://127.0.0.1:8050
pytest -q
The suite includes:
Layout structure validation
Callback logic tests
Integration tests using Dashβs callback registry
This project follows:
Pure functions - All callback logic is pure and testable.
Separation of concerns - Layout = static UI
Callbacks = behaviour
Components = reusable UI builders
Services = external data
Data = static datasets
Predictable state - No hidden globals, no side effects.
Test-driven structure - Every major part of the app is validated.
This app can be deployed to:
server = app.server
Pull requests are welcome. For major changes, open an issue first to discuss what youβd like to change.
MIT License β free to use, modify, and distribute.
Built by Roy Peters Click here for contact details π