Where does the history API pull data from when State/City is specified in the history call?

  • 1
  • Question
  • Updated 4 years ago
When using the history API, the State/City is used as the location qualifier, not a specific Station ID. The question is, how does the API determine the history values when there are many Station IDs in a State/City? E.g. is the temperature max/min/avg from some default Station ID or an aggregation of many Station IDs?
TIA
Photo of Mark850

Mark850

  • 3 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Tim Roche

Tim Roche, Official Rep

  • 322 Posts
  • 29 Reply Likes
The history is always for a discreet location at the moment, it is an observation from a station, not an interpolated value, though that may change in the future.

If there is a "metar" field in the response, the 4 character id METAR KUKI 

is the airport identifier.  If that field is absent, the observation comes from a Personal Weather Station.  The API will generally return an airport location unless you specify a PWS with the q/pws:kxxxxxxx99.json request format.  
Photo of Mark850

Mark850

  • 3 Posts
  • 0 Reply Likes
Perfect, thanks for the timely response.