History data query doesn't return 24 hours of data for coordinates

  • 1
  • Question
  • Updated 6 years ago
Hi! I've been looking for a similar question, but haven't found one. I am making a call to get history data for the given coordiantes. The json object is returned, but it doesn't contains all the hourly values for that day which I need. (I'm reading the hours from the date object inside the observations array) Any help is appreciated thanks!

This is the call I'm trying (replace mykey with valid key):

api.wunderground.com/api/mykey/history_20121201/q/37.413,-122.149.json
Photo of psantos

psantos

  • 8 Posts
  • 2 Reply Likes

Posted 6 years ago

  • 1
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
The best way to figure this out is to look at the comparable data on wunderground.com:
www.wunderground.com/history/airport/...

Not every station reports for every hour. Some report more, some report less. For the most part its every hour but not 100% consistent. It looks like that station does not have consistent update times or hours, reporting mainly during "daytime" hours.
Photo of psantos

psantos

  • 8 Posts
  • 2 Reply Likes
Many thanks for your response! The solution I found was to use a specific weather stations (in my case: KCAPALOA9 which is the closest station to my coordinates) instead of the coordinates. The weather station reports many values through all 24 hours; I just used the ones of interest and ignored the ones I didn't needed.
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
Right on. When you include /geolookup/ in your API request you'll always see the nearby PWS and NWS stations (as airports, cause most are at airports). Passing lat/lon will always get you the "official history" which comes from NWS.