5 ms·
The API does not seem that bad at all. Maybe it's been improved? https://www.weather.gov/documentation/services-web-api https://www.weather.gov/documentation/s
by ddevault 7y ago
The API does not seem that bad at all. Maybe it's been improved?
https://www.weather.gov/documentation/services-web-api https://www.weather.gov/documentation/services-web-api
You can turn lat/long into a grid point:
https://api.weather.gov/points/39.7456,-97.0892 https://api.weather.gov/points/39.7456,-97.0892
Then a grid point into a forecast:
https://api.weather.gov/gridpoints/TOP/31,80/forecast https://api.weather.gov/gridpoints/TOP/31,80/forecast
If you have your own GIS you can presumably store the grid points yourself.
- Wowfunhappy 7y agoOh, it's JSON! How did you get JSON? When I was looking I could only find XML, which I wasn't willing to deal with. Shame it's US only...
- kevindong 7y agoIf you don't have precipitation data, then I would agree that it's fine. Their hourly forecast data is quite friendly. But I wanted precipitation data so I had to use this endpoint: https://api.weather.gov/gridpoints/TOP/31,80 https://api.weather.gov/gridpoints/TOP/31,80 That endpoint groups hour-by-hour forecasts (see below) together to deduplicate data, but it makes it very painful to parse. For instance, "2020-03-31T15:00:00+00:00/PT4H" means that value is valid for 4 hours beginning at 2020-03-31T15:00:00+00:00. The durations varied from time interval to time interval and it made it super annoying to parse through. { "validTime": "2020-03-31T15:00:00+00:00/PT4H", "value": 0 }, { "validTime": "2020-03-31T19:00:00+00:00/PT1H", "value": 2 }, { "validTime": "2020-03-31T20:00:00+00:00/PT3H", "value": 4 },