hermes-explorigin 32f749444e Add NWS (National Weather Service) as a selectable data source preference
- New Settings > Data source toggle (Open-Meteo global / NWS US); NWS
  falls back to Open-Meteo when unavailable or outside its coverage.
- src/lib/api/nws.js: /points -> forecast/hourly/grid normalizer producing
  the app's shared shape, with realistic air highs (NWS reports 104 for the
  day Open-Meteo over-forecasts at 116); heat-index/feels-like falls back to
  air temp since NWS returns apparentTemperature as null here.
- NWS requires a User-Agent contact; email is a build-time Vite env
  (VITE_NWS_EMAIL), read from gitignored .env.local, never committed.
- Details view now shows which provider served the data.
- Fixes the identical UTC date-parse shift for NWS naive local times.
- Tests (8) + recorded live fixtures for Rogers County, OK.
2026-08-16 20:14:07 +00:00

112 lines
3.8 KiB
JSON

{
"@context": [
"https://geojson.org/geojson-ld/geojson-context.jsonld",
{
"@version": "1.1",
"wx": "https://api.weather.gov/ontology#",
"s": "https://schema.org/",
"geo": "http://www.opengis.net/ont/geosparql#",
"unit": "http://codes.wmo.int/common/unit/",
"@vocab": "https://api.weather.gov/ontology#",
"geometry": {
"@id": "s:GeoCoordinates",
"@type": "geo:wktLiteral"
},
"city": "s:addressLocality",
"state": "s:addressRegion",
"distance": {
"@id": "s:Distance",
"@type": "s:QuantitativeValue"
},
"bearing": {
"@type": "s:QuantitativeValue"
},
"value": {
"@id": "s:value"
},
"unitCode": {
"@id": "s:unitCode",
"@type": "@id"
},
"forecastOffice": {
"@type": "@id"
},
"forecastGridData": {
"@type": "@id"
},
"publicZone": {
"@type": "@id"
},
"county": {
"@type": "@id"
}
}
],
"id": "https://api.weather.gov/points/36.3567,-95.8146",
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-95.8146,
36.3567
]
},
"properties": {
"@id": "https://api.weather.gov/points/36.3567,-95.8146",
"@type": "wx:Point",
"cwa": "TSA",
"type": "land",
"forecastOffice": "https://api.weather.gov/offices/TSA",
"gridId": "TSA",
"gridX": 48,
"gridY": 114,
"forecast": "https://api.weather.gov/gridpoints/TSA/48,114/forecast",
"forecastHourly": "https://api.weather.gov/gridpoints/TSA/48,114/forecast/hourly",
"forecastGridData": "https://api.weather.gov/gridpoints/TSA/48,114",
"observationStations": "https://api.weather.gov/gridpoints/TSA/48,114/stations",
"relativeLocation": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-95.8617563,
36.3692625
]
},
"properties": {
"city": "Collinsville",
"state": "OK",
"distance": {
"unitCode": "wmoUnit:m",
"value": 0
},
"bearing": {
"unitCode": "wmoUnit:degree_(angle)",
"value": 0
}
}
},
"forecastZone": "https://api.weather.gov/zones/forecast/OKZ060",
"county": "https://api.weather.gov/zones/county/OKC143",
"fireWeatherZone": "https://api.weather.gov/zones/fire/OKZ060",
"timeZone": "America/Chicago",
"radarStation": "KINX",
"astronomicalData": {
"sunrise": "2026-08-16T06:42:13-05:00",
"sunset": "2026-08-16T20:12:46-05:00",
"transit": "2026-08-16T13:27:29-05:00",
"civilTwilightBegin": "2026-08-16T06:15:02-05:00",
"civilTwilightEnd": "2026-08-16T20:39:57-05:00",
"nauticalTwilightBegin": "2026-08-16T05:42:19-05:00",
"nauticalTwilightEnd": "2026-08-16T21:12:40-05:00",
"astronomicalTwilightBegin": "2026-08-16T05:07:54-05:00",
"astronomicalTwilightEnd": "2026-08-16T21:47:05-05:00"
},
"nwr": {
"transmitter": "KIH27",
"sameCode": "040143",
"areaBroadcast": "https://api.weather.gov/radio/KIH27/broadcast",
"pointBroadcast": "https://api.weather.gov/points/36.3567,-95.8146/radio"
}
}
}