Skip to content

Commit 9658a29

Browse files
authored
V1.2.0 (#33)
1 parent 1616b87 commit 9658a29

14 files changed

+321
-204
lines changed

docs/api-documentation.rst

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
API Documentation
33
*****************
44

5-
There are 3 modules in the geoglows package.
6-
75
.. toctree::
86
:maxdepth: 3
97

docs/api-documentation/bias.rst

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
geoglows.bias
33
=============
44

5-
Point Bias Correction
6-
~~~~~~~~~~~~~~~~~~~~~
7-
85
.. automodule:: geoglows.bias
96
:members:
107
correct_historical, correct_forecast, statistics_tables

docs/api-documentation/data.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Historical Simulation
2222
---------------------
2323

2424
.. automodule:: geoglows.data
25-
:members:
26-
retrospective, return_periods, annual_averages, monthly_averages, daily_averages,
27-
:noindex:
25+
:members:
26+
retrospective, return_periods, annual_averages, monthly_averages, daily_averages,
27+
:noindex:
2828

2929
GEOGLOWS Model Utilities
3030
------------------------
3131

3232
.. automodule:: geoglows.data
33-
:members:
34-
metadata_tables
35-
:noindex:
33+
:members:
34+
metadata_tables
35+
:noindex:

docs/api-documentation/plots.rst

+2-8
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
geoglows.plots
33
==============
44

5-
Plots for Streamflow Data
6-
~~~~~~~~~~~~~~~~~~~~~~~~~
7-
85
.. automodule:: geoglows.plots
9-
:members:
10-
forecast, forecast_stats, forecast_ensembles,
11-
retrospective, annual_averages, monthly_averages, daily_averages,
12-
daily_variance, flow_duration_curve
13-
:noindex:
6+
:members:
7+
forecast, forecast_stats, forecast_ensembles, retrospective, annual_averages, monthly_averages, daily_averages, flow_duration_curve, corrected_retrospective, corrected_month_average, corrected_day_average, corrected_scatterplots

docs/api-documentation/streamflow.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ geoglows.streamflow
55
THIS MODULE IS DEPRECATED. Please update your code to use the new GEOGLOWS model and data services. Analogous functions
66
to everything in this module is found in the `geoglows.data` or `geoglows.streams` modules.
77

8-
The streamflow module provides a series of functions for requesting forecasted and historical data from the GEOGloWS
8+
The streamflow module provides a series of functions for requesting forecasted and historical data from the GEOGLOWS
99
ECMWF Streamflow Service for Model and Data Services Version 1.
1010

1111
Forecasted Streamflow
@@ -23,7 +23,7 @@ Historically Simulated Streamflow
2323
historic_simulation, return_periods, daily_averages, monthly_averages
2424
:noindex:
2525

26-
GEOGloWS Model Utilities
26+
GEOGLOWS Model Utilities
2727
------------------------
2828

2929
.. automodule:: geoglows.streamflow

docs/conf.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
# -- Project information -----------------------------------------------------
1212

1313
project = 'geoglows'
14-
copyright = '2021, Riley Hales'
15-
author = 'Riley Hales'
14+
copyright = '2024, Riley Hales'
15+
author = 'Riley Hales, PhD'
1616

1717
# The full version, including alpha/beta/rc tags
18-
release = '0.27.1'
18+
release = '1.2.0'
1919
master_doc = 'index'
2020

2121
# -- General configuration ---------------------------------------------------
@@ -52,4 +52,4 @@
5252
# Add any paths that contain custom static files (such as style sheets) here,
5353
# relative to this directory. They are copied after the builtin static files,
5454
# so a file named "default.css" will overwrite the builtin "default.css".
55-
html_static_path = ['_static']
55+
html_static_path = ['_static', ]

docs/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Demos
1515
These links will be maintained to reference the most updated versions of the tutorials.
1616
The tutorials are GitHub Gists which you can copy and launch in a Google Collaboratory setting directly from the GitHub.
1717

18-
- Retrieve & plot GEOGloWS model data: `<https://gist.github.com/rileyhales/873896e426a5bd1c4e68120b286bc029>`_
18+
- Retrieve & plot GEOGLOWS model data: `<https://gist.github.com/rileyhales/873896e426a5bd1c4e68120b286bc029>`_
1919
- Finding Stream ID #'s programmatically: `<https://gist.github.com/rileyhales/ad92d1fce3aa36ef5873f2f7c2632d31>`_
2020
- Bias Evaluation and Calibration at a point: `<https://gist.github.com/rileyhales/d5290e12b5858d59960d0898fbd0ed69>`_
2121
- Generate/Download High Res Plot Images: `<https://gist.github.com/rileyhales/9b5bbb0c5f307eb14b9f1ced39d641e4>`_
2222

23-
About GEOGloWS ECMWF Streamflow
23+
About GEOGLOWS ECMWF Streamflow
2424
===============================
2525
GEOGLOWS ECMWF Streamflow Project: This project provides access to the results of a hydrologic model that is run each
2626
day. The model is based on a group of unique weather forecasts, known as an ensemble, from ECMWF. Each unique

geoglows/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
from ._constants import METADATA_TABLE_PATH
1010

1111
__all__ = [
12-
'bias', 'plots', 'data', 'analyze', 'streams', 'tables',
12+
'bias', 'plots', 'data', 'analyze', 'streams', 'tables', 'streamflow',
1313
'METADATA_TABLE_PATH'
1414
]
15-
__version__ = '1.1.0'
15+
__version__ = '1.2.0'
1616
__author__ = 'Riley Hales'
1717
__license__ = 'BSD 3-Clause Clear License'

geoglows/_plots/__init__.py

+28-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
1-
from .plots import *
1+
from .plots import (
2+
forecast,
3+
forecast_stats,
4+
forecast_ensembles,
5+
retrospective,
6+
daily_averages,
7+
monthly_averages,
8+
annual_averages,
9+
flow_duration_curve,
10+
corrected_retrospective,
11+
corrected_month_average,
12+
corrected_day_average,
13+
corrected_scatterplots,
14+
)
215

3-
4-
__all__ = []
16+
__all__ = [
17+
'forecast',
18+
'forecast_stats',
19+
'forecast_ensembles',
20+
'retrospective',
21+
'daily_averages',
22+
'monthly_averages',
23+
'annual_averages',
24+
'flow_duration_curve',
25+
'corrected_retrospective',
26+
'corrected_month_average',
27+
'corrected_day_average',
28+
'corrected_scatterplots',
29+
]

geoglows/_plots/plotly_bias_corrected.py

+15-16
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
from .format_tools import build_title
88
from .plotly_helpers import _rperiod_scatters
99

10-
1110
__all__ = [
12-
'corrected_historical',
11+
'corrected_retrospective',
1312
'corrected_scatterplots',
1413
'corrected_day_average',
1514
'corrected_month_average',
@@ -18,9 +17,9 @@
1817

1918

2019
# BIAS CORRECTION PLOTS
21-
def corrected_historical(corrected: pd.DataFrame, simulated: pd.DataFrame, observed: pd.DataFrame,
22-
rperiods: pd.DataFrame = None, plot_titles: list = None,
23-
plot_type: str = 'plotly') -> go.Figure or str:
20+
def corrected_retrospective(corrected: pd.DataFrame, simulated: pd.DataFrame, observed: pd.DataFrame,
21+
rperiods: pd.DataFrame = None, plot_titles: list = None,
22+
plot_type: str = 'plotly') -> go.Figure or str:
2423
"""
2524
Creates a plot of corrected discharge, observed discharge, and simulated discharge
2625
@@ -31,7 +30,7 @@ def corrected_historical(corrected: pd.DataFrame, simulated: pd.DataFrame, obser
3130
rperiods: the csv response from return_periods
3231
plot_type: either 'plotly', or 'plotly_html' (default plotly)
3332
plot_titles: (dict) Extra info to show on the title of the plot. For example:
34-
{'Reach ID': 1234567, 'Drainage Area': '1000km^2'}
33+
{'River ID': 1234567, 'Drainage Area': '1000km^2'}
3534
3635
Returns:
3736
plotly.GraphObject: plotly object, especially for use with python notebooks and the .show() method
@@ -113,7 +112,7 @@ def corrected_scatterplots(corrected: pd.DataFrame, simulated: pd.DataFrame, obs
113112
merged_sim_obs: (optional) if you have already computed it, hydrostats.data.merge_data(simulated, observed)
114113
merged_cor_obs: (optional) if you have already computed it, hydrostats.data.merge_data(corrected, observed)
115114
plot_titles: (dict) Extra info to show on the title of the plot. For example:
116-
{'Reach ID': 1234567, 'Drainage Area': '1000km^2'}
115+
{'River ID': 1234567, 'Drainage Area': '1000km^2'}
117116
118117
Returns:
119118
plotly.GraphObject: plotly object, especially for use with python notebooks and the .show() method
@@ -201,7 +200,7 @@ def corrected_month_average(corrected: pd.DataFrame, simulated: pd.DataFrame, ob
201200
merged_sim_obs: pd.DataFrame = False, merged_cor_obs: pd.DataFrame = False,
202201
plot_titles: list = None, ) -> go.Figure or str:
203202
"""
204-
Calculates and plots the monthly average streamflow. This function uses
203+
Calculates and _plots the monthly average streamflow. This function uses
205204
hydrostats.data.merge_data on the 3 inputs. If you have already computed these because you are doing a full
206205
comparison of bias correction, you can provide them to save time
207206
@@ -212,7 +211,7 @@ def corrected_month_average(corrected: pd.DataFrame, simulated: pd.DataFrame, ob
212211
merged_sim_obs: (optional) if you have already computed it, hydrostats.data.merge_data(simulated, observed)
213212
merged_cor_obs: (optional) if you have already computed it, hydrostats.data.merge_data(corrected, observed)
214213
plot_titles: (dict) Extra info to show on the title of the plot. For example:
215-
{'Reach ID': 1234567, 'Drainage Area': '1000km^2'}
214+
{'River ID': 1234567, 'Drainage Area': '1000km^2'}
216215
217216
Returns:
218217
plotly.GraphObject: plotly object, especially for use with python notebooks and the .show() method
@@ -243,9 +242,9 @@ def corrected_month_average(corrected: pd.DataFrame, simulated: pd.DataFrame, ob
243242

244243
def corrected_day_average(corrected: pd.DataFrame, simulated: pd.DataFrame, observed: pd.DataFrame,
245244
merged_sim_obs: pd.DataFrame = False, merged_cor_obs: pd.DataFrame = False,
246-
titles: dict = None, ) -> go.Figure or str:
245+
plot_titles: dict = None, ) -> go.Figure or str:
247246
"""
248-
Calculates and plots the daily average streamflow. This function uses
247+
Calculates and _plots the daily average streamflow. This function uses
249248
hydrostats.data.merge_data on the 3 inputs. If you have already computed these because you are doing a full
250249
comparison of bias correction, you can provide them to save time
251250
@@ -255,8 +254,8 @@ def corrected_day_average(corrected: pd.DataFrame, simulated: pd.DataFrame, obse
255254
merged_sim_obs: (optional) if you have already computed it, hydrostats.data.merge_data(simulated, observed)
256255
merged_cor_obs: (optional) if you have already computed it, hydrostats.data.merge_data(corrected, observed)
257256
observed: the dataframe of observed data. Must have a datetime index and a single column of flow values
258-
titles: (dict) Extra info to show on the title of the plot. For example:
259-
{'Reach ID': 1234567, 'Drainage Area': '1000km^2'}
257+
plot_titles: (dict) Extra info to show on the title of the plot. For example:
258+
{'River ID': 1234567, 'Drainage Area': '1000km^2'}
260259
261260
Returns:
262261
plotly.GraphObject: plotly object, especially for use with python notebooks and the .show() method
@@ -278,7 +277,7 @@ def corrected_day_average(corrected: pd.DataFrame, simulated: pd.DataFrame, obse
278277
]
279278

280279
layout = go.Layout(
281-
title=build_title('Daily Average Streamflow Comparison', titles),
280+
title=build_title('Daily Average Streamflow Comparison', plot_titles),
282281
xaxis=dict(title='Days'), yaxis=dict(title='Discharge (m<sup>3</sup>/s)', autorange=True),
283282
showlegend=True)
284283

@@ -289,7 +288,7 @@ def corrected_volume_compare(corrected: pd.DataFrame, simulated: pd.DataFrame, o
289288
merged_sim_obs: pd.DataFrame = False, merged_cor_obs: pd.DataFrame = False,
290289
plot_titles: dict = None, ) -> go.Figure or str:
291290
"""
292-
Calculates and plots the cumulative volume output on each of the 3 datasets provided. This function uses
291+
Calculates and _plots the cumulative volume output on each of the 3 datasets provided. This function uses
293292
hydrostats.data.merge_data on the 3 inputs. If you have already computed these because you are doing a full
294293
comparison of bias correction, you can provide them to save time
295294
@@ -300,7 +299,7 @@ def corrected_volume_compare(corrected: pd.DataFrame, simulated: pd.DataFrame, o
300299
merged_sim_obs: (optional) if you have already computed it, hydrostats.data.merge_data(simulated, observed)
301300
merged_cor_obs: (optional) if you have already computed it, hydrostats.data.merge_data(corrected, observed)
302301
plot_titles: (dict) Extra info to show on the title of the plot. For example:
303-
{'Reach ID': 1234567, 'Drainage Area': '1000km^2'}
302+
{'River ID': 1234567, 'Drainage Area': '1000km^2'}
304303
305304
Returns:
306305
plotly.GraphObject: plotly object, especially for use with python notebooks and the .show() method

0 commit comments

Comments
 (0)