Skip to the main content
Research · Sources

Where the data
comes from.

Shorelife uses eight primary data sources. All are public or government-archived. The pipeline runs daily at 9 AM PT. County-direct scrapers cover 12 of 15 California coastal counties. They surface official postings within hours of county publication. The statewide data.ca.gov export is frozen at 2026-03-05 and publishes no current status. Each source is attributed in the model feature space and versioned in the parquet archive.

Pipeline heartbeat
16m ago
beaches
16m ago
observations
16m ago
advisories
16m ago
12 of 15 CA coastal counties · San Diego, Orange, San Mateo, LA, Marin, Long Beach, East Bay Parks, Ventura, San Francisco, Humboldt, Sonoma, San Luis Obispo
County-Direct Advisory Scrapers
Last seen 16m ago
Update cadence
Daily at 16:00 UTC (9 AM PT). Retry-with-backoff on 403/429/5xx so transient county-site rate limits don't silently zero-out a county.
github.com/kylechoi101/surf-health/blob/main/backend/scripts/fetch_county_advisories.py ↗

Live advisory and closure postings from each county health department public source. San Francisco uses the data.sfgov.org Socrata API. Eight original counties plus Humboldt and Sonoma use regex parsers on static HTML. San Luis Obispo uses Playwright-rendered LLM extraction on its ArcGIS dashboard. When a county scraper succeeds, its records are authoritative for that county. Stale state-feed records auto-demote. This rollout alone cleared 12 zombie postings older than a year. Closures are exempt from the 14-day acute window so chronic situations stay visible until officially lifted.

Fields used
advisory_type (Posting/Closure/Rain/Chronic)station_codestarted_atcauseadvisory_website (county source)
San Francisco (Socrata) · Humboldt · Sonoma · San Luis Obispo (LLM-extracted)
County-Direct Sample Feed

Same-day numeric water-quality values from each county public source, parallel to the BeachWatch historical archive. Fields include enterococcus, fecal coliform, E. coli, and total coliform. We apply AB411 single-sample thresholds (ENT ≥104, FECAL ≥400 MPN/100mL) to the latest reading per station. We do not wait for the state advisory feed to catch up. We use this feed today for cross-validation. It can become a near-real-time training signal later. We currently capture 200 sample readings. LLM extractions require sample_date within 90 days, analyte on a strict whitelist, and a plausible value.

Fields used
analyte (ENTEROCOCCUS/FECAL_COLIFORM/E_COLI/TOTAL_COLIFORM)value (MPN/100mL)sample_dateexceeds_limitstation_codesource_url
CDPH / CA SWRCB
CA BeachWatch (statewide feed)
Last seen 16m ago
Update cadence
Historical archive only — the data.ca.gov export is frozen at 2026-03-05 and publishes no current results.
data.ca.gov/dataset/beach-monitoring ↗

Official marine enterococcus culture-based sample results and the statewide advisory feed. The multi-year archive sets each beach rating and trains the ML challenger. We also use this feed as an advisory fallback in three counties where direct scraping is blocked or unavailable. Monterey blocks datacenter IPs. Santa Barbara lists sampling sites but does not publish current status. Mendocino and Santa Cruz have no first-class scraper yet. The data.ca.gov export is frozen. Its newest sample is dated 2026-03-05, so it supplies historical training data only. Recent results arrive from the live BeachWatch database (beachwatch.waterboards.ca.gov, added July 2026) and CEDEN/SafeToSwim. County-direct scrapers override advisory status for the 12 covered counties.

Fields used
enterococcus CFU/100mLadvisory typeadvisory start/endsample station ID
NOAA NDBC
NDBC Buoy Network
Last seen 16m ago
Update cadence
Hourly; aggregated to daily forecast-safe windows (≤ 5 AM PT)
www.ndbc.noaa.gov ↗

Hourly ocean observations from nearshore buoys: significant wave height, dominant period, sea-surface temperature, salinity, and wind.

Fields used
wave_height_mdominant_period_swater_temperature_csalinity_psuwind_speed_mps
Scripps Institution of Oceanography
CDIP Wave Model
Update cadence
Hourly; aggregated daily
cdip.ucsd.edu ↗

Nearshore wave model output and buoy telemetry at California coastal sites, used to supplement NDBC coverage.

Fields used
HsTpwave direction
Open-Meteo / ECMWF
Open-Meteo ERA5-Land
Update cadence
Backfill on first run (6-year archive); then daily append. Cached per (lat, lon, date) parquet.
open-meteo.com ↗

Reanalysis archive of hourly precipitation, cloud cover, shortwave radiation, UV index, and near-surface wind at 0.1° resolution. The 72 hours of rain before each morning update feed the served rating. Other fields feed the ML challenger solar inactivation and wind plume features.

Fields used
precip_mm_72huv_indexshortwave_radiationcloud_coverwind_uwind_vsolar_inactivation_indexshore_normal_wind_ms
USGS National Water Information System
USGS NWIS
Update cadence
Daily; lag-adjusted (1–3 day lag to beach)
waterdata.usgs.gov/nwis ↗

Daily streamflow and gage-height records for rivers and creeks draining to monitored beaches. Used as hydrology covariate proxying storm-runoff pollution.

Fields used
discharge_cfsgage_height_ft
CA SWRCB
CEDEN
Update cadence
Bulk pull (≤ 50,000 rows); merged at pipeline init
ceden.waterboards.ca.gov ↗

California Environmental Data Exchange Network. The data.ca.gov BeachWatch export is frozen. CEDEN is one of two live sources of laboratory results, alongside the live BeachWatch database.

Fields used
enterococcusE. coli (excluded from model labels)total coliform (excluded)

Forecast-safe cutoff at 5 AM PT.

The pipeline runs daily at 9 AM PT. All environmental inputs stop at 5 AM PT on the forecast day. Same-morning lab results do not enter the features. Open-Meteo data is cached per (lat, lon, date) in a local parquet store and updated each day. A full 6-year backfill runs only on the first cold-cache CI run.

Pipeline reference →