This function returns the 10th, 25th, 50th, 75th, and 90th percentile values for each flow metric as predicted for the stream segment you identify with the comid input variable. It returns a data frame where the metrics are rows with names in the metric field, and percentiles are available as fields such as pct_10, pct_25, etc for each percentile.

get_predicted_flow_metrics(comid, online, wyt, fill_na_p10)

Arguments

comid

character. A string of a NHD COMID to retrieve metrics for.

online

boolean. Default FALSE. When TRUE, retrieves data from TNC's experimental predicted flow metrics API. When FALSE, uses internal data to pull flow metrics. Both are reasonably fast, but offline is good for reliability, but may end up using older data. Online should pull the most current data if there are updates. FALSE is the default largely because the API is still unstable.

wyt

character. When online = TRUE, filters the result to records with only the specifc water year type indicated. See TNC's flow API documentation at flow-api.codefornature.org for options. If you want the records to come back unfiltered, use "any", and for the non-WYT records, use "all" (it's a specific keyword the data uses - not our choice - sorry for any confusion!).