Question
Well use the web service from the National Center for Environment Information, formerly the National Climatic Data Center (NCDC), to look at weather data for
Well use the web service from the National Center for Environment Information, formerly the National Climatic Data Center (NCDC), to look at weather data for our area. To access this data, check out their documentation at https://www.ncdc.noaa.gov/cdo-web/webservices/v2
1. Go to the Climate Data Online web service and request a token. Youll use this token to access data.
2. Write a Python script following the documentation for urllib.request (note the example about inserting headers for your token) that will connect to the NCDC data endpoint and download data for a given zip code and date range (e.g., https://www.ncdc.noaa.gov/cdo-web/api/v2/data?datasetid=GHCND&locationid=ZIP:20901&startdate=2017-05-01&enddate=2017-05-02).
3. I need the source code and an excerpt of the downloaded data Please! (NOTE: the data returned by the data endpoint is in JSON, and Pythons json module has a good method for pretty printing JSON, see here: https://docs.python.org/3/library/json.html).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started