API returns incorrect negative temperatures for Personal Weather Station ISOUTHAU307

  • 1
  • Problem
  • Updated 2 years ago
I noticed that the following API call returns incorrect observations. Note how an incorrect temperature of -573.3 is reported multiple times in the json:  http://api.wunderground.com/api/API_KEY/history_20160710/q/pws:ISOUTHAU307.json
Photo of Nikhil Saraf

Nikhil Saraf

  • 4 Posts
  • 0 Reply Likes

Posted 2 years ago

  • 1
Photo of Nikhil Saraf

Nikhil Saraf

  • 4 Posts
  • 0 Reply Likes
I'm aware that -999 is treated as bad data (implying null), but why would the API return -573.3?
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
That station was sending bad data.  You can see it here: https://www.wunderground.com/personal-weather-station/dashboard?ID=ISOUTHAU307#history/s20160711/e20...

There's always the potential for a PWS to send bad data.  When calling the history to a specific personal weather station, you will see all the obs they sent, even the bad ones.
Photo of Nikhil Saraf

Nikhil Saraf

  • 4 Posts
  • 0 Reply Likes
Thanks for your reply. Is there a way to figure out which observation is bad? I mean had it been -999, we (API consumer) could have ignored it right away. But it's difficult to figure out if -573.3 or matter fact any (negative) magic number is bad data unless we put in some kind of tolerance (?)
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 122 Reply Likes
You'd need to add a tolerance.  We treat the data as raw data and the result can be garbage in/garbage out.  We don't clean the history data, we want to hold all the data for the PWS owner, even if its bad.  The best thing to do is put a tolerance where you display the data.
Photo of Nikhil Saraf

Nikhil Saraf

  • 4 Posts
  • 0 Reply Likes
Thank you, Brendan.