8. Using Python to Access Hydrologic Data from Web Services
- Due Nov 13, 2014 by 1:30pm
- Points 100
- Submitting a file upload
- Available after Nov 4, 2014 at 12am
Learning Objectives
- Discover and access data from major hydrologic data sources
- Create reproducible data visualizations
- Write and execute computer code to automate difficult and repetitive data related tasks
- Manipulate data and transform it across file systems, flat files, databases, programming languages, etc.
- Retrieve and use data from Web services
Computer and Data Requirements
- You will need Python and Canopy installed for this assignment. You should have them already from previous assignments.
- The data needed for this assignment are available via a WaterOneFlow web service. You can access the web service at: http://river.sdsc.edu/wateroneflow/NWIS/UnitValues.asmx?WSDL Links to an external site.
Task
Explore the data available from the USGS Unit Values web service, retrieve a time series of discharge, calculate summarized data, and then visualize your outputs. Use the following steps to complete the assignment:
- Modify the Python script presented in class to retrieve a time series of 15-minute discharge data from an active USGS monitoring site of your choosing for the past 3 months (August 2014 – Present). Use the USGS Unit Values web service listed above. The Network code for this service is “USGS”. The SiteCode for a USGS gage would be it’s USGS identifier (e.g., “10109000” for the gage in the Logan River above State Dam Near Logan, UT).
- Write Python code to calculate the daily min, max and average discharge values for each day in the time period of data you retrieve.
- Using the skills that you have already learned with Matplotlib, write Python code to generate a plot of the resulting summarized flows. Your plot should have three lines, one for min, max, and average flows. You may choose to add the 15-minute values to your plot as well. Add a legend to your plot to distinguish the lines. Make sure you include appropriate x- and y-axis labels.
Deliverable
Submit the following to complete this assignment:
- A one-page briefing that includes
- A description of the gage site that you chose.
- A statement of your methodology for calculating the daily summary flows (minimum, maximum, and average)
- A statement of your methodology for creating the figure
- A description of the characteristics of flow at the site you chose. Was any interesting behavior observed?
- An appendix with your figure with an appropriate caption.
- An appendix with a listing of your Python code.
- Your Python code (a separate .py file) submitted to Canvas as a separate upload so that your instructor can test your code.
A PDF of this assignment is posted for printing purposes: Assignment8.pdf
Download Assignment8.pdf
Use the following grading rubric for this assignment: Assignment8_Rubric.docx
Download Assignment8_Rubric.docx