- Implement full NWS hourly forecast normalizer (raw.nws.hourly.forecast.v1 → weather.forecast.v1) - Add GeoJSON forecast types and helpers for NWS gridpoint hourly payloads - Normalize temperatures, winds, humidity, PoP, and infer WMO condition codes from forecast text/icons - Treat forecast IssuedAt as EffectiveAt for stable, dedupe-friendly event IDs - Introduce project-wide float rounding at normalization finalization - Round all float values in canonical payloads to 2 decimal places - Apply consistently across pointers, slices, maps, and nested structs - Preserve opaque structs (e.g., time.Time) unchanged - Add SchemaRawNWSHourlyForecastV1 and align schema matching/comments - Clean up NWS helper organization and comments - Update documentation to reflect numeric wire-format and normalization policies This establishes a complete, deterministic hourly forecast pipeline for NWS and improves JSON output stability across all canonical weather schemas.
83 lines
2.4 KiB
YAML
83 lines
2.4 KiB
YAML
---
|
|
sources:
|
|
# - name: NWSObservationKSTL
|
|
# kind: observation
|
|
# driver: nws_observation
|
|
# every: 12m
|
|
# params:
|
|
# url: "https://api.weather.gov/stations/KSTL/observations/latest"
|
|
# user_agent: "HomeOps (eric@maximumdirect.net)"
|
|
|
|
# - name: OpenMeteoObservation
|
|
# kind: observation
|
|
# driver: openmeteo_observation
|
|
# every: 12m
|
|
# params:
|
|
# url: "https://api.open-meteo.com/v1/forecast?latitude=38.6239&longitude=-90.3571¤t=temperature_2m,relative_humidity_2m,weather_code,wind_speed_10m,wind_direction_10m,precipitation,surface_pressure,rain,showers,snowfall,cloud_cover,apparent_temperature,is_day,wind_gusts_10m,pressure_msl&forecast_days=1"
|
|
# user_agent: "HomeOps (eric@maximumdirect.net)"
|
|
|
|
# - name: OpenWeatherObservation
|
|
# kind: observation
|
|
# driver: openweather_observation
|
|
# every: 12m
|
|
# params:
|
|
# url: "https://api.openweathermap.org/data/2.5/weather?lat=38.6239&lon=-90.3571&appid=c954f2566cb7ccb56b43737b52e88fc6&units=metric"
|
|
# user_agent: "HomeOps (eric@maximumdirect.net)"
|
|
|
|
# - name: NWSObservationKSUS
|
|
# kind: observation
|
|
# driver: nws_observation
|
|
# every: 18s
|
|
# params:
|
|
# url: "https://api.weather.gov/stations/KSUS/observations/latest"
|
|
# user_agent: "HomeOps (eric@maximumdirect.net)"
|
|
|
|
# - name: NWSObservationKCPS
|
|
# kind: observation
|
|
# driver: nws_observation
|
|
# every: 12m
|
|
# params:
|
|
# url: "https://api.weather.gov/stations/KCPS/observations/latest"
|
|
# user_agent: "HomeOps (eric@maximumdirect.net)"
|
|
|
|
# - name: NWSForecastSTL
|
|
# kind: forecast
|
|
# driver: nws_forecast
|
|
# every: 1m
|
|
# params:
|
|
# url: "https://api.weather.gov/gridpoints/LSX/90,74/forecast"
|
|
# user_agent: "HomeOps (eric@maximumdirect.net)"
|
|
|
|
- name: NWSHourlyForecastSTL
|
|
kind: forecast
|
|
driver: nws_forecast
|
|
every: 1m
|
|
params:
|
|
url: "https://api.weather.gov/gridpoints/LSX/90,74/forecast/hourly"
|
|
user_agent: "HomeOps (eric@maximumdirect.net)"
|
|
|
|
# - name: NWSAlertsSTL
|
|
# kind: alert
|
|
# driver: nws_alerts
|
|
# every: 1m
|
|
# params:
|
|
# url: "https://api.weather.gov/alerts?point=38.6239,-90.3571&limit=500"
|
|
# user_agent: "HomeOps (eric@maximumdirect.net)"
|
|
|
|
sinks:
|
|
- name: stdout
|
|
driver: stdout
|
|
params: {}
|
|
|
|
# - name: logfile
|
|
# driver: file
|
|
# params:
|
|
# path: "/Users/eric/weatherd.log"
|
|
|
|
routes:
|
|
- sink: stdout
|
|
kinds: ["observation", "forecast", "alert"]
|
|
|
|
# - sink: logfile
|
|
# kinds: ["observation", "alert", "forecast"]
|