Menu

[Solved]Blockpy 494 Weather Forecast Previous Question Retrieved Current Temperature External Webs Q37094607

BlockPy: #49.4) Weather Forecast

In a previous question, you retrieved the current temperaturefrom an external website using the Request module. However, thatsite also makes the entire temperature forecastavailable.”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 databehind the URL. This JSON data is organized as a dictionary ofdictionaries of lists. The current forecasted temperatures can befound by accessing the “data” key, then the “temperature” key. Notethat they store these values as strings, so you will need toconvert them with the int built-in function. Store the integertemperatures in a variable, plot that variable as a line plot, andgive meaningful labels to the axes and a title.

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

Can Not use map function

Expert Answer


Answer to BlockPy: #49.4) Weather Forecast In a previous question, you retrieved the current temperature from an external website … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *