Using an anchor date, this python file retrieves government-monitored river water data from the current year and the past nine years. This data is graphed to display certain unique or outstanding waterflow years.
This program was designed for two hypothetical companies: first is the local water district that wants to predict how quickly their reservoir is filling up and the second a whitewater rafting company that wants to forecast river flows for the next week.
For real-world experience, this class project was created to demonstrate:
- proficiency in Python
- basic data analysis and data manipulation through Pandas and a touch of calculus
- elementary data graphing using matplotlib's pyplot
- descriptive variable naming to let docstrings and comments be secondary descriptors
Clone the repository!
Note this project uses the following packages. Use pip install to install relevant uninstalled packages.
- pandas
- matplotlib
- datetime
- argparse
- hydrofunctions - downloads water data from the United States Geological Survey (USGS) National Water Information System (NWIS)
Commandline arguments are used to get desired government water sensor and date. Use the -h or -help flag to get details.
There are three control inputs:
-nor-name: the name of the desired river. As data is retrieved using the sensor ID, this does not impact data retrieval. This is displayed in the graph title, however. Default is "Trinity River at Burnt Range Gorge".-sor-sensor: the sensor ID. The user will have to manually find this ID from the USGS NWIS website. Default is "11527000".-dor-date: the anchor date on which to start data retrieval. Default is today's date.
Finally, run the program using your version of python with the desired flags and see your results!