Created
April 20, 2017 17:18
-
-
Save QuantumDamage/1e2611fd922c457245cb38fabb8c00db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensorId = 4727 | |
r = requests.get('http://api.gios.gov.pl/pjp-api/rest/data/getData/' + str(sensorId)) | |
concentration = json_normalize(r.json()) | |
concentrationFrame = pd.DataFrame() | |
concentrationFrame["dates"] = [d[u'date'] for d in concentration["values"].values.item()] | |
concentrationFrame["values"] = [d[u'value'] for d in concentration["values"].values.item()] | |
concentrationFrame.set_index(["dates"], inplace=True) | |
concentrationFrame = concentrationFrame.iloc[::-1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment