API reference#

This page provides an auto-generated summary of TEEHR’s API. For more details and examples, refer to the User Guide part of the documentation.

The Evaluation Class#

The top-level class for interacting with and exploring a TEEHR Evaluation.

Evaluation(dir_path[, create_dir, spark])

The Evaluation class.

Creating and Managing an Evaluation#

Methods for creating, cloning, and configuring an Evaluation.

Evaluation.clone_template()

Create a study from the standard template.

Evaluation.list_s3_evaluations([format])

List the evaluations available on S3.

Evaluation.clone_from_s3(evaluation_name[, ...])

Fetch the study data from S3.

Evaluation.clean_cache()

Clean temporary files.

Evaluation.enable_logging()

Enable logging.

The Evaluation Dataset#

Classes for creating, describing, and querying the Evaluation dataset tables.

BaseTable(ev)

Base table class.

UnitTable(ev)

Access methods to units table.

VariableTable(ev)

Access methods to variables table.

AttributeTable(ev)

Access methods to attributes table.

ConfigurationTable(ev)

Access methods to configurations table.

LocationTable(ev)

Access methods to locations table.

LocationAttributeTable(ev)

Access methods to location attributes table.

LocationCrosswalkTable(ev)

Access methods to location crosswalks table.

PrimaryTimeseriesTable(ev)

Access methods to primary timeseries table.

SecondaryTimeseriesTable(ev)

Access methods to secondary timeseries table.

JoinedTimeseriesTable(ev)

Access methods to joined timeseries table.

Fetching NWM and USGS data#

Methods for fetching NWM and USGS data from external sources.

Fetch.usgs_streamflow(start_date, end_date)

Fetch USGS gage data and load into the TEEHR dataset.

Fetch.nwm_retrospective_points(nwm_version, ...)

Fetch NWM retrospective point data and load into the TEEHR dataset.

Fetch.nwm_forecast_points(nwm_configuration, ...)

Fetch operational NWM point data and load into the TEEHR dataset.

Fetch.nwm_retrospective_grids(nwm_version, ...)

Fetch NWM retrospective gridded data, calculate zonal statistics (currently only mean is available) of selected variable for given zones, and load into the TEEHR dataset.

Fetch.nwm_forecast_grids(nwm_configuration, ...)

Fetch NWM operational gridded data, calculate zonal statistics (currently only mean is available) of selected variable for given zones, and load into the TEEHR dataset.

Metric Functions#

Functions for calculating metrics.

deterministic_funcs

Contains UDFs for deterministic metric calculations in Spark queries.

signature_funcs

Signature functions.

probabilistic_funcs

Functions for probabilistic metric calculations in Spark queries.

Metric and Bootstrap Models#

Classes for defining and customizing metrics and bootstrap models.

DeterministicMetrics()

Define and customize determinisitic metrics.

SignatureMetrics()

Define and customize signature metrics.

ProbabilisticMetrics()

Define and customize probalistic metrics.

Bootstrappers()

Container class for bootstrap sampling classes.

Calculated Field Models#

Classes for defining and customizing user-defined field models.

RowLevelCalculatedFields()

Row level Calculated Fields.

TimeseriesAwareCalculatedFields()

Timeseries aware calculated fields.

Visualization#

Methods for visualizing Evaluation data.

TEEHRDataFrameAccessor(pandas_obj)

Extends pandas DataFrame objects with visualization methods.