Full-Stack Pipeline: Built a complete data flow using Python to process ONS data and MongoDB for persistent storage.
Geospatial Intelligence: Integrated Geopandas and Matplotlib to generate high-fidelity choropleth maps with custom silver-on-charcoal styling.
Interactive Analytics: Developed a dynamic dashboard using Flask and Plotly, allowing users to toggle between population totals, net changes, and percentage shifts.
Responsive UI: Crafted a sleek "Dark Mode" interface featuring Hero Stat Cards that provide an instant narrative of the UK's top-performing regions.
πΈ Gallery & Interface
Below are snapshots of the application in action, highlighting the Dark/Silver aesthetic and the interactive data layers.
Overview of the Stat cards and latest population snapshots.

Interactive bar charts showing percentage change across the 12 UK regions.

Interactive choropleth maps generated via Geopandas and Plotly.

See the Interactive UK Population Tracker in action. This video demonstrates the seamless navigation between the dashboard, regional trends, and the interactive Plotly maps.
Note: If the video does not load, you can find the raw file here.
Follow these steps to get the environment running locally using Git Bash:
git clone [https://github.com/reory/uk-population-tracker.git](https://github.com/reory/uk-population-tracker.git)
cd uk-population-tracker
python -m venv venv
source venv/Scripts/activate
/data folder. pyogrio and geopandas to interface with this file automatically. uk_regions.gpkg remains in the /data directory for the map engine to function.pip install -r requirements.txt
Run the ingestion script to generate the synthetic dataset, inject noise, and populate your MongoDB instance:
python -m processing.mongo_client
Pre-render the static maps before launching the dashboard:
python -m processing.map_regions
python run.py
The Flask dashboard will be live at http://127.0.0.1:5000/
This project uses pytest and mongomock.
To run the full suite:
pytest
To skip live database checks:
pytest -m "not live"
π οΈ Tech Stack & Data Engineering
Backend: Python 3.x, Flask (Web Framework)
Database: MongoDB (Atlas/Community)
Synthetic Data Generation: Faker: Used to generate a baseline of realistic regional entities and metadata.
Mimesis: Leveraged for high-performance generation of large-scale population sets.
Data Augmentation: Applied custom Noise Injection algorithms to baseline data to simulate realistic percentage changes and growth fluctuations over a multi-year timeline.
Data Analysis: Polars & Pandas
Geospatial: Geopandas, Shapely
Frontend: HTML5, CSS3, Plotly.js
π Key Features
Latest Snapshot: Real-time retrieval of the most recent database entry.
Multi-View Maps: Static regional analysis with formatted "Millions" labels for report-ready exports.
Interactive Drill-Down: Hover-enabled Plotly maps for granular data exploration.
Automated Pipeline: Custom processing modules that handle data cleaning and map generation in one command.
πΊοΈ V2 Roadmap (The Drill-Down)
The next phase of the project focuses on Granular Urban Analytics:
City Drill-Downs: Users will be able to click on a region (starting with London) to explore a new layer of data.
Borough-Level Mapping: Integration of ONS Local Authority District (LAD) GeoPackages to map the 32 London Boroughs.
Urban Comparison: Expanding the drill-down feature to other major UK cities like Manchester, Birmingham, and Leeds.
Predictive Modeling: Using historical trends to forecast population growth over the next 5 years.
Use prophet along with pandas for high quality forecasting for data.
π Notes
π Acknowledgments
Built by Roy Peters contact details π