Checking for non-preferred file/folder path names (may take a long time depending on the number of files/folders) ...

Hydroinformatics Assignment 8


A newer version of this resource http://www.hydroshare.org/resource/516d6dee5ebd43728ac7f625f3cacaeb is available that replaces this version.
Authors:
Owners: This resource does not have an owner who is an active HydroShare user. Contact CUAHSI (help@cuahsi.org) for information on this resource.
Type: Resource
Storage: The size of this resource is 94.7 KB
Created: Dec 03, 2019 at 6:31 a.m.
Last updated: Dec 04, 2019 at 4:52 a.m. (Metadata update)
Published date: Dec 04, 2019 at 4:35 a.m.
DOI: 10.4211/hs.9d05c5fd7cb14fe7a149894b68d637bf
Citation: See how to cite this resource
Sharing Status: Published
Views: 1754
Downloads: 24
+1 Votes: Be the first one to 
 this.
Comments: No comments (yet)

Abstract

This script was created in python that can access a specified USGS site and download discharge and stage data for a specified period. The python script can create a time series after downloading the data. The script is then transferred to jupyter notebook.

Subject Keywords

Content

readme.txt

#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Using the Assignment8_2 jupyter script
This script is written in python using pycharm that can download the discharge and stage data from a specified USGS site for the specified time. The user can change the times and the site codes to download data from other sites. 
The user can create time series plots for that specified period. After creation of the script,it was tranfered to a jupyter notebook.

The script is divided into two segments, the user is advised to be patient when running the jupyter notebook as the generating the time series takes 2-5 minutes.
Required packages to run this script are; suds-py3, matplotlib and pandas.

Creator: Mahmudur Rahman Aveek
Date : 12-03-2019
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Part 1:Downloading the discharge data
# suds was used to connect and download the data from a specified USGS site.
# pandas package was used for analysis of the data.
# The matplotlib package was used for visualization e.g.,
# creating time series plots.

# part 1(a)
# wsdlURL is a variable created to call the web service
# stieCode is a variable which was created to specify a site. the user can choose any site he or she pleases. USGS sites can be accessed form this url "https://maps.waterdata.usgs.gov/mapper/index.html" 
# variableCode is a variable created to select the type of data the user wants to access. In this script, NWISUV:00060 was used which is the USGS variable code for discharge data. The pysical parameter codes for USGS can be
#   viewed using this url :"https://nwis.waterdata.usgs.gov/usa/nwis/pmcodes?radio_pm_search=param_group&pm_group=Physical&pm_search=&casrn_search=&srsname_search=&format=html_table&show=parameter_group_nm&show=parameter_nm&show=casrn&show=srsname&show=parameter_units"
# beginDate is a variable declared where user can change the date to specify the beginning date of the data.
# endDate is a variable declared where user can change the date to specify the end date of the data.
# user is suggested to check the USGS site websites to get an idea when that site started recording the data.


# user should not change anything from the 1(b) part, the required data that the user requires, are defined in part 1(a) and the part 1(b) appends the data into a defined list. details description are also written as comments in the script
# pandas package was used for resampling the appended data.
# if the user wishes to resample the data to anything other than 1-day (1D), then the user is suggested to change the rule defined in "dailymaxValue", "dailyavgValue" and dailyminValue from 1D to his or her required resampling time.


# part 1(c) creates the time series plots.
# this part uses the matplotlib package.
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Part 2: Downloading the stage data
# This part uses the same code defined in the first part, but instead of accessing discharge data, this part accesses the stage data and downloads and appends that data for the specified datas.
# The user can follow the same instructions provided in the Part 1

Related Resources

This resource has been replaced by a newer version Aveek, M. R. (2019). Hydroinformatics Assignment 8, HydroShare, http://www.hydroshare.org/resource/516d6dee5ebd43728ac7f625f3cacaeb

How to Cite

Aveek, M. R. (2019). Hydroinformatics Assignment 8, HydroShare, https://doi.org/10.4211/hs.9d05c5fd7cb14fe7a149894b68d637bf

This resource is shared under the Creative Commons Attribution CC BY.

http://creativecommons.org/licenses/by/4.0/
CC-BY

Comments

There are currently no comments

New Comment

required