5 ms·
As someone that's tried using the weather.gov API, let me just say it's atrociously bad. I'm sure the data is accurate and all, but the API is actively hostile
by kevindong 7y ago
As someone that's tried using the weather.gov API, let me just say it's atrociously bad. I'm sure the data is accurate and all, but the API is actively hostile towards developers.
- ngngngng 7y agoIs that all of Dark Sky's value proposition? They take a beastly API and repackage it into something pleasant?
- rurp 7y agoYou've basically described all commercial weather apps. Dark Sky (and some others) do incorporate other local sources of info, but free govt data covers much/most of what they use.
- globular-toast 7y agoI thought weather underground was crowd sourced from user weather stations.
- applecrazy 7y agoIt's designed that way. AccuWeather and other weather companies actively lobby to make sure that people continue using them, and not the free government sources of weather data. See https://www.cnn.com/2017/10/14/politics/noaa-nominee-accuweather/index.html https://www.cnn.com/2017/10/14/politics/noaa-nominee-accuwea...
- aaronbrethorst 7y agoThankfully, Barry Lee Myers's nomination was finally withdrawn in December 2019, but he won't be the last nominee to pull this sort of thing.
- kube-system 7y agoAnd it's US only.
- ddevault 7y agoThe 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 },