Resources & References

Academic & Institutional Sources

Data Providers & APIs

Competitive Analysis References

How the Data Pipeline Works (PHP → JSON → Mapbox)

The simulator uses a three-layer architecture designed so that each team member can work independently on their piece without blocking anyone else.

  1. Database (MySQL): Darren collects data from open APIs (OpenAQ, Overpass, ITDP, Copernicus) and inserts it into a normalized star-schema on the school MySQL server. Dimension tables hold static city and venue information; fact tables hold time-stamped metrics for infrastructure and sustainability.
  2. PHP Middleware (JSON API): Marshal's PHP scripts query the database and output the results as JSON objects. The two endpoints are:
    • api/get_all_cities.php — returns all cities as a GeoJSON FeatureCollection (one Feature per city with headline metrics).
    • api/get_city_data.php?city_id=N — returns a single city's detail with its venues nested as a sub-FeatureCollection.
    The PHP layer acts as a secure passthrough — it validates input, runs the query, and streams the JSON response. No HTML templating or rendering happens here.
  3. Front-End (Mapbox GL JS + Chart.js): Rachel and Khoi's JavaScript code fetches the JSON endpoints and renders the data as an interactive globe (Mapbox) and as charts and tables on the Data & Viz page. Because the API returns standard JSON, the front-end can be developed and tested independently of the database — any tool that reads JSON can consume the output.
MySQL Database → PHP (PDO query) → JSON response → Mapbox GL JS / Chart.js

Key Assumptions & Data Limitations