-
Notifications
You must be signed in to change notification settings - Fork 0
Using wunderground API
As of April 3, 2017:
In order to use wunderground, you must first obtain a key for development. We went with the free option, of course, which limits calls per day to 500 and calls per minute to 10. Thankfully, we don't need nearly that many requests and only call once per hour.
Pulling every hour, we most importantly need 'current_observation' from the JSON response.
Here's an example of pulling the precipitation over the past hour in inches:
response = requests.get(url)
rain_inches = float(response.json()['current_observation']['percip_1h_in']
Note that your URL is your specific query that you can/should build for your own purposes.
And that's it. The requests are much easier to navigate compared to USGS's formatting
GitHubs
Nick Dant | https://github.com/NickDant
Naomi Martinez | https://github.com/dnmartinez
David Shi | https://github.com/dshimo
Sid Srikumar | https://github.com/sid9102
Christy Tran | https://github.com/ChristyTran