How this was built
This site is a folder of static files. A visitor's browser reads them and draws the map and charts itself. No program runs on the web server, there is no database, and nothing asks a visitor to sign in. The figures below are read from the build's own record of itself, written by the update script each time it runs.
- Files in the site
- …
- Total size
- …
- Last update run took
- …
- License fees
- $0
The yearly update is one command
A staff member with Python installed runs these two lines from the project folder. The first installs the open-source packages the script uses; it is needed once per computer.
python -m pip install -r requirements.txt
python update.py
The script reads the Council's published layers and the Census tables again, checks them, works out the figures for every station area, writes the finished files, and prints a short report. The report from the last run is saved as update-report.txt. Publishing means copying the dist folder to any static web host.
Printing
Each station area and corridor has a one-page summary that the browser prints or saves as a PDF, laid out for a letter page by the page's own print styles. It needs no software beyond a web browser, and the update script does not produce PDFs, so it needs no PDF library.
What the site is made of
- Geography as GeoJSON and figures as a comma-separated table, in the
datafolder. Both open in ArcGIS, QGIS, and spreadsheet programs. - MapLibre GL JS 4.7.1 for the map (BSD 3-Clause license) and D3 7.9.0 for the charts (ISC license). Both are stored in the site at fixed versions and nothing is loaded from another website.
- A basemap built from OpenStreetMap data (Open Database License), cut from the Protomaps daily build and stored beside the page as a folder of map tiles for the region.
- An update script in plain Python 3.11 or newer, using the open-source packages requests, shapely, pyproj, pyshp, and pmtiles. Each is pure Python or ships ready-built for Windows, macOS, and Linux, so installing them needs no compiler or system library.
Sources
Every source is public and was read without an account or a key.
Method note
Station areas. The Council's DTAT Stations layer has one point for each platform or direction. The script groups the points by line and station name and draws the land within half a mile of any of them. That gives one station area for each station on each line, so a station served by two lines has two areas that overlap. The Council's DTAT Areas layer has one area for each line, two downtown areas, and three combined areas; the explorer uses it for the corridor view and for the three statements.
Placeholder figures. The figures are American Community Survey five-year estimates for census tracts in Anoka, Carver, Dakota, Hennepin, Ramsey, Scott, and Washington counties: table B25003 (Tenure) for households and renter households, and table B07003 (Geographical mobility in the past year) for residents age 1 and over and those who lived in the same house a year earlier. Three five-year periods are used, and they do not overlap: 2010 to 2014, 2015 to 2019, and 2020 to 2024.
From tracts to station areas. Each tract's counts are shared among the areas it overlaps in proportion to the overlapping land area, using that period's own tract boundaries. The 2010 to 2014 and 2015 to 2019 periods use tracts drawn for the 2010 census, and 2020 to 2024 uses tracts drawn for 2020, so no relationship file is needed. Sharing by area assumes people are spread evenly across each tract, which they are not; the real dashboard would use the Analysis team's results instead. Shares are computed from the shared counts. Margins of error are not carried through in this demonstration.
Withheld figures. When the estimates place fewer than 100 households in a station area, its figures are withheld and shown as "withheld", never as zero.
The Census API. The Census Bureau's data API refused requests made without a key when this was built, so the script reads the same tables from the Bureau's public summary files at www2.census.gov instead.
What the figures are not. They are Census estimates of tenure and of recent moves, used to show how statements, charts, and tables would work on the real dashboard. They are not a measure of displacement or of displacement risk, and they are not the Council's analysis.