Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help, I'm using Jupyter notebook (basically python) to try and use this dataset provided in the link below to create a histogram

Can someone please help, I'm using Jupyter notebook (basically python) to try and use this dataset provided in the link below to create a histogram and line graph for the precipitation. Please help me create the code to make a histrogram and line plot.

https://think.cs.vt.edu/corgis/json/weather/weather.html

image text in transcribed

In [31] import requests url-"https://think.cs.vt.edu/corgis/json/weather/weather.json" reports = requests.get(ur1).json() In [321: from pprint import pprint pprint(reports[o]) 'Data': 'Precipitation': 0.0, Temperature 'Average': 39, 'Maximum 46, 'Minimum 32), Wind' 'Direction': 33, Speed' 4.33 Date': 'Full2016-01-03',Month': 1, 'Week of': 3, 'Year': 2016), Station': f'City': 'Birmingham, Code BHM, Location Birmingham, AL', State': 'Alabama') In [34]: Temp avg - [ for report in reports: if report [ 'Location'Denver: weather = report [ 'Data'] [Temperature] [Average] weather_temp_rates.append (weather) Traceback (most recent call last) KeyError in ) 1 Temp avg[ 2 for report in reports: if report ['Location'] Denver: weather = report [ 'Data'] [Temperature] [Average] weather temp rates.append (weather) KeyErro 'Location In [31] import requests url-"https://think.cs.vt.edu/corgis/json/weather/weather.json" reports = requests.get(ur1).json() In [321: from pprint import pprint pprint(reports[o]) 'Data': 'Precipitation': 0.0, Temperature 'Average': 39, 'Maximum 46, 'Minimum 32), Wind' 'Direction': 33, Speed' 4.33 Date': 'Full2016-01-03',Month': 1, 'Week of': 3, 'Year': 2016), Station': f'City': 'Birmingham, Code BHM, Location Birmingham, AL', State': 'Alabama') In [34]: Temp avg - [ for report in reports: if report [ 'Location'Denver: weather = report [ 'Data'] [Temperature] [Average] weather_temp_rates.append (weather) Traceback (most recent call last) KeyError in ) 1 Temp avg[ 2 for report in reports: if report ['Location'] Denver: weather = report [ 'Data'] [Temperature] [Average] weather temp rates.append (weather) KeyErro 'Location

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago