Python Advanced #13 - Computing average annual flow from a csv file

In this post I extracted daily data for the year 2016 for the White River at Newport gage from the USGS site and saved it in a csv file.  I then computed the average of the daily values from this csv file using Python.

USGS White River at Newport data

I import the data into a csv file.  A portion of the file is shown below.





To compute the average of the daily values, I use the code shown below.  To create this code, I modified an example given in a lesson from Coursera.

Link to Coursera


The code is shown below and was run using Anaconda available from the following site:

Where I downloaded Anaconda from




The result of running this code is as follows:




Note that this is the average for the entire year and not just for the values shown above.







Comments

Table Rock Dam

Table Rock Dam