To run the frontend:
-
Make sure Docker is installed and running. Refer to Docker
-
Download and unzip Group04Midterm.zip, then open the
Appfolder -
From the project root, run:
docker compose up --build -
Once the container is ready, go to
localhost:8501to view the dashboard.
A unified ETL pipeline integrates national open data from the RDW, CBS and KiM.
The Extract phase retrieves raw records and the Transform phase cleans, harmonises and standardises the data:
- RDW notebooks classify car models by fuel type, body type and weight (01_RDW_extraction.ipynb, 02_RDW_cleaning.ipynb, 03_RDW_classification.ipynb).
- Regional scripts merge PC6-PC4 areas and calculate proportions and Z-scores(01_REGIONAL_extr_transf.py, 02_NBH_REGIONAL_cleaning.py, 02_PC4_REGIONAL_cleaning.py, 02_REGIONAL_cleaning.py) .
The Load phase exports the final tables to BigQuery and populates the dashboard via Dockerised Streamlit components:
- Regional script: 03_REGIONAL_load.py .
-
RDW Rijksdienst Wegverkeer Gekentekende Voertuigen (2025) link
-
CBS Centraal Bureau voor de Statistiek
- Kerncijfers Wijken en Buurten (2024) link
- Kerncijfers Postcode 4 (2024) link
- Buurt, Wijk en Gemeente (2023) voor Postcode + Huisnummer link
- KiM Kennisinstituut Mobilitiet, Ministerie van Infrastructuur en Waterstaat. Atlas van de Auto (2024) link
- Open Charge Map (OCM) Link
- Google Custom Search API Link
-
Vehicle Search and Model Details
-
Neighbourhood Map (Geo Layer)
- CSF/KPI: Data consistency, look-alike matching (future).
- Data Source: CBS GeoPackage 2023 (
MAP.geo_neighbourhoods). - Computation: Loads and converts geometries to WGS84; color intensity currently random.
- Code File: main.py (
query_map_geometry()and PyDeckGeoJsonLayer).
-
Regional Compatibility – MatchScore
- CSF/KPI: Car–Market Fit indicator measuring how well a car model aligns with regional socio-economic profiles.
- Data Source: Combined RDW + CBS Regional data.
- Computation: Weighted Manhattan distance between car attributes (body/fuel type, price) and regional indicators (income, fleet composition).
- Visualization: Heatmap of PC4 regions and Top-N table with region name, score, affordability, and interest.
- Code File: analysis_matchscore.py.
-
Market Positioning Indicators (Popularity, Niche)
- CSF/KPI: Market dynamics and positioning within vehicle segments.
- Data Source: RDW.
- Visualization: Radar or bar charts showing model distribution across body classes.
- Code File: analysis_marketposition.py.
-
Market Potential & Forecasting
- CSF/KPI: Projected Market Growth and Forecast Accuracy (SMAPE).
- Data Source: Dynamic RDW API (registrations 2020–2025).
- Computation: Holt–Winters Exponential Smoothing with additive trend and seasonality. Forecasts displayed with ±80% prediction intervals.
- Visualization: Line chart showing historical vs. predicted registrations for new and second-hand vehicles.
- Code File: forecasting.py.
-
EV Readiness & What-If Scenarios
- CSF/KPI: Electric Vehicle Readiness and Transition Potential.
- Data Source: KiM Atlas van de Auto + Open Charge Map API (charger density, power level).
- Computation: K-Means Clustering on standardized features (income, urbanization, fuel mix, household size).
Includes Ridge Regression “what-if” model simulating EV adoption under changing socio-economic conditions. - Visualization: Clustered map of EV readiness, table of regional indicators, and interactive slider for scenario testing.
- Code File: analysis_ev.py.
-
Vehicle Profile Explorer
- CSF/KPI: Data completeness and quality check of RDW database.
- Data Source: RDW classified dataset.
- Computation: Retrieves model specs (mass, seats, propulsion, price) and compares them with segment averages.
- Visualization: Model detail card with representative image (Google Custom Search API) and radar diagram summarizing vehicle attributes.
- Code File: main.py.