In this notebook we'll compare the hydrology of two streams in the Baltimore area:
These two watersheds are similar in size, topography, and geology. They also have very emo names.
In [1]:
# Start with the usual.
import hydrofunctions as hf
%matplotlib inline
hf.__version__
Out[1]:
In [ ]:
# request data for our two sites for a three-year period.
sites = ['01589330', '01581830']
request = hf.NWIS(sites, start_date='2002-01-01', end_date='2005-01-01', file='Urban_Rural.parquet')
request # Describe the dataset that we've received.
In [4]:
# We'll store our discharge data in a dataframe named 'Q'
Q = request.df('discharge')
Q.head() # Print the first five rows to verify.
Out[4]:
In [5]:
# Rename the columns to 'Urban' and 'Rural' so we remember which is which!
Q = Q.rename(columns={"USGS:01589330:00060:00003": "Urban", "USGS:01581830:00060:00003": "Rural"})
Q.head() # List the first five rows.
Out[5]:
In [6]:
# Let's plot our data to create a hydrograph. plot() is a method that is built-in to dataframes.
Q.plot()
Out[6]:
In [7]:
# Let's create a flow duration chart for our two sites!
# .flow_duration is a function included in Hydrofunctions. It accepts dataframes as input.
hf.flow_duration(Q)
Out[7]:
If you look carefully at the hydrograph above, you can see that the orange urban site tends to have lower baseflow, but it also tends to have higher peaks during storms. Unfortunately, this obscures the hydrograph for the rural site a little!
The second diagram is a flow duration chart. The default Y axis is logarithmic, with values ranging from less than 1 to about 400 cfs. The default X axis uses a logit scale to plot the chance of exceedance. Values range from greater than zero to less than one, with a value of 0.9 meaning that 90% of the flows are higher than this value. The logit scale stretches out the extreme high and extreme low values so that the distance from the center to one standard deviation is approximately the same as from two standard deviations out to three standard deviations. This approximates the probability scale that Flow Duration charts are often plotted on.
Comparing the two sites, you can see that the orange urban site has lower baseflows than the blue rural site, but also has higher peak flows.
In [8]:
# let's compare stats for the two sites!
Q.describe()
Out[8]:
Now that we've used flow duration charts to compare an urban stream to a rural stream, try comparing:
Before you find appropriate sites to compare, think about how these different conditions will affect the hydrology of the watershed. What impact does infiltration have on the 'flashiness' of a stream? How quickly will a large watershed respond to a storm compared to a small stream?
Good luck!