Question: Python In a previous question, you retrieved the current temperature from an external website using the Request module. However, that site also makes the entire

Python

In a previous question, you retrieved the current temperature from an external website using the Request module. However, that site also makes the entire temperature forecast available."http://forecast.weather.gov/MapClick.php?lat=37.2327&lon=-80.4284&unit=0&lg=english&FcstType=json"

Use this URL and the requests module to access the JSON data behind the URL. This JSON data is organized as a dictionary of dictionaries of lists. The current forecasted temperatures can be found by accessing the "data" key, then the "temperature" key. Note that they store these values as strings, so you will need to convert them with the int built-in function. Plot these temperatures as a line plot, giving meaningful labels to the axes and a title.

Note that the graph shown will be the cached version of the data. You can run this code on your own computer to see the latest weather forecast and plan your week accordingly.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!