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 query 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 timeseries table.

SecondaryTimeseriesTable(ev)

Access methods to 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 Queries#

Methods for querying and calculating metrics.

evaluation.metrics.Metrics(ev)

Component class for calculating metrics.

Metric and Bootstrap Models#

Classes for defining and customizing metrics and bootstrap models.

metric_models

Classes representing available performance metrics.

bootstrap_models

Classes for bootstrapping sampling methods.

metric_funcs

Contains UDFs for metric calculations for use in Spark queries.

Visualization#

Methods for visualizing Evaluation data.

TEEHRDataFrameAccessor(pandas_obj)

Extends pandas DataFrame objects with visualization methods.