Comparing Urban and Rural Streams

In this notebook we'll compare the hydrology of two streams in the Baltimore area:

  • Grave Run, a rural stream with only 0.3% impervious surfaces, and
  • Dead Run, an urban stream that is 39% impervious surfaces.

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]:
'0.2.0'

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]:
USGS:01581830:00060:00003 USGS:01589330:00060:00003
datetimeUTC
2002-01-01 00:00:00+00:00 3.20 0.60
2002-01-02 00:00:00+00:00 3.20 0.61
2002-01-03 00:00:00+00:00 3.30 0.60
2002-01-04 00:00:00+00:00 3.20 0.64
2002-01-05 00:00:00+00:00 4.18 0.60

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]:
Rural Urban
datetimeUTC
2002-01-01 00:00:00+00:00 3.20 0.60
2002-01-02 00:00:00+00:00 3.20 0.61
2002-01-03 00:00:00+00:00 3.30 0.60
2002-01-04 00:00:00+00:00 3.20 0.64
2002-01-05 00:00:00+00:00 4.18 0.60

In [6]:
# Let's plot our data to create a hydrograph. plot() is a method that is built-in to dataframes.
Q.plot()


C:\Users\Marty\Anaconda3\envs\py37hfdev\lib\site-packages\pandas\core\arrays\datetimes.py:1172: UserWarning: Converting to PeriodArray/Index representation will drop timezone information.
  "will drop timezone information.", UserWarning)
Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x1a99c4fd278>

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]:
(<Figure size 432x288 with 1 Axes>,
 <matplotlib.axes._subplots.AxesSubplot at 0x1a99c68d828>)

Description of the two sites

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]:
Rural Urban
count 1097.000000 1097.000000
mean 12.005588 10.456764
std 10.935054 27.932960
min 0.540000 0.170000
25% 5.750000 1.400000
50% 10.000000 2.510000
75% 14.100000 5.820000
max 130.000000 405.000000

Further study

Now that we've used flow duration charts to compare an urban stream to a rural stream, try comparing:

  • a large stream to a small stream (choose two sites on the same river!)
  • a desert stream to a forested stream
  • a high-gradient mountain stream to a low gradient lowland stream

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!