Hydrostats Documentation¶
Hydrostats is a library of tools and functions for users working with time series data, with some tools specific to the field of hydrology (hence Hydrostats). All of the tools contained in Hydrostats are built using a few different python libraries including numpy, scipy, pandas, matplotlib, and numba. It is meant to provide a high-level interface for users to be able to perform common tasks regarding time series analysis.
Hydrostats contains tools for for preprocessing data, visualizing data, calculating error metrics on observed and predicted time series, and forecast validation. It contains over 70 error metrics, with many metrics specific to the field of hydrology.
See the examples folder in this repository for a Jupyter notebook highlighting some of the main features of Hydrostats.
Contents¶
Installation¶
Hydrostats is freely available on the Python Package index repository (PyPI). It can be installed with the following command using either pip, virtualenv, or Anaconda:
pip install hydrostats
The extension is also available through conda package management system. It can be installed with:
conda install -c conda-forge hydrostats
When installing hydrostats on Mac OSX operating system, you may get the following error when trying to run python scripts using hydrostats:
**RuntimeError**: Python is not installed as a framework. The Mac OS X backend will not be able
to function correctly if Python is not installed as a framework. See the Python documentation for
more information on installing Python as a framework on Mac OS X. Please either reinstall Python
as a framework, or try one of the other backends.
If this happens, you will need to manually change the backend for use in your IDE. This can be done by running the following commands in the terminal:
touch ~/.matplotlib/matplotlibrc # Create a file called matplotlibrc
Then add the following snippet of text to the file you created using vim, nano, or the text editor of your choice:
backend: TkAgg # or whatever backend you would like to use
Then save and close the document.
For more information about matplotlib backends, read here
Preprocessing (hydrostats.data)¶
hydrostats.data Module¶
The data module contains tools for preprocessing data. It allows users to merge timeseries, compute daily and monthly summary statistics, and get seasonal periods of a time series.
Functions¶
julian_to_gregorian (dataframe[, frequency, …]) |
Converts the index of the merged dataframe from julian float values to gregorian datetime values. |
merge_data ([sim_fpath, obs_fpath, sim_df, …]) |
Merges two dataframes or csv files, depending on the input. |
daily_average (df[, rolling]) |
Calculates daily seasonal averages of the timeseries data in a DataFrame |
daily_std_error (merged_data) |
Calculates daily seasonal standard error of the timeseries data in a DataFrame |
daily_std_dev (merged_data) |
Calculates daily seasonal standard deviation of the timeseries data in a DataFrame |
monthly_average (merged_data) |
Calculates monthly seasonal averages of the timeseries data in a DataFrame |
monthly_std_error (merged_data) |
Calculates monthly seasonal standard error of the timeseries data in a DataFrame |
monthly_std_dev (merged_data) |
Calculates monthly seasonal standard deviation of the timeseries data in a DataFrame |
remove_nan_df (merged_dataframe) |
Drops rows with NaN, zero, negative, and inf values from a pandas dataframe |
seasonal_period (merged_dataframe, daily_period) |
Creates a dataframe with a specified seasonal period |
Visualization (hydrostats.visual)¶
hydrostats.visual Module¶
The visual module contains different plotting functions for time series visualization. It allows users to plot hydrographs, scatter plots, histograms, and quantile-quantile (qq) plots to visualize time series data. In some of the visualization functions, metrics can be added to the plots for a more complete summary of the data.
Functions¶
plot (merged_data_df[, legend, metrics, …]) |
Create a comparison time series line plot of simulated and observed time series data. |
hist ([merged_data_df, sim_array, obs_array, …]) |
Plots a histogram comparing simulated and observed data. |
scatter ([merged_data_df, sim_array, …]) |
Creates a scatter plot of the observed and simulated data. |
qqplot ([merged_data_df, sim_array, …]) |
Plots a Quantile-Quantile plot of the simulated and observed data. |
Metrics of Hydrological Skill (hydrostats.metrics)¶
The metrics in Hydrostats are available through the HydroErr package. Below is a link to the HydroErr documentation page that lists all of the metrics contained in the package.
Examples¶
The metrics can be imported into your scripts as part of the metrics module. An example is provided below showing how to use the metrics included in the package from HydroErr (if you would prefer to only use the Hydrostats package and not just import the HydroErr package).
import hydrostats.metrics as hm
import numpy as np
sim = np.array([5, 7, 9, 2, 4.5, 6.7])
obs = np.array([4.7, 6, 10, 2.5, 4, 6.8])
mean_error = hm.me(sim, obs)
print(mean_error)
Metrics of Ensemble Forecast Skill (hydrostats.ens_metrics)¶
hydrostats.ens_metrics Module¶
The ens_metrics module contains all of the metrics included in hydrostats that measure forecast skill. Each forecast metric is contained in a function, and every metric has the ability to treat missing values as well as remove zero and negative values from the timeseries data. Users will be warned which start dates have been removed in the warnings that display during the function execution.
Functions¶
ens_me (obs[, fcst_ens, remove_zero, remove_neg]) |
Calculate the mean error between observed values and the ensemble mean. |
ens_mae (obs[, fcst_ens, remove_zero, remove_neg]) |
Calculate the mean absolute error between observed values and the ensemble mean. |
ens_mse (obs[, fcst_ens, remove_zero, remove_neg]) |
Calculate the mean squared error between observed values and the ensemble mean. |
ens_rmse (obs[, fcst_ens, remove_zero, …]) |
Calculate the root mean squared error between observed values and the ensemble mean. |
ens_pearson_r (obs, fcst_ens[, remove_neg, …]) |
Calculate the pearson correlation coefficient between observed values and the ensemble mean. |
crps_hersbach (obs, fcst_ens[, remove_neg, …]) |
Calculate the the continuous ranked probability score (CRPS) as per equation 25-27 in Hersbach et al. |
crps_kernel (obs, fcst_ens[, remove_neg, …]) |
Compute the kernel representation of the continuous ranked probability score (CRPS). |
ens_crps (obs, fcst_ens[, adj, remove_neg, …]) |
Calculate the ensemble-adjusted Continuous Ranked Probability Score (CRPS) |
ens_brier ([fcst_ens, obs, threshold, …]) |
Calculate the ensemble-adjusted Brier Score. |
auroc ([fcst_ens, obs, threshold, …]) |
Calculates Area Under the Relative Operating Characteristic curve (AUROC) for a forecast and its verifying binary observation, and estimates the variance of the AUROC |
skill_score (scores, bench_scores, perf_score) |
Calculate the skill score of the given function. |
Analysis (hydrostats.analyze)¶
hydrostats.analyze Module¶
The analyze module contains functions that perform a more complex analysis of simulated and observed time series data. It allows users to make tables with metrics that they choose as well as different date ranges. It also allows users to run a time lag analysis of two time series.
Functions¶
make_table (merged_dataframe, metrics[, …]) |
Create a table of user selected metrics with optional seasonal analysis. |
time_lag (merged_dataframe, metrics[, …]) |
Check metric values between simulated and observed data at different time lags. |
Quick Reference Table¶
Metrics, Abbreviations, and Functions Quick Reference¶
This table contains a list of the metrics names, abbreviations, and the name of the functions that are associated with them. It is a good reference when creating tables or plots to be able to see what metrics are available for use and their abbreviation name.
Full Metric Name | Abbreviation | Function Name |
---|---|---|
Anomaly Correlation Coefficient | ACC | acc |
Coefficient of Determination | r2 | r_squared |
Eclidean Distance | ED | ed |
Geometric Mean Difference | GMD | g_mean_diff |
Index of Agreement (d) | d | d |
Index of Agreement (d1) | d1 | d1 |
Index of Agreement Refined (dr) | dr | dr |
Inertial Root Mean Square Error | IRMSE | irmse |
Kling-Gupta Efficiency (2009) | KGE (2009) | kge_2009 |
Kling-Gupta Efficiency (2012) | KGE (2012) | kge_2012 |
Legate-McCabe Efficiency Index | E1’ | lm_index |
Legate-McCabe Index of Agreement | D1’ | d1_p |
Mean Absolute Error | MAE | mae |
Mean Absolute H1 Error | H1 (MAHE) | h1_mahe |
Mean Absolute H10 Error | H10 (MAHE) | h10_mahe |
Mean Absolute H2 Error | H2 (MAHE) | h2_mahe |
Mean Absolute H3 Error | H3 (MAHE) | h3_mahe |
Mean Absolute H4 Error | H4 (MAHE) | h4_mahe |
Mean Absolute H5 Error | H5 (MAHE) | h5_mahe |
Mean Absolute H6 Error | H6 (MAHE) | h6_mahe |
Mean Absolute H7 Error | H7 (MAHE) | h7_mahe |
Mean Absolute H8 Error | H8 (MAHE) | h8_mahe |
Mean Absolute Log Error | MALE | male |
Mean Absolute Percentage Deviation | MAPD | mapd |
Mean Absolute Percentage Error | MAPE | mape |
Mean Absolute Scaled Error | MASE | mase |
Mean Arctangent Absolute Percentage Error | MAAPE | maape |
Mean Error | ME | me |
Mean H1 Error | H1 (MHE) | h1_mhe |
Mean H10 Error | H10 (MHE) | h10_mhe |
Mean H2 Error | H2 (MHE) | h2_mhe |
Mean H3 Error | H3 (MHE) | h3_mhe |
Mean H4 Error | H4 (MHE) | h4_mhe |
Mean H5 Error | H5 (MHE) | h5_mhe |
Mean H6 Error | H6 (MHE) | h6_mhe |
Mean H7 Error | H7 (MHE) | h7_mhe |
Mean H8 Error | H8 (MHE) | h8_mhe |
Mean Log Error | MLE | mle |
Mean Squared Error | MSE | mse |
Mean Squared Log Error | MSLE | msle |
Mean Variance | MV | mean_var |
Median Absolute Error | MdAE | mdae |
Median Error | MdE | mde |
Median Squared Error | MdSE | mdse |
Mielke-Berry R | (MB) R | mb_r |
Modified Index of Agreement | d (Mod.) | dmod |
Modified Nash-Sutcliffe Efficiency | NSE (Mod.) | nse_mod |
Nash-Sutcliffe Efficiency | NSE | nse |
Normalized Eclidean Distance | NED | ned |
Normalized Root Mean Square Error - IQR | NRMSE (IQR) | nrmse_iqr |
Normalized Root Mean Square Error - Mean | NRMSE (Mean) | nrmse_mean |
Normalized Root Mean Square Error - Range | NRMSE (Range) | nrmse_range |
Pearson Correlation Coefficient | R (Pearson) | pearson_r |
Relative Index of Agreement | d (Rel.) | drel |
Relative Nash-Sutcliffe Efficiency | NSE (Rel.) | nse_rel |
Root Mean Square Error | RMSE | rmse |
Root Mean Square H1 Error | H1 (RMSHE) | h1_rmshe |
Root Mean Square H10 Error | H10 (RMSHE) | h10_rmshe |
Root Mean Square H2 Error | H2 (RMSHE) | h2_rmshe |
Root Mean Square H3 Error | H3 (RMSHE) | h3_rmshe |
Root Mean Square H4 Error | H4 (RMSHE) | h4_rmshe |
Root Mean Square H5 Error | H5 (RMSHE) | h5_rmshe |
Root Mean Square H6 Error | H6 (RMSHE) | h6_rmshe |
Root Mean Square H7 Error | H7 (RMSHE) | h7_rmshe |
Root Mean Square H8 Error | H8 (RMSHE) | h8_rmshe |
Root Mean Squared Log Error | RMSLE | rmsle |
Spearman Rank Correlation Coefficient | R (Spearman) | spearman_r |
Spectral Angle | SA | sa |
Spectral Correlation | SC | sc |
Spectral Gradient Angle | SGA | sga |
Spectral Information Divergence | SID | sid |
Symmetric Mean Absolute Percentage Error (1) | SMAPE1 | smape1 |
Symmetric Mean Absolute Percentage Error (2) | SMAPE2 | smape2 |
Volumetric Efficiency | VE | ve |
Watterson’s M | M | watt_m |
List of Plot File Types¶
These are all of different file types that the matplotlib plots created with Hydrostats can be saved as. Note that some of these types will require you to switch the backend (Read here for more on backends).
- Postscript (.ps)
- Encapsulated Postscript (.eps)
- Portable Document Format (.pdf)
- PGF code for LaTeX (.pgf)
- Portable Network Graphics (.png)
- Raw RGBA bitmap (.raw)
- Raw RGBA bitmap (.rgba)
- Scalable Vector Graphics (.svg)
- Scalable Vector Graphics (.svgz)
- Joint Photographic Experts Group (.jpg, .jpeg)
- Tagged Image File Format (.tif, .tiff)
List of Timezones¶
The list of timezones to use when applying timezones to your data. These timezones are baseod on Olsen timezone database, using the python package pytz.
- Africa/Abidjan (+00:00)
- Africa/Accra (+00:00)
- Africa/Addis_Ababa (+03:00)
- Africa/Algiers (+01:00)
- Africa/Asmara (+03:00)
- Africa/Asmera (+03:00)
- Africa/Bamako (+00:00)
- Africa/Bangui (+01:00)
- Africa/Banjul (+00:00)
- Africa/Bissau (+00:00)
- Africa/Blantyre (+02:00)
- Africa/Brazzaville (+01:00)
- Africa/Bujumbura (+02:00)
- Africa/Cairo (+02:00)
- Africa/Casablanca (+00:00)
- Africa/Ceuta (+01:00)
- Africa/Conakry (+00:00)
- Africa/Dakar (+00:00)
- Africa/Dar_es_Salaam (+03:00)
- Africa/Djibouti (+03:00)
- Africa/Douala (+01:00)
- Africa/El_Aaiun (+00:00)
- Africa/Freetown (+00:00)
- Africa/Gaborone (+02:00)
- Africa/Harare (+02:00)
- Africa/Johannesburg (+02:00)
- Africa/Juba (+03:00)
- Africa/Kampala (+03:00)
- Africa/Khartoum (+02:00)
- Africa/Kigali (+02:00)
- Africa/Kinshasa (+01:00)
- Africa/Lagos (+01:00)
- Africa/Libreville (+01:00)
- Africa/Lome (+00:00)
- Africa/Luanda (+01:00)
- Africa/Lubumbashi (+02:00)
- Africa/Lusaka (+02:00)
- Africa/Malabo (+01:00)
- Africa/Maputo (+02:00)
- Africa/Maseru (+02:00)
- Africa/Mbabane (+02:00)
- Africa/Mogadishu (+03:00)
- Africa/Monrovia (+00:00)
- Africa/Nairobi (+03:00)
- Africa/Ndjamena (+01:00)
- Africa/Niamey (+01:00)
- Africa/Nouakchott (+00:00)
- Africa/Ouagadougou (+00:00)
- Africa/Porto-Novo (+01:00)
- Africa/Sao_Tome (+00:00)
- Africa/Timbuktu (+00:00)
- Africa/Tripoli (+02:00)
- Africa/Tunis (+01:00)
- Africa/Windhoek (+02:00)
- America/Adak (-10:00)
- America/Anchorage (-09:00)
- America/Anguilla (-04:00)
- America/Antigua (-04:00)
- America/Araguaina (-03:00)
- America/Argentina/Buenos_Aires (-03:00)
- America/Argentina/Catamarca (-03:00)
- America/Argentina/ComodRivadavia (-03:00)
- America/Argentina/Cordoba (-03:00)
- America/Argentina/Jujuy (-03:00)
- America/Argentina/La_Rioja (-03:00)
- America/Argentina/Mendoza (-03:00)
- America/Argentina/Rio_Gallegos (-03:00)
- America/Argentina/Salta (-03:00)
- America/Argentina/San_Juan (-03:00)
- America/Argentina/San_Luis (-03:00)
- America/Argentina/Tucuman (-03:00)
- America/Argentina/Ushuaia (-03:00)
- America/Aruba (-04:00)
- America/Asuncion (-03:00)
- America/Atikokan (-05:00)
- America/Atka (-10:00)
- America/Bahia (-03:00)
- America/Bahia_Banderas (-06:00)
- America/Barbados (-04:00)
- America/Belem (-03:00)
- America/Belize (-06:00)
- America/Blanc-Sablon (-04:00)
- America/Boa_Vista (-04:00)
- America/Bogota (-05:00)
- America/Boise (-07:00)
- America/Buenos_Aires (-03:00)
- America/Cambridge_Bay (-07:00)
- America/Campo_Grande (-03:00)
- America/Cancun (-05:00)
- America/Caracas (-04:00)
- America/Catamarca (-03:00)
- America/Cayenne (-03:00)
- America/Cayman (-05:00)
- America/Chicago (-06:00)
- America/Chihuahua (-07:00)
- America/Coral_Harbour (-05:00)
- America/Cordoba (-03:00)
- America/Costa_Rica (-06:00)
- America/Creston (-07:00)
- America/Cuiaba (-03:00)
- America/Curacao (-04:00)
- America/Danmarkshavn (+00:00)
- America/Dawson (-08:00)
- America/Dawson_Creek (-07:00)
- America/Denver (-07:00)
- America/Detroit (-05:00)
- America/Dominica (-04:00)
- America/Edmonton (-07:00)
- America/Eirunepe (-05:00)
- America/El_Salvador (-06:00)
- America/Ensenada (-08:00)
- America/Fort_Nelson (-07:00)
- America/Fort_Wayne (-05:00)
- America/Fortaleza (-03:00)
- America/Glace_Bay (-04:00)
- America/Godthab (-03:00)
- America/Goose_Bay (-04:00)
- America/Grand_Turk (-04:00)
- America/Grenada (-04:00)
- America/Guadeloupe (-04:00)
- America/Guatemala (-06:00)
- America/Guayaquil (-05:00)
- America/Guyana (-04:00)
- America/Halifax (-04:00)
- America/Havana (-05:00)
- America/Hermosillo (-07:00)
- America/Indiana/Indianapolis (-05:00)
- America/Indiana/Knox (-06:00)
- America/Indiana/Marengo (-05:00)
- America/Indiana/Petersburg (-05:00)
- America/Indiana/Tell_City (-06:00)
- America/Indiana/Vevay (-05:00)
- America/Indiana/Vincennes (-05:00)
- America/Indiana/Winamac (-05:00)
- America/Indianapolis (-05:00)
- America/Inuvik (-07:00)
- America/Iqaluit (-05:00)
- America/Jamaica (-05:00)
- America/Jujuy (-03:00)
- America/Juneau (-09:00)
- America/Kentucky/Louisville (-05:00)
- America/Kentucky/Monticello (-05:00)
- America/Knox_IN (-06:00)
- America/Kralendijk (-04:00)
- America/La_Paz (-04:00)
- America/Lima (-05:00)
- America/Los_Angeles (-08:00)
- America/Louisville (-05:00)
- America/Lower_Princes (-04:00)
- America/Maceio (-03:00)
- America/Managua (-06:00)
- America/Manaus (-04:00)
- America/Marigot (-04:00)
- America/Martinique (-04:00)
- America/Matamoros (-06:00)
- America/Mazatlan (-07:00)
- America/Mendoza (-03:00)
- America/Menominee (-06:00)
- America/Merida (-06:00)
- America/Metlakatla (-09:00)
- America/Mexico_City (-06:00)
- America/Miquelon (-03:00)
- America/Moncton (-04:00)
- America/Monterrey (-06:00)
- America/Montevideo (-03:00)
- America/Montreal (-05:00)
- America/Montserrat (-04:00)
- America/Nassau (-05:00)
- America/New_York (-05:00)
- America/Nipigon (-05:00)
- America/Nome (-09:00)
- America/Noronha (-02:00)
- America/North_Dakota/Beulah (-06:00)
- America/North_Dakota/Center (-06:00)
- America/North_Dakota/New_Salem (-06:00)
- America/Ojinaga (-07:00)
- America/Panama (-05:00)
- America/Pangnirtung (-05:00)
- America/Paramaribo (-03:00)
- America/Phoenix (-07:00)
- America/Port-au-Prince (-05:00)
- America/Port_of_Spain (-04:00)
- America/Porto_Acre (-05:00)
- America/Porto_Velho (-04:00)
- America/Puerto_Rico (-04:00)
- America/Punta_Arenas (-03:00)
- America/Rainy_River (-06:00)
- America/Rankin_Inlet (-06:00)
- America/Recife (-03:00)
- America/Regina (-06:00)
- America/Resolute (-06:00)
- America/Rio_Branco (-05:00)
- America/Rosario (-03:00)
- America/Santa_Isabel (-08:00)
- America/Santarem (-03:00)
- America/Santiago (-03:00)
- America/Santo_Domingo (-04:00)
- America/Sao_Paulo (-02:00)
- America/Scoresbysund (-01:00)
- America/Shiprock (-07:00)
- America/Sitka (-09:00)
- America/St_Barthelemy (-04:00)
- America/St_Johns (-03:30)
- America/St_Kitts (-04:00)
- America/St_Lucia (-04:00)
- America/St_Thomas (-04:00)
- America/St_Vincent (-04:00)
- America/Swift_Current (-06:00)
- America/Tegucigalpa (-06:00)
- America/Thule (-04:00)
- America/Thunder_Bay (-05:00)
- America/Tijuana (-08:00)
- America/Toronto (-05:00)
- America/Tortola (-04:00)
- America/Vancouver (-08:00)
- America/Virgin (-04:00)
- America/Whitehorse (-08:00)
- America/Winnipeg (-06:00)
- America/Yakutat (-09:00)
- America/Yellowknife (-07:00)
- Antarctica/Casey (+11:00)
- Antarctica/Davis (+07:00)
- Antarctica/DumontDUrville (+10:00)
- Antarctica/Macquarie (+11:00)
- Antarctica/Mawson (+05:00)
- Antarctica/McMurdo (+13:00)
- Antarctica/Palmer (-03:00)
- Antarctica/Rothera (-03:00)
- Antarctica/South_Pole (+13:00)
- Antarctica/Syowa (+03:00)
- Antarctica/Troll (+00:00)
- Antarctica/Vostok (+06:00)
- Arctic/Longyearbyen (+01:00)
- Asia/Aden (+03:00)
- Asia/Almaty (+06:00)
- Asia/Amman (+02:00)
- Asia/Anadyr (+12:00)
- Asia/Aqtau (+05:00)
- Asia/Aqtobe (+05:00)
- Asia/Ashgabat (+05:00)
- Asia/Ashkhabad (+05:00)
- Asia/Atyrau (+05:00)
- Asia/Baghdad (+03:00)
- Asia/Bahrain (+03:00)
- Asia/Baku (+04:00)
- Asia/Bangkok (+07:00)
- Asia/Barnaul (+07:00)
- Asia/Beirut (+02:00)
- Asia/Bishkek (+06:00)
- Asia/Brunei (+08:00)
- Asia/Calcutta (+05:30)
- Asia/Chita (+09:00)
- Asia/Choibalsan (+08:00)
- Asia/Chongqing (+08:00)
- Asia/Chungking (+08:00)
- Asia/Colombo (+05:30)
- Asia/Dacca (+06:00)
- Asia/Damascus (+02:00)
- Asia/Dhaka (+06:00)
- Asia/Dili (+09:00)
- Asia/Dubai (+04:00)
- Asia/Dushanbe (+05:00)
- Asia/Famagusta (+02:00)
- Asia/Gaza (+02:00)
- Asia/Harbin (+08:00)
- Asia/Hebron (+02:00)
- Asia/Ho_Chi_Minh (+07:00)
- Asia/Hong_Kong (+08:00)
- Asia/Hovd (+07:00)
- Asia/Irkutsk (+08:00)
- Asia/Istanbul (+03:00)
- Asia/Jakarta (+07:00)
- Asia/Jayapura (+09:00)
- Asia/Jerusalem (+02:00)
- Asia/Kabul (+04:30)
- Asia/Kamchatka (+12:00)
- Asia/Karachi (+05:00)
- Asia/Kashgar (+06:00)
- Asia/Kathmandu (+05:45)
- Asia/Katmandu (+05:45)
- Asia/Khandyga (+09:00)
- Asia/Kolkata (+05:30)
- Asia/Krasnoyarsk (+07:00)
- Asia/Kuala_Lumpur (+08:00)
- Asia/Kuching (+08:00)
- Asia/Kuwait (+03:00)
- Asia/Macao (+08:00)
- Asia/Macau (+08:00)
- Asia/Magadan (+11:00)
- Asia/Makassar (+08:00)
- Asia/Manila (+08:00)
- Asia/Muscat (+04:00)
- Asia/Nicosia (+02:00)
- Asia/Novokuznetsk (+07:00)
- Asia/Novosibirsk (+07:00)
- Asia/Omsk (+06:00)
- Asia/Oral (+05:00)
- Asia/Phnom_Penh (+07:00)
- Asia/Pontianak (+07:00)
- Asia/Pyongyang (+08:30)
- Asia/Qatar (+03:00)
- Asia/Qyzylorda (+06:00)
- Asia/Rangoon (+06:30)
- Asia/Riyadh (+03:00)
- Asia/Saigon (+07:00)
- Asia/Sakhalin (+11:00)
- Asia/Samarkand (+05:00)
- Asia/Seoul (+09:00)
- Asia/Shanghai (+08:00)
- Asia/Singapore (+08:00)
- Asia/Srednekolymsk (+11:00)
- Asia/Taipei (+08:00)
- Asia/Tashkent (+05:00)
- Asia/Tbilisi (+04:00)
- Asia/Tehran (+03:30)
- Asia/Tel_Aviv (+02:00)
- Asia/Thimbu (+06:00)
- Asia/Thimphu (+06:00)
- Asia/Tokyo (+09:00)
- Asia/Tomsk (+07:00)
- Asia/Ujung_Pandang (+08:00)
- Asia/Ulaanbaatar (+08:00)
- Asia/Ulan_Bator (+08:00)
- Asia/Urumqi (+06:00)
- Asia/Ust-Nera (+10:00)
- Asia/Vientiane (+07:00)
- Asia/Vladivostok (+10:00)
- Asia/Yakutsk (+09:00)
- Asia/Yangon (+06:30)
- Asia/Yekaterinburg (+05:00)
- Asia/Yerevan (+04:00)
- Atlantic/Azores (-01:00)
- Atlantic/Bermuda (-04:00)
- Atlantic/Canary (+00:00)
- Atlantic/Cape_Verde (-01:00)
- Atlantic/Faeroe (+00:00)
- Atlantic/Faroe (+00:00)
- Atlantic/Jan_Mayen (+01:00)
- Atlantic/Madeira (+00:00)
- Atlantic/Reykjavik (+00:00)
- Atlantic/South_Georgia (-02:00)
- Atlantic/St_Helena (+00:00)
- Atlantic/Stanley (-03:00)
- Australia/ACT (+11:00)
- Australia/Adelaide (+10:30)
- Australia/Brisbane (+10:00)
- Australia/Broken_Hill (+10:30)
- Australia/Canberra (+11:00)
- Australia/Currie (+11:00)
- Australia/Darwin (+09:30)
- Australia/Eucla (+08:45)
- Australia/Hobart (+11:00)
- Australia/LHI (+11:00)
- Australia/Lindeman (+10:00)
- Australia/Lord_Howe (+11:00)
- Australia/Melbourne (+11:00)
- Australia/NSW (+11:00)
- Australia/North (+09:30)
- Australia/Perth (+08:00)
- Australia/Queensland (+10:00)
- Australia/South (+10:30)
- Australia/Sydney (+11:00)
- Australia/Tasmania (+11:00)
- Australia/Victoria (+11:00)
- Australia/West (+08:00)
- Australia/Yancowinna (+10:30)
- Brazil/Acre (-05:00)
- Brazil/DeNoronha (-02:00)
- Brazil/East (-02:00)
- Brazil/West (-04:00)
- CET (+01:00)
- CST6CDT (-06:00)
- Canada/Atlantic (-04:00)
- Canada/Central (-06:00)
- Canada/Eastern (-05:00)
- Canada/Mountain (-07:00)
- Canada/Newfoundland (-03:30)
- Canada/Pacific (-08:00)
- Canada/Saskatchewan (-06:00)
- Canada/Yukon (-08:00)
- Chile/Continental (-03:00)
- Chile/EasterIsland (-05:00)
- Cuba (-05:00)
- EET (+02:00)
- EST (-05:00)
- EST5EDT (-05:00)
- Egypt (+02:00)
- Eire (+00:00)
- Etc/GMT (+00:00)
- Etc/GMT+0 (+00:00)
- Etc/GMT+1 (-01:00)
- Etc/GMT+10 (-10:00)
- Etc/GMT+11 (-11:00)
- Etc/GMT+12 (-12:00)
- Etc/GMT+2 (-02:00)
- Etc/GMT+3 (-03:00)
- Etc/GMT+4 (-04:00)
- Etc/GMT+5 (-05:00)
- Etc/GMT+6 (-06:00)
- Etc/GMT+7 (-07:00)
- Etc/GMT+8 (-08:00)
- Etc/GMT+9 (-09:00)
- Etc/GMT-0 (+00:00)
- Etc/GMT-1 (+01:00)
- Etc/GMT-10 (+10:00)
- Etc/GMT-11 (+11:00)
- Etc/GMT-12 (+12:00)
- Etc/GMT-13 (+13:00)
- Etc/GMT-14 (+14:00)
- Etc/GMT-2 (+02:00)
- Etc/GMT-3 (+03:00)
- Etc/GMT-4 (+04:00)
- Etc/GMT-5 (+05:00)
- Etc/GMT-6 (+06:00)
- Etc/GMT-7 (+07:00)
- Etc/GMT-8 (+08:00)
- Etc/GMT-9 (+09:00)
- Etc/GMT0 (+00:00)
- Etc/Greenwich (+00:00)
- Etc/UCT (+00:00)
- Etc/UTC (+00:00)
- Etc/Universal (+00:00)
- Etc/Zulu (+00:00)
- Europe/Amsterdam (+01:00)
- Europe/Andorra (+01:00)
- Europe/Astrakhan (+04:00)
- Europe/Athens (+02:00)
- Europe/Belfast (+00:00)
- Europe/Belgrade (+01:00)
- Europe/Berlin (+01:00)
- Europe/Bratislava (+01:00)
- Europe/Brussels (+01:00)
- Europe/Bucharest (+02:00)
- Europe/Budapest (+01:00)
- Europe/Busingen (+01:00)
- Europe/Chisinau (+02:00)
- Europe/Copenhagen (+01:00)
- Europe/Dublin (+00:00)
- Europe/Gibraltar (+01:00)
- Europe/Guernsey (+00:00)
- Europe/Helsinki (+02:00)
- Europe/Isle_of_Man (+00:00)
- Europe/Istanbul (+03:00)
- Europe/Jersey (+00:00)
- Europe/Kaliningrad (+02:00)
- Europe/Kiev (+02:00)
- Europe/Kirov (+03:00)
- Europe/Lisbon (+00:00)
- Europe/Ljubljana (+01:00)
- Europe/London (+00:00)
- Europe/Luxembourg (+01:00)
- Europe/Madrid (+01:00)
- Europe/Malta (+01:00)
- Europe/Mariehamn (+02:00)
- Europe/Minsk (+03:00)
- Europe/Monaco (+01:00)
- Europe/Moscow (+03:00)
- Europe/Nicosia (+02:00)
- Europe/Oslo (+01:00)
- Europe/Paris (+01:00)
- Europe/Podgorica (+01:00)
- Europe/Prague (+01:00)
- Europe/Riga (+02:00)
- Europe/Rome (+01:00)
- Europe/Samara (+04:00)
- Europe/San_Marino (+01:00)
- Europe/Sarajevo (+01:00)
- Europe/Saratov (+04:00)
- Europe/Simferopol (+03:00)
- Europe/Skopje (+01:00)
- Europe/Sofia (+02:00)
- Europe/Stockholm (+01:00)
- Europe/Tallinn (+02:00)
- Europe/Tirane (+01:00)
- Europe/Tiraspol (+02:00)
- Europe/Ulyanovsk (+04:00)
- Europe/Uzhgorod (+02:00)
- Europe/Vaduz (+01:00)
- Europe/Vatican (+01:00)
- Europe/Vienna (+01:00)
- Europe/Vilnius (+02:00)
- Europe/Volgograd (+03:00)
- Europe/Warsaw (+01:00)
- Europe/Zagreb (+01:00)
- Europe/Zaporozhye (+02:00)
- Europe/Zurich (+01:00)
- GB (+00:00)
- GB-Eire (+00:00)
- GMT (+00:00)
- GMT+0 (+00:00)
- GMT-0 (+00:00)
- GMT0 (+00:00)
- Greenwich (+00:00)
- HST (-10:00)
- Hongkong (+08:00)
- Iceland (+00:00)
- Indian/Antananarivo (+03:00)
- Indian/Chagos (+06:00)
- Indian/Christmas (+07:00)
- Indian/Cocos (+06:30)
- Indian/Comoro (+03:00)
- Indian/Kerguelen (+05:00)
- Indian/Mahe (+04:00)
- Indian/Maldives (+05:00)
- Indian/Mauritius (+04:00)
- Indian/Mayotte (+03:00)
- Indian/Reunion (+04:00)
- Iran (+03:30)
- Israel (+02:00)
- Jamaica (-05:00)
- Japan (+09:00)
- Kwajalein (+12:00)
- Libya (+02:00)
- MET (+01:00)
- MST (-07:00)
- MST7MDT (-07:00)
- Mexico/BajaNorte (-08:00)
- Mexico/BajaSur (-07:00)
- Mexico/General (-06:00)
- NZ (+13:00)
- NZ-CHAT (+13:45)
- Navajo (-07:00)
- PRC (+08:00)
- PST8PDT (-08:00)
- Pacific/Apia (+14:00)
- Pacific/Auckland (+13:00)
- Pacific/Bougainville (+11:00)
- Pacific/Chatham (+13:45)
- Pacific/Chuuk (+10:00)
- Pacific/Easter (-05:00)
- Pacific/Efate (+11:00)
- Pacific/Enderbury (+13:00)
- Pacific/Fakaofo (+13:00)
- Pacific/Fiji (+13:00)
- Pacific/Funafuti (+12:00)
- Pacific/Galapagos (-06:00)
- Pacific/Gambier (-09:00)
- Pacific/Guadalcanal (+11:00)
- Pacific/Guam (+10:00)
- Pacific/Honolulu (-10:00)
- Pacific/Johnston (-10:00)
- Pacific/Kiritimati (+14:00)
- Pacific/Kosrae (+11:00)
- Pacific/Kwajalein (+12:00)
- Pacific/Majuro (+12:00)
- Pacific/Marquesas (-09:30)
- Pacific/Midway (-11:00)
- Pacific/Nauru (+12:00)
- Pacific/Niue (-11:00)
- Pacific/Norfolk (+11:00)
- Pacific/Noumea (+11:00)
- Pacific/Pago_Pago (-11:00)
- Pacific/Palau (+09:00)
- Pacific/Pitcairn (-08:00)
- Pacific/Pohnpei (+11:00)
- Pacific/Ponape (+11:00)
- Pacific/Port_Moresby (+10:00)
- Pacific/Rarotonga (-10:00)
- Pacific/Saipan (+10:00)
- Pacific/Samoa (-11:00)
- Pacific/Tahiti (-10:00)
- Pacific/Tarawa (+12:00)
- Pacific/Tongatapu (+13:00)
- Pacific/Truk (+10:00)
- Pacific/Wake (+12:00)
- Pacific/Wallis (+12:00)
- Pacific/Yap (+10:00)
- Poland (+01:00)
- Portugal (+00:00)
- ROC (+08:00)
- ROK (+09:00)
- Singapore (+08:00)
- Turkey (+03:00)
- UCT (+00:00)
- US/Alaska (-09:00)
- US/Aleutian (-10:00)
- US/Arizona (-07:00)
- US/Central (-06:00)
- US/East-Indiana (-05:00)
- US/Eastern (-05:00)
- US/Hawaii (-10:00)
- US/Indiana-Starke (-06:00)
- US/Michigan (-05:00)
- US/Mountain (-07:00)
- US/Pacific (-08:00)
- US/Samoa (-11:00)
- UTC (+00:00)
- Universal (+00:00)
- W-SU (+03:00)
- WET (+00:00)
- Zulu (+00:00)
Matplotlib Linestyles Help¶
Below are the guides to available linestyle options in matplotlib documentation. These styles can be combined (e.g. ‘r-‘ is a red solid line, ‘r^’ is red triangle up markers).
Release Notes¶
This is the list of changes to Hydrostats between each release. For full details, see the commit logs at https://github.com/BYU-Hydroinformatics/Hydrostats.
Version 0.78¶
- Added the ability to use different thresholds for the ensemble forecast for the observed and ensemble forecast data in the hydrostats.ens_metrics.auroc() and hydrostats.ens_metrics.ens_brier() methods.
- Changes to documentation to reflect the addition of the .name and .abbr properties to metrics from the HydroErr package.
Version 0.77¶
- Added a new rolling average feature to the hydrostats.data.daily_average(). Set rolling=True as a parameter to use the defaults, or specify arguments from the pandas.DataFrame.rolling() method for a custom rolling average.
- Minor changes and more coverage.
Version 0.76¶
- Moved the documentation to new location at https://hydrostats.readthedocs.io/
Version 0.75¶
- Minor bug fixes and changes
Version 0.74¶
- Added support for parsing julian dates with the new hydrostats.data.julian_to_gregorian() function
- Added support for parsing files with julian dates in the hydrostats.data.merge_data() function.
- Added example code in the github repository, in the “Examples” directory.
Contributing to Hydrostats¶
Steps¶
The steps to contributing are simple:
- Download git
- Clone the Hydrostats repository
- Develop features that you would like implemented, including a docstring in functions of classes in the numpydoc format.
- Add a test case to cover the code that you created (hydrostats/tests directory, in tests.py)
- Create a new pull request with your changes
A note to members of the BYU-Hydroinformatics group. Please make pull requests before merging changes to the master branch, as this allows continuous integration testing to take place.