Inconsistent Data between API and Observational History webpage #374
Replies: 3 comments
-
This appears to be a timestamp misunderstanding on my part, the API responds with UTC, not the timezone of the station which you are requesting. This request with -05:00 appended works: It may be helpful to add a note on the API Web Service page that all times returned are in UTC. Under specifications it notes that
I may be splitting hairs but maybe "All times generated by the API are in ISO-8601 format and default to UTC." is clearer. Thanks! |
Beta Was this translation helpful? Give feedback.
-
The times do not necessarily default to UTC. This is why we present all times in ISO8601 and include the time zone offset. |
Beta Was this translation helpful? Give feedback.
-
That makes sense, thanks for the clarification! |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I am receiving inconsistent data between what is returned from API calls and what is shown on the NWS observational history page. I am particularly looking at precipitation data however temperature and other values are inconsistent as well.
I have tried double checking metric vs imperial measurement pages and receive "null" where the direct link shows precipitation values. I have found this issue with stations, ID: "KOKV" & "KW99"
To Reproduce
API request:
https://api.weather.gov/stations/KOKV/observations?limit=300
returns JSON with several values inconsistent with what is shown on the observational history page:
https://forecast.weather.gov/data/obhistory/metric/KOKV.html
A particular example as this may be harder to reproduce after several days of no precipitation:
https://api.weather.gov/stations/KOKV/observations/2020-01-18T15:55:00+00:00
:The image below shows "0.03" in the 1 Hour Precipitation (cm) field:
Expected behavior
Consistency between data returned from casual browsers of stations' observational history and API users.
Environment
These API calls were repeated in Firefox 71.0 (64-bit), the API Web Service page "Try It Out" feature,
curl
command line utility (Ubuntu 18.04 WSL), and PowerShellInvoke-WebRequest
.Beta Was this translation helpful? Give feedback.
All reactions