Interactive City Dashboard

🌍 Interactive City Dashboard
Explore world cities with an interactive map, charts, and live data

Python 3.11 MIT License Repo Size Last Commit GitHub Stars

πŸ—ΊοΈ Interactive City Map + Population Dashboard

This project demonstrates professional-grade Dash engineering, clean separation of concerns, and a fully tested callback + layout system.


πŸš€Features

Interactive Map

Population Chart

Wikipedia Summary Panel

Light/Dark Themes

Multiple Layout Modes

Testing


Demo

πŸŽ₯ Video Preview

Click below to watch the 1 minute demo:

▢️ View Demo Video


πŸ“ΈScreenshots

Dashboard (Light Mode)

Dashboard Light

Dashboard (Dark Mode)

Dashboard Dark

City Views

City 1 City 2 City 3 City 4 City 5


βš’οΈ Project Structure

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

πŸ’» Installation

git clone https://github.com/reory/Interactive-City-Dashboard.git
cd Interactive-City-Dashboard
pip install -r requirements.txt

Running the App

python api.py

Then open: http://127.0.0.1:8050

πŸ§ͺ Running Tests

pytest -q

🏒 Architecture Principles

This project follows:

Pure functions - All callback logic is pure and testable.

Separation of concerns - Layout = static UI

Predictable state - No hidden globals, no side effects.

Test-driven structure - Every major part of the app is validated.


πŸ’» Deployment

This app can be deployed to:

server = app.server

🀝 Contributing

Pull requests are welcome. For major changes, open an issue first to discuss what you’d like to change.


πŸ“ƒ License

MIT License β€” free to use, modify, and distribute.


Built by Roy Peters Click here for contact details 😁