weather-gov / weather.gov

weather.gov 2.0
Other
329 stars 9 forks source link

Learn more about how the API returns data #84

Closed mgwalker closed 1 year ago

mgwalker commented 1 year ago

We've observed some unexpected behavior when using the API and we should understand better how it's deriving data in order to help decide whether the API should be our primary data source.

A specific example. We know that observation station K1HW exists:

From the data returned, we can see that the station is located at -102.83ºE by 41.32ºN. The station is named "Hotel (Gurley)". If we open a map to that location, we'll see that it is indeed near a town called Gurley, Nebraska.

If we now query the API for information about the point where the weather station is located:

We see that this point is located in WFO CYS (Cheyenne, WY), in grid cell x=178, y=17. We will also get a URL that points to a list of observation stations for this point:

Immediately notice that station K1HW is not in the list, despite being literally at this location.

Jittering the location a little bit produces essentially the same result, where K1HW is not in the list of observation stations, but a station over 100 miles away is listed.

colinmurphy01 commented 1 year ago

Adding to backlog as I assume this will be something we should answer either this sprint or next.

colinmurphy01 commented 1 year ago

Schedule convo with Kolly

mgwalker commented 1 year ago
mgwalker commented 1 year ago

From experimentation, we don't want to rely on MADIS's public-facing data feeds. They're slow, a little clunky, and don't provider fresher data than api.weather.gov. The private-facing feeds via LDM and NetCDF may be a different story, though.

That said, MADIS has a contract with Synoptic to do some of the QC and distribution work. The western region is currently using a Synoptic API to show current observations (see the map at https://www.weather.gov/wrh/; in the overlays panel on the right, click the "Observations" tab and turn it on – that is fetching data from the Synoptic API). Maybe we can see about hooking into that API?

mgwalker commented 1 year ago

Gonna close this. There's info in this thread that's useful and we'll probably have ongoing learnings about the API, but there's no reason to just hold this open forever. We accomplished the main goal of the issue, which was figuring out which observation stations the API covers and how it determines which observation stations to include in a list for a given point.