Inspiration

Across 46 US ecological sites in NEON, PhenoCam towers capture daily canopy greenness images (gcc_90) used to track leaf-out, senescence, and ecosystem health. When a camera stalls or snow covers a lens, a full week of field data can be lost before maintenance notices.

Checking sites manually—or flagging every camera that missed a day last week—buries staff in noise. Over 2024–2026, a simple recent-missingness rule triggers 193 alerts, and 145 of them turn out to be false alarms (24.9% precision). I wanted a lightweight forecasting tool that gives field teams early warning ahead of an outage without crying wolf, and runs reliably anywhere—even as a single offline HTML file on a field laptop.


What It Does

PhenoWatch forecasts weekly PhenoCam dropout risk (< 4 valid days over the next 7 days among currently healthy sites) under a strict 2-day data-availability lag, matching real operational conditions.

Inside a single self-contained index.html (0 external network requests):

  1. Weekly Triage Queue: Browse all 150 out-of-sample Thursdays (2024-01-04 to 2026-11-12), compare GBDT scores against past_week and site_month baselines, inspect 12-week site history timelines, toggle ground-truth reveal (0–7 valid days), inspect real case studies (BONA 2026-11-05 hit at 65.6% vs 0/7 valid days; UNDE 2026-07-30 honest false alert at 14.0% vs 7/7), and export triage CSV files.
  2. Threshold & Holdout Benchmark: Sweep the alert cutoff interactively (0.05–0.40) on 5,158 holdout site-weeks (129 real dropouts) to inspect precision-recall curves, false alert counts, and year-by-year results (2024, 2025, 2026).
  3. Live Risk Checker: Adjust the 9 pre-issue features (days_since, missing7, missing14, missing28, missing90, prior_week_missing, repeat_gap, seasonal month) or trigger presets to execute the exact exported 90-tree HistGradientBoostingClassifier directly in browser JavaScript.

How I Built It

  1. Data & Strict Split (camera_gap_backtest.py): Packaged the frozen EFI neon4cast daily phenology snapshot (phenology-targets.csv.gz, SHA-256 a18320ce2b62976eca922781a9295df056d776534a65ed4501eadf7fc5663601). Split chronologically into Train (2018–2022, 10,983 rows), Threshold Calibration (2023, 2,239 rows, picking threshold 0.1168), and Untouched Holdout (2024–2026, 5,158 rows across 46 sites).
  2. Exact Tree Export (build_app.py): Trained a regularized 90-tree HistGradientBoostingClassifier in scikit-learn and extracted every internal split threshold, missing-value branch rule, and leaf logit at full float64 precision straight into client-side JavaScript inside index.html.
  3. UI & Verification (app.template.html, test_app.py): Built a dependency-free SVG + HTML dashboard and wrote an automated Playwright test suite checking tree inference parity, UI flows, CSV export, 0 external requests, and mobile layout (390px viewport).

Challenges I Ran Into

  • Floating-point tree threshold drift: Rounding exported split thresholds to 10 decimal places initially caused slight divergence on one edge case (NIWO 2025-02-20) where seasonal cosine fell right on a split boundary. Exporting exact float64 thresholds fixed parity to 1.110e-16 across all 5,158 rows.
  • Honest evaluation against simple baselines: Under a fixed top-3-picks-per-week rule (450 picks), the GBDT gets 56 hits vs 54 for past_week (95% bootstrap interval [-1.1, +2.0] pp)—virtually tied because healthy weeks force low-risk picks. Calibrating alerts cleanly against 2023 F1 makes the real operational difference: cutting false alerts from 145 down to 27 (-81.4%).

Accomplishments That I'm Proud Of

  • Doubled Average Precision: 0.292 AP (0.0213 Brier) vs 0.139 for past_week and 0.120 for site_month on unseen 2024–2026 data, outperforming baselines in all three test years (2024: 0.268 vs 0.114, 2025: 0.263 vs 0.129, 2026: 0.391 vs 0.193).
  • True zero-server parity: Full 90-tree gradient-boosted inference in a static browser file matching Python scikit-learn within 1.110e-16 (4.94e-09 against rounded CSV targets across 100 checked samples).

What I Learned

  • Probability calibration beats forced rankings: In sparse outage forecasting (129 / 5,158 = 2.5% positive base rate), calibrating alert cutoffs on an out-of-time validation year (2023) yields far larger operational gains (24.9% -> 55.0% precision) than forcing fixed weekly triage quotas.
  • Exact model portability pays off: Compiling tree nodes straight to vanilla JS eliminates server spin-up and makes scientific ML tools genuinely portable to field teams.

What's Next for PhenoWatch

  • Ingest upstream battery voltage and tower air-temperature anomalies where available alongside missingness history.
  • Automate weekly Thursday score generation on GitHub Actions straight from live neon4cast S3 targets.

Personal & AI Contribution Disclosure (Hackathon Requirement)

  • My work: Problem framing, 2-day data lag audit, 9 leakage-free temporal features, chronological 2018–2022 / 2023 / 2024–2026 backtest design, baseline comparisons, and error/case analysis (BONA, UNDE).
  • AI coding assistance: Used to scaffold the build_app.py tree serializer, author the dependency-free app.template.html frontend, write Playwright regression checks (test_app.py), draft/clean documentation, and automate demo video synthesis (make_movie.py), with every number and model parity assertion re-verified locally.

Built With

Share this project:

Updates

Submission history