Skip to content

Instantly share code, notes, and snippets.

@vigevenoj
Created November 27, 2018 06:28
Show Gist options
  • Save vigevenoj/9bfc314b7c88a3fb55871d368f953168 to your computer and use it in GitHub Desktop.
Save vigevenoj/9bfc314b7c88a3fb55871d368f953168 to your computer and use it in GitHub Desktop.
current temperature of the Willamette River by the Morrison Bridge in PDX
import requests
import json
url = "https://waterservices.usgs.gov/nwis/iv/?site=14211720&format=json"
response = requests.get(url)
# there's probably a better way to get here than this blob
data = response.json()['value']['timeSeries'][0]['values'][0]['value']
print(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment