NOTE: HydroPy is not required to use HydroCloud in a notebook.
In [1]:
# Import the libraries that we'll be using
import numpy as np
import pandas as pd
import hydropy as hp
# Set the notebook to plot graphs in the output cells.
%matplotlib inline
In [2]:
# Use HydroCloud.org to find a stream gauge to investigate.
# Click on the red points to find the site number.
from IPython.display import HTML
HTML('<iframe src=https://hydrocloud.org/ width=700 height=400></iframe>')
Out[2]:
In [45]:
# Create a Pandas dataframe using the USGS daily discharge for Herring Run.
herring = hp.get_usgs('01585200', 'dv', '2011-01-01', '2016-01-01')
# List the first few values from the top of the dataframe.
herring.head()
Out[45]:
In [46]:
# Calculate some basic statistics for the dataframe.
herring.describe()
Out[46]:
In [47]:
# For more advanced analysis, use the HydroAnalysis class.
my_analysis = hp.HydroAnalysis(herring)
# Plot discharge on a logarithmic scale for the Y axis.
my_analysis.plot(figsize=(16,6), logy=True)
Out[47]:
In [ ]:
## Finding Help
In [3]:
# Use help() to learn more about a particular function.
help(hp.get_usgs)
To learn more about hydropy, read the documentation, visit us on github, or try out more notebooks!