VEN — DATA SOURCE & API INVENTORY

Every stream, snapshot, and endpoint feeding the TLALOCORBIS water-energy map for British Columbia

This document enumerates the full data surface behind tlalocorbis.ca: every upstream provider whose data is ingested, the live telemetry stream polled by scheduled job, the derived PostgreSQL tables, the internal FastAPI surface consumed by the frontend, and the runtime external dependencies. Last verified: 2026-04-22.

13
Upstream sources
1
Live stream (hourly)
19
Internal API routers
25
Postgres / PostGIS tables
15,821
Candidate sites mapped
~1.0 M
Realtime readings

Tier 1 · Upstream authoritative sources (13)

Federal government — Canada

#SourceEndpoint / fetch modeFeeds
1HYDAT — Water Survey of Canada (historical)local SQLite data/Hydat.sqlite3 from government quarterly release2,324 BC river stations
2WSC Real-time Hydrometric APIapi.weather.gc.ca/collections/hydrometric-realtime/items · live · hourly cron996,384 readings · 449 gauges
3HRDEM / GEO.CA elevationdatacube.services.geo.ca/ows/elevation (WCS)Head inference · 1,001 cached points
4NRCAN Hydrospatial CHN / RHCFTP zip ftp.maps.canada.ca/pub/nrcan_rncan/.../chn_rhc_01BC000.zip172,013 BC flowline segments
5NPRI — Water Releases 2023CSV snapshot~5,800 industrial dischargers
6Open-Elevation (fallback)api.open-elevation.com/api/v1/lookupElevation fallback when HRDEM unavailable

Provincial — British Columbia

#SourceEndpoint / fetch modeFeeds
7BC Freshwater Atlas (streams + falls)WFS openmaps.gov.bc.ca/geo/ows172K streams · FWA falls layer
8BC WRIS DamsGeoJSON snapshot2,467 licensed dams
9BCER — short-term water useGeoJSON snapshot~237 oil/gas water permits
10BC Geographic NamesWaterfalls enrichment layerName enrichment for 4,874 falls

Municipal — six utilities via ArcGIS FeatureServer REST

#UtilityEndpointLayer
11aVancouver Open Dataopendata.vancouver.caPressure zones · water mains · PRV proxy
11bSurrey Open Datagisservices.surrey.ca/arcgis/…/OpenData/MapServerLayer 52 (PRVs)
11cCoquitlamgeodata.coquitlam.ca/arcgis/…/DynamicServices/Water/MapServerLayer 0
11dDistrict of North Vancouvergeoweb.dnv.org/data/ shapefilePRV features
11ePort Coquitlammaps.portcoquitlam.ca/server/rest/…/UtilityNetworks/MapServerLayer 36
11fTownship of Langleymapsvr.tol.ca/arcgisext02/…/DynamicServices/MapServerLayer 188 (parcel-aggregated)

Community / open web

#SourceEndpointFeeds
12OpenStreetMap Overpassoverpass-api.de/api/interpreter869 water infra features · OSM waterfalls
13Wikipedia (waterfalls page parsing)MediaWiki~180 high-quality named falls

Curated snapshots (not live APIs, but upstream authoritative)

Metro Vancouver public reports — hand-curated from published annual reports. 5 WWTP outfall sites (Iona, Annacis, Lions Gate, Lulu, Northwest Langley).

Canadian Hydrographic Service — tide & current tabulated atlases. 6 narrows hand-encoded from published tables (Seymour Narrows, Skookumchuck, and others).

Tier 2 · Live telemetry — the only hot stream

A single scheduled job keeps the platform's live signal fresh:

0 * * * *  /home/sudo-claude/aquaorbis/scripts/cron_realtime.sh
           → fetch_realtime.py
           → api.weather.gc.ca (WSC Real-time)
           → upserts into realtime_readings

Last run: 200,000 upserts from 447 stations in 183.7 s at 2026-04-22 21:03 UTC. Table freshness spans 2026-04-14 → 2026-04-22 across 449 distinct stations. Every other ingest (scripts/ingest_*.py, fetch_*.py — nine scripts total) is a snapshot run on demand when upstream publishes.

Tier 3 · Derived / internal tables (25)

Tier 4 · Internal API surface — 19 routers

RouterPrimary endpoints
main.py/api/health, /api/fleet-stats, /api/stations, /api/outfalls, /api/tidal, /api/pressure-zones, /api/water-mains
nodes/api/nodes (unified 7-type), /api/prvs
dams/api/dams (GeoJSON)
waterfalls/api/waterfalls
industrial/api/industrial
pressure_zones_v2/api/pressure-zones-v2 (HGL-modeled, 6 munis)
pipe_pressure/api/pipe-pressure (17 water mains with per-pipe drops)
flowlines/api/flowlines (BC FWA streams)
infrastructure/api/osm-infrastructure
elevation/api/elevation (HRDEM proxy / cache)
realtime/api/realtime/{station_id} (48h window)
seasonal/api/seasonal/{station_id} (12-mo climatology)
reports/api/reports/{node_id} (PDF site assessment)
export/api/export/json, /api/export/geojson
actions/api/actions (lifecycle events)
auth/api/auth/magic-link, /api/auth/verify (JWT magic-link)
views/api/views (saved filter states)
aip/api/aip/translate, /api/aip/health (NL → filter via LLM chain)
websocketwss://tlalocorbis.ca/api/ws/live (real-time action broadcast)

Tier 5 · Runtime external dependencies

#ServicePurposeLoad pattern
AMapbox Vector Tiles (mapbox://styles/mapbox/dark-v10)Primary basemapEvery page load · client-side
BCartoCDN Dark Matter (basemaps.cartocdn.com)Fallback basemap (no Mapbox token)Only when token missing
CGoogle Fonts (fonts.googleapis.com)DM Sans + JetBrains MonoEvery page load
DMothership LiteLLM proxy (aquaorbis-llm.carranzas.io/v1)AIP natural-language filter · Qwen 3.6 thinker-newPer-query · currently blocked by TLS cert SAN scope

Summary

The only live-polling signal today is WSC river discharge. Everything else — dams, waterfalls, PRVs, outfalls, industrial, tidal, pressure zones, OSM pipes — is a snapshot ingestion. Additional live streams (tide gauges in-session, municipal SCADA, NPRI monthly updates) are adds, not a rewrite.