How It Works
wx.jamestannahill.com publishes live hyperlocal weather from a private station in Midtown Manhattan. Below is the full data pipeline behind every reading on the dashboard: the physical sensor, AWS Lambdas, in-house signals, and climate context back to 1869.
PIPELINE AT A GLANCE
A reading travels from the sensor to the dashboard in seven steps. Everything else on this page either feeds that path (baselines, models, the nearby network) or reads from it.
- WS-2902Sensor at the station
- Ambient cloudWi-Fi upload
- wx-pollerEvery 5 minutes
- DynamoDB13 tables
- wx-apiOn request
- CloudFront5-minute cache
- DashboardCloudflare Worker
Scheduled jobs around that path:
| Job | Runs | Writes to |
|---|---|---|
wx-poller | Every 5 minutes | wx-readings, wx-daily-stats, wx-uhi-seasonal; wx-nearby-snapshots every 30 minutes |
wx-alerter | Every 15 minutes | wx-alerts |
wx-forecaster | Every 30 minutes | wx-forecasts, wx-forecast-accuracy |
wx-archiver | Daily, 04:30 UTC | S3 readings archive |
wx-summarizer | Daily, 05:00 UTC | wx-daily-summaries |
WxClimateUpdater | Daily, 06:00 UTC | wx-climate-doy |
wx-records-tracker | Sundays, 02:00 UTC | wx-station-records |
wx-ml-fitter | Sundays, 03:00 UTC | wx-ml-models |
wx-api | On request | Reads only |
DATA COLLECTION: THE CATHAUS STATION
The station is an Ambient Weather WS-2902 (opens in a new tab) mounted at the property, callsign CatHaus. On the dashboard, every reading or signal tagged CATHAUS comes from this station: its raw sensors plus the in-house statistics and ML layer (anomalies, comfort score, analog forecast, records) described below. It transmits readings every 5 minutes to Ambient Weather's cloud via a local Wi-Fi gateway.
The same station is registered with three public networks:
| Network | ID | Live readings |
|---|---|---|
| Ambient Weather | CatHaus | ambientweather.net (opens in a new tab) |
| Weather Underground | KNYNEWYO2140 | wunderground.com (opens in a new tab) |
| Windy.com (opens in a new tab) | 0Gpj0rbF | Windy station map |
| NOAA CWOP (opens in a new tab) | GW7880 | findu.com (opens in a new tab) |
The Windy and CWOP feeds are pushed by a separate Google Apps Script forwarder that reads the same Ambient Weather cloud record, so they run independently of the AWS pipeline described below. Windy receives an observation every 5 minutes; CWOP packets are relayed into APRS-IS via cwop.aprs.net.
A scheduled AWS Lambda (wx-poller) fires every 5 minutes via EventBridge and calls the Ambient Weather REST API for the latest reading ({mac} is the station's device address; the keys come from Secrets Manager):
GET https://api.ambientweather.net/v1/devices/{mac}
?apiKey=<key>&applicationKey=<key>&limit=1 Each reading includes:
| Field | Description |
|---|---|
tempf | Outdoor temperature (°F) |
feelsLike | Feels-like temperature (wind chill or heat index) |
humidity | Relative humidity (%) |
dewPoint | Dew point temperature (°F) |
windspeedmph | 10-minute average wind speed (mph) |
windgustmph | Peak wind gust in the last 10 minutes (mph) |
winddir | Wind direction (0 to 360°) |
baromrelin | Relative barometric pressure (inHg) |
solarradiation | Solar radiation (W/m²) |
uv | UV index (0 to 11+) |
hourlyrainin | Rainfall rate in the current hour (in/hr) |
dailyrainin | Total rainfall since local midnight (in) |
On each poll, the poller also fetches the current METAR urban heat delta from NOAA (see Seasonal UHI curve) and appends it as a uhi_delta field on the reading before storing it. Raw readings are written to DynamoDB (wx-readings) with a 90-day TTL.
SOURCE VALIDATION
Before storing a reading, the poller runs two quality checks:
- Range check: each field is tested against physical bounds (temperature −40°F to 130°F, humidity 0 to 100%). Fields that fall outside the bounds are nulled and the reading is flagged
range_error. - Stuck sensor detection: if the last 6 temperature readings are identical, the reading is flagged
stuck. This catches a common failure mode in home weather stations where the outdoor sensor freezes on a stale value.
Flagged readings are still stored in wx-readings so the history is complete, but they are excluded from baseline updates. The dashboard shows a banner when the station data is stale or suspect.
HISTORICAL BACKFILL: WEATHER UNDERGROUND
When the station was first set up, the baseline table had no station data. To bootstrap it with real hyperlocal history, a one-time backfill script fetched 90 days of 5-minute readings from Weather Underground's PWS history API for this station's own Weather Underground ID (KNYNEWYO2140):
GET https://api.weather.com/v2/pws/history/all
?stationId=KNYNEWYO2140&format=json&units=e
&date=20260115&apiKey=<key> In January 2026 this produced 24,914 readings going back 90 days, which were written to wx-readings and used to seed the wx-daily-stats rolling averages. The baseline is now grounded in real local station data rather than climate reanalysis alone.
BASELINES: OPEN-METEO ERA5
Anomaly labels ("8.2°F above average for 9am in April") require historical climate normals for this exact location. The initial seed uses Open-Meteo's ERA5 reanalysis archive, ECMWF's climate reanalysis dataset, actual measured atmospheric data going back to 1940, free and public. Wherever the dashboard tags a value (ERA5), that number is benchmarked against this reanalysis baseline rather than the station's own history.
A bootstrap Lambda fetches the 14th of each month for 2019 to 2023 (5 years × 12 months) at the station's coordinates and averages the hourly values into per-month-per-hour climate normals:
GET https://archive-api.open-meteo.com/v1/archive
?latitude=40.7549&longitude=-73.984
&start_date=2021-04-14&end_date=2021-04-14
&hourly=temperature_2m,relativehumidity_2m,
windspeed_10m,surface_pressure
&temperature_unit=fahrenheit&windspeed_unit=mph This produces 288 baseline slots (12 months × 24 hours) stored in wx-daily-stats, weighted as 288 samples. Real station readings blend in via a rolling weighted average. After a few months the baselines are fully derived from the station itself.
TODAY IN HISTORY: HISTORICAL CLIMATE CONTEXT
Separate from the rolling-average baseline system, the dashboard surfaces a deeper historical perspective: how does today's temperature rank against every recorded year at Central Park? This uses two independent data sources: NOAA GHCN-Daily (Global Historical Climatology Network) for 156 years of station records, and ERA5 reanalysis for 85 years of hourly distribution data.
NOAA GHCN-Daily (daily high/low context). Station USW00094728 ("NY CITY CNTRL PARK") has daily temperature records going back to 1869. The data is fetched directly from NOAA's public S3 bucket in long format and parsed into per-DOY (day-of-year) distributions:
s3://noaa-ghcn-pds/csv/by_station/USW00094728.csv
# format: ID, DATE (YYYYMMDD), ELEMENT, DATA_VALUE, ...
# elements: TMAX, TMIN, AWND (daily high, low, avg wind) A bootstrap Lambda (WxClimateBootstrap) runs once to load all years, compute per-DOY statistics, and write them to the wx-climate-doy DynamoDB table, 366 rows keyed by MMDD. A nightly Lambda (WxClimateUpdater) refreshes the current year's data each night. Each row stores:
- annual_highs: array of
{year, tmax, tmin, awnd}for every recorded year, used for "warmest since YEAR" narratives - p5/p25/p50/p75/p95: percentile distribution of historical daily highs and lows
- mean/std: mean and standard deviation for normal CDF lookups
- sample_count: number of years contributing to the distribution
On each /current request, climate_context.py calls daily_verdict() to rank the current station's confirmed daily high against the full historical distribution. The result produces statements like "Warmest April 13th since 1987, 95th percentile", scanning the year-descending record to find the most recent year that exceeded today's high.
ERA5 hourly distribution (live percentile context). A second table, wx-climate-hourly, stores 8,784 slots (366 DOY × 24 hours), each containing the ERA5 hourly distribution for temperature, dew point, and wind speed at this exact coordinate going back to 1940. These are loaded once by WxClimateBootstrap from the Open-Meteo archive API. live_context() in climate_context.py uses a normal CDF against the slot's mean and std to express the current reading as a percentile: "currently 91st percentile for this hour on April 13th in 85 years of records."
Headline priority. anomaly_headline() prefers the NOAA GHCN verdict (when a confirmed daily high is available) over the ERA5 live percentile. Both are included in the /current response under climate_context. The dashboard's deviation bar visualizes the span from p5 to p95, with a tick at the historical average and a dot at today's value.
ANOMALY SCORING
On every /current request, the API looks up the baseline for the current month and hour (New York local time) and computes a delta:
delta = current_value − rolling_avg_value
label = "8.2°F above average for 9am in April" Anomalies are computed for temperature, humidity, wind speed, and UV index. The dashboard surfaces the most notable one as a headline subline beneath the main temperature. Baselines are keyed by MM-HH (month and local hour). When a NOAA GHCN verdict is available, it takes precedence over the rolling-average anomaly label in the headline. The two systems run in parallel and complement each other.
SEASONAL UHI CURVE
The urban heat island (UHI) delta is this station's temperature minus the average of the three airport METAR (aviation weather report) readings at JFK, LGA, and EWR. On every 5-minute poll, the poller calls the NOAA METAR endpoint, computes the delta, and updates two stores: the uhi_delta field on the reading in wx-readings, and the per-month rolling average in wx-uhi-seasonal.
wx-uhi-seasonal stores one row per calendar month (01 to 12), keyed by station ID and month. Each row holds a capped rolling average (max 10,000 samples per month) so the curve reflects the current year's observations rather than a multi-year stale mean.
The dashboard shows the typical UHI delta for the current month once at least 10 readings exist for that month. The full 12-month curve is available in the /current API response as uhi_seasonal_curve[].
CHART ANOMALY BANDS
The chart plots six metrics: temperature, humidity, wind, wind gust, pressure, and urban heat, over 12 hours, 24 hours, 7 days, or 30 days. All times on the chart read in New York time.
In addition to the dashed baseline overlay, the history chart shows a shaded ±1σ (one standard deviation) band for each metric. The upper and lower edges of the band are baseline ± std_dev, where the standard deviation is computed incrementally by the poller using Welford's online algorithm:
new_var = (old_var × n + (x − old_mean) × (x − new_mean)) / (n + 1) This allows variance to be updated in O(1) per reading without storing all historical values. Once the rolling sample count reaches 8,640 (30 days × 288 readings/day), the algorithm transitions to exponential moving average variance to prevent very old data from dominating:
new_var = (1 − α) × old_var + α × (x − old_mean)² The resulting std_{field} values are stored per MM-HH baseline slot and attached to history readings by the API. The dashboard draws the band as a translucent fill between the upper and lower edges.
SIGNALS
Five signals are computed in-house on every /current request. Each is specific to this station's location, baseline, and accumulated history.
| Signal | Method | Output |
|---|---|---|
| Comfort score | Composite of feels-like deviation from 71°F, humidity, wind speed, UV, and rain rate. Season-weighted (UV matters more in summer, wind in winter). Adjusted by temperature anomaly against this station's rolling baseline. | 0 to 100 and a label (Excellent, Good, Fair, Poor, Harsh) |
| Percentile rank | Current temperature expressed as a percentile against this station's historical distribution for the same month. Uses a normal CDF approximation with season-calibrated standard deviations (winter σ=9.5°F, summer σ=6.0°F). | 1st to 99th percentile and a label ("one of the warmest days on record here") |
| Rain probability | Logistic regression (p = σ(w·x + b)) on humidity, 1-hour pressure trend, dew-point depression, and time of day. Fitted weekly; see Rain probability model. Boosted while it is already raining. | 1 to 99% and a label (Unlikely, Slight chance, Possible, Likely, Very likely) |
| Urban heat | This station's temperature minus the three-airport METAR average; see Seasonal UHI curve. | ±°F delta, a direction label, and the typical delta for the month |
| Analog forecast | Nearest-neighbour pattern matching on 90 days of hourly data; see Analog forecast. | +1h, +2h and +3h for temperature, humidity, wind and pressure, with a confidence % |
RAIN PROBABILITY MODEL FITTING
A scheduled Lambda (wx-ml-fitter) runs every Sunday at 3:00 UTC. It scans all 90-day readings, labels each reading with whether measurable rain (hourlyrainin > 0.01) occurred in any reading within the following 60 minutes, then fits logistic regression via gradient descent with L2 regularization (300 epochs, learning rate 0.05).
Rain events are rare (about 8 to 9% of readings), so training uses class weighting: positive examples (rain) are upweighted by n_neg / n_pos. This produces a recall-biased model, appropriate for weather, where a missed rain event is worse than a false alarm.
Fitted weights are stored in wx-ml-models. On the next wx-api cold start, ml.py loads them and uses them for all subsequent calls in that warm instance. The model is only stored if F1 ≥ 0.05; otherwise the heuristic coefficients remain active. Training metrics (accuracy, precision, recall, F1, confusion matrix) are stored alongside the weights.
Current model, trained Oct 18, 2026: 24,608 training examples, F1 0.484, recall 90%, precision 33%. Read live from /health (opens in a new tab) when this page loads. Recall is the share of rain onsets the model sees coming within the hour; precision is the share of its warnings that turn into measurable rain.
SPATIAL RAIN BOOST
When nearby station data is available, the rain probability estimate is augmented with a spatial boost from upwind stations. A station is considered "upwind" if its bearing from the home station falls within ±60° of the current wind direction. The boost formula is:
boost = min(0.35, √rain_rate × 0.25 / distance_mi) where rain_rate is in inches per hour and distance_mi is the straight-line distance. The boost is additive to the logistic regression base probability (capped at 0.99). When a boost is applied, the rain probability card names the contributing station ("<label>, from <station>").
Once 100 or more nearby snapshots exist, the weekly fitter also trains spatial features as explicit model inputs. The runtime boost above applies only while the base 5-feature model is in use.
ANALOG FORECAST
A scheduled Lambda (wx-forecaster) runs every 30 minutes and produces a 3-hour forecast from historical pattern matching. The result is pre-computed and served synchronously by the API.
Algorithm:
- Fetch all 90-day readings and bucket into 1-hour averages (about 2,100 hourly buckets across 4 fields).
- The current fingerprint is the last 6 hourly buckets, normalized to [0,1] within physical bounds for Midtown Manhattan.
- For every historical 6-hour window with at least 50% field coverage, compute normalized Euclidean distance to the current fingerprint.
- Take the 5 closest analogs. For each hour ahead, average how much each field changed after the analogs' windows ended, and add that change to the current reading. Using the change rather than the analogs' own values matters: the 90-day pool is mostly late summer, and copying its absolute temperatures ran October forecasts 4 to 10°F warm.
Confidence (0 to 100%) reflects how closely the analogs matched: lower average distance means higher confidence. The best-matching analog date is shown for interpretability. The model improves continuously as new readings expand the pool of candidates.
FORECAST ACCURACY TRACKING
Every forecast wx-forecaster writes also joins a short pending queue on its wx-forecasts row. On each run, any queued forecast at least 4 hours old, so its +1h, +2h, and +3h hours have all closed, is scored: mean absolute error (MAE) for all four forecast fields against the actual hourly readings. It then leaves the queue, so each forecast is scored once.
Each evaluation is written to wx-forecast-accuracy as a timestamped row. A running row in the same table accumulates the incremental mean across all evaluations. Once 5 or more evaluations exist, the dashboard shows the running +1h temperature MAE alongside the confidence percentage.
WEATHER ALERTS
A scheduled Lambda (wx-alerter) runs every 15 minutes and evaluates the latest reading against five anomaly thresholds:
| Alert | Condition | Cooldown |
|---|---|---|
| Unusually warm | Temp > baseline avg + 10°F | 2 hours |
| Unusually cold | Temp < baseline avg − 10°F | 2 hours |
| High wind gust | Gust > avg wind + 20 mph and > 25 mph absolute | 1 hour |
| Rain started | Hourly rain > 0.01"/hr | 30 minutes |
| Rapid pressure drop | Pressure drops > 0.08" in about 1 hour | 2 hours |
Wind gust thresholds are statistically calibrated. The alert fires only when the gust is significantly above the baseline average wind for that hour, not just above a fixed value. Alert state and debounce timestamps are persisted in wx-alerts. Triggered alerts are emailed to the station owner by SES; there is no public subscription. These station alerts are separate from the National Weather Service alerts the dashboard shows as a banner.
DAILY SUMMARIES
A scheduled Lambda (wx-summarizer) runs daily at 05:00 UTC (1 AM ET in summer, midnight in winter). It processes the last 30 calendar days idempotently, safe to rerun without duplicating data. For each day it computes high, low and average temperature, total rainfall, max wind gust, and average comfort score, then generates a 2 to 3 sentence prose description of the day.
Prose generation is deterministic. It selects sentence templates based on temperature spread, rain event count and peak intensity, and notable wind. Rain event detection parses the 5-minute readings to find contiguous rain periods (rate > 0.01"/hr), grouping them by start time, duration, total accumulation, and peak rate.
The most recent summary appears on the dashboard below the Conditions grid and the Today in History panel. The full 30-day series also fills the Comfort Calendar, a heatmap grid where each day is colored from red at 0 through yellow at 50 to green at 100 based on the daily average comfort score.
Results are stored in wx-daily-summaries (keyed by station ID and date) and exposed via GET /daily-summaries (opens in a new tab).
STATION RECORDS
A scheduled Lambda (wx-records-tracker) runs weekly on Sunday at 02:00 UTC. It scans all 90-day clean readings (no quality_flag), groups them by local calendar month, and computes per-month extremes:
| Record | Field |
|---|---|
| Highest temperature | temp_high and date |
| Lowest temperature | temp_low and date |
| Max wind gust | max_gust and date |
| Peak rain rate | max_rain_rate and date (only recorded if > 0.01"/hr) |
| Lowest pressure | min_pressure and date |
| Highest pressure | max_pressure and date |
Records are stored in wx-station-records (keyed by station ID and month). The current month's records are included in every /current response and shown in the Station Records section of the dashboard. As the station accumulates history across multiple years, these records will reflect the full observed range for each calendar month.
RAIN EVENTS
The GET /rain-events (opens in a new tab) endpoint scans recent readings on demand and parses them into discrete rain events. A rain event begins when hourlyrainin > 0.01 (in/hr) and ends when the rate returns to zero for a 5-minute interval. For each event the API returns:
- start: ISO timestamp of the first wet reading
- duration_min: total length of the rain event in minutes (5-minute resolution)
- total_in: accumulated rainfall in inches (
sum(rates) × 5/60) - peak_rate: highest hourly rate observed during the event (in/hr)
Small events (<0.01") that result from sensor noise are naturally excluded by the rate threshold. Rainfall totals are also surfaced in the daily summaries and Comfort Calendar.
ContentsEXTERNAL SOURCES
A few sections on the dashboard come from outside the station and carry their source's tag:
- Apple WeatherKit: the next-12-hours strip (refreshed every 30 minutes) and tomorrow's summary (updated every 15 minutes), both for 40.75°N, 73.98°W.
- National Weather Service: active alerts for the station coordinates, shown as a banner above the readings when any are in effect.
- NOAA ASOS: airport readings from JFK, LGA, and EWR, used for the urban heat delta.
- Weather Underground: nearby personal weather stations, described next.
NEARBY STATIONS
Every 30 minutes, alongside the primary station reading, the poller fetches up to 20 nearby Personal Weather Stations from the Weather Underground API using the geocode endpoint (centered on 40.7549°N, 73.984°W). Stations that are not reporting, whose last report is more than 2 hours old, or that report without a temperature are dropped, as is the home station itself (distance < 0.05 mi). The rest are sorted by distance, and the snapshot (station ID, temperature, humidity, rain rate, wind, bearing, and distance) is written to the wx-nearby-snapshots DynamoDB table with a 30-day TTL.
The /nearby (opens in a new tab) API endpoint returns the most recent snapshot. The dashboard Nearby Stations strip shows every station in it, closest first, each with its current temperature, rain rate, and how far it sits from this station and from the network as a whole.
Network variance ratio
An absolute temperature from a neighbouring station is hard to read on its own, and so is a raw difference. Two degrees of separation is noise on a gusty afternoon when the boroughs disagree by five, and it is a real signal on a still night when they agree within half a degree. So each reading is also expressed as a ratio against the spread of the network itself.
The center is the median of the nearby temperatures and the unit is a scaled median absolute deviation (MAD × 1.4826, which puts it on the same footing as a standard deviation for normally distributed data). Both are computed over the nearby stations only, with the home station excluded so it cannot inflate the very dispersion it is measured against. The unit is floored at 0.3°F, roughly the noise floor of a consumer thermometer, so a network in tight agreement cannot drive the ratio to infinity. At least 3 usable readings are required; below that the deltas still render but the ratios report null rather than a fabricated number.
The robust estimator is deliberate. This is a network of consumer-grade stations and it reliably contains at least one thermometer sitting in direct sun or reporting from indoors. On live data a single such station, 19°F off the pack, inflated a conventional standard deviation by roughly a quarter, which pulled every other station's ratio toward zero and masked the divergence the ratio exists to surface. Median and MAD are unmoved by it. The conventional mean and standard deviation are still returned in the payload for reference, and any station more than 3σ from the center is flagged as suspect rather than silently dropped.
Each station carries temp_delta_f (against our station, the reading this page is built around) and temp_ratio (against the network center, because a station's credibility is a question about the network rather than about us). The nearby_variance block on /current summarises the whole network and locates our own station inside it.
API REFERENCE
The API at api.wx.jamestannahill.com is public and read-only, with no authentication. All responses are JSON (except CSV export). CloudFront caches every endpoint for 5 minutes, keyed by path and query string, and CORS is open (Access-Control-Allow-Origin: *).
curl https://api.wx.jamestannahill.com/current
# trimmed response
{
"timestamp": "2026-10-18T23:07:57+00:00",
"tempf": 56.1,
"humidity": 41.0,
"condition": "Cloudy",
"anomalies": {
"temp": { "delta": -3.9, "label": "3.9°F below average for 7pm in mid October" }
},
"comfort": { "score": 76, "label": "Good" },
"rain_probability": { "probability": 8, "label": "Unlikely" },
"uhi_delta": 0.8,
"data_stale": false,
"quality_flag": null
} | Endpoint | Returns |
|---|---|
| Live | |
GET /current (opens in a new tab) | Latest reading with every in-house signal: condition, anomalies, percentile rank, comfort score, rain probability, UHI delta and seasonal curve, analog forecast, yesterday’s summary, this month’s records, nearby network, and climate_context (NOAA GHCN verdict and ERA5 hourly percentile). |
GET /nearby (opens in a new tab) | Most recent snapshot of nearby Manhattan personal weather stations. |
GET /alerts (opens in a new tab) | Active NWS alerts for the station’s area. |
| History | |
GET /history?hours=N (opens in a new tab) | Last N hours of readings (default 24, max 720), downsampled for longer ranges. Each reading carries baseline_{field} and baseline_std_{field} for the chart overlay and ±1σ band. |
GET /rain-events?days=N (opens in a new tab) | Rain events from the last N days (default 30, max 90), each with start, duration_min, total_in and peak_rate. |
GET /daily-summaries?days=N (opens in a new tab) | Daily summaries from the last N days (default 30, max 365): high, low and average temperature, total rain, max gust, average comfort score and a prose summary. |
GET /export?days=N&format=csv (opens in a new tab) | Raw readings for the last N days (default 7, max 90) as json (default) or csv. |
| Derived | |
GET /forecast (opens in a new tab) | Analog forecast for the next 3 hours, with its running accuracy once enough evaluations exist. |
GET /records (opens in a new tab) | Station records: highs, lows, gusts, rain rate and pressure extremes. |
GET /climate-context (opens in a new tab) | NOAA GHCN and ERA5 climate context for today. |
| Meta | |
GET /health (opens in a new tab) | Data freshness, poller health and the rain model’s current training metrics. |
GET /openapi.json (opens in a new tab) | OpenAPI description of this API. |
Missing values. A field the sensor did not report, or a signal without enough history yet (for example forecast accuracy before 5 evaluations, or network ratios with fewer than 3 nearby stations), is returned as null rather than left out. Range-checked readings carry quality_flag (range_error or stuck), and data_stale is true when the newest reading is more than 15 minutes old.
Errors. Failures return a JSON body with an error string: 404 for an unknown path or a resource that does not exist yet (such as /forecast before the first run), 500 for a server error, and 503 from /health when the newest reading is more than 15 minutes old.
DOWNSAMPLING FOR LONGER RANGES
The /history endpoint accepts up to 720 hours (30 days). To keep payloads manageable, readings are automatically bucketed:
- Up to 24h: raw 5-minute readings (about 288 points)
- 25 to 168h (7 days): hourly averages (about 168 points)
- Over 168h (30 days): daily averages (about 30 points)
Numeric fields are averaged within each bucket. The timestamp is the floor of the bucket boundary. Per-slot baselines are batch-fetched from wx-daily-stats and attached to each reading so the chart can overlay the historical normal line.
INFRASTRUCTURE
Everything runs on AWS in us-east-1. Estimated cost in October 2026: about $4 to $6 a month.
- DynamoDB (on-demand, 13 tables):
wx-readings(90-day TTL),wx-daily-stats(baselines and std dev),wx-baselines,wx-alerts,wx-forecasts,wx-forecast-accuracy,wx-uhi-seasonal,wx-ml-models,wx-daily-summaries,wx-station-records,wx-nearby-snapshots(30-day TTL),wx-climate-doy(366 rows),wx-climate-hourly(8,784 rows) - Lambda (Python 3.12, arm64, 11 functions): the nine in the schedule, plus the one-time loaders
wx-bootstrapandWxClimateBootstrap - API Gateway HTTP API: routes every endpoint in the API reference to the API Lambda
- CloudFront: in front of the API Gateway
- Cloudflare Workers: the Astro dashboard (server-rendered) and the edge-rendered OG image
- S3: long-term readings archive (moves to Glacier after 365 days), and the NOAA GHCN-Daily CSV source (
noaa-ghcn-pds, public bucket) - EventBridge: triggers all scheduled Lambdas
- SES: outbound email for station alerts
- Secrets Manager: Ambient Weather API keys and station config