
The Annual Update
Once a year, after the new Development Trends Along Transit data and any new Displacement Analysis tables arrive, one script rebuilds the dashboard. It needs Python 3.9 or later, which ships with ArcGIS Pro, and nothing else.
Get the year's layers
Run
python3 update_dashboard.py --fetchto pull the permits, stations, alignments and corridor areas from the Council's ArcGIS services, or export the same layers from ArcGIS Pro as GeoJSON intoinputs/.Add the Analysis team's tables
Save their CSV files in
inputs/analysis/. The column layout is inschema/analysis-v1.json; the script stops with a plain message if a column or a station id does not match.Update the report figures
The Development Trends Along Transit figures quoted on the Story and the line pages sit at the top of
update_dashboard.pyunderDTAT_FACTSandDTAT_LINE_FACTS. Copy the new report's numbers there.Run the update
Run
python3 update_dashboard.py. It rebuilds every line and station page, the downloads and the search index, and prints a summary: 14 lines and 358 stations today.Review before publishing
Open the rebuilt site from the
site/folder and check three things against last year: the region total on the map, one line you know well, and the Story's figures.Publish
Copy the
site/folder to the web server or Azure storage. Keep last year's folder; publishing it again is the rollback.
The files
- update_dashboard.py the update script
- dashboard_data.py reads and counts the layers
- dashboard_html.py the charts and the line strip
- site_pages.py the words on each page
- analysis-v1.json the Analysis table layout
The site itself is plain HTML, CSS and JavaScript with one open-source map library (MapLibre GL JS, BSD license). There is no database, no server software to patch and no subscription.
When a source changes
Before it writes anything, the script checks that each layer still has the fields it reads. If the Council renames one, the script stops, leaves the site as it was and names the layer and the field. Add the new name to FIELD_RENAMES at the top of dashboard_data.py and run the update again; nothing else in the code changes.
FIELD_RENAMES = {"PERMIT_YEAR": "YEAR"}
The TOD team runs the update each year, with help from Council IS and IS-GIS staff when a layer moves or a service address changes. The layer addresses sit in SERVICES and LAYERS in the same file.
