Provides basic information about the requested assessment units.
assessment_units(
assessment_unit_identifer = NULL,
state_code = NULL,
organization_id = NULL,
epa_region = NULL,
huc = NULL,
county = NULL,
assessment_unit_name = NULL,
last_change_later_than_date = NULL,
last_change_earlier_than_date = NULL,
status_indicator = NULL,
return_count_only = NULL,
tidy = TRUE,
.unnest = TRUE,
...
)When tidy = TRUE a tibble with many variables, some nested, is
returned. When tidy=FALSE a raw JSON string is returned.
(character) Filters returned assessment units to one or more specific assessment units. Multiple values can be provided. optional
(character) Filters returned assessment units to only those having a state code matches one in the provided list of states. Multiple values can be provided. optional
(character) Filters returned assessment units to only those having a mathcing organization ID. Multiple values can be provided. optional
(character) Filters returned assessment units to only matching EPA regions. Multiple values can be provided. optional
(character) Filters returned assessment units to only those which have a location type of HUC and the location value matches the provided HUC. Multiple values can be provided. optional
(character) Filters returned assessment units to only those which have a location type of county and matches the provided county. Multiple values can be provided. optional
(character) Filters the returned assessment units to matching the provided value.
(character) Filters returned assessment
units to those only changed after the provided date. Must be a character
with format: "yyyy-mm-dd". optional
(character) Filters returned assessment
units to those only changed before the provided date. Must be a character
with format: "yyyy-mm-dd". optional
(character) Filter the returned assessment units to those with specified status. "A" for active, "R" for retired. optional
(logical) TRUE (default) the function returns a tidied
tibble. FALSE the function returns the raw JSON string.
(logical) TRUE (default) the function attempts to unnest
data to longest format possible. This defaults to TRUE for backwards
compatibility but it is suggested to use FALSE.
list of curl options passed to crul::HttpClient()
One or more of the following arguments must be included:
assessment_unit_identfier, state_code or
organization_id. Multiple values are allowed for indicated arguments
and should be included as a comma separated values in the string (eg.
organization_id="TCEQMAIN,DCOEE").
if (FALSE) {
## Retrieve data about a single assessment unit
assessment_units(assessment_unit_identifer = "AL03150201-0107-200")
## Retrieve data as a JSON instead
assessment_units(assessment_unit_identifer = "AL03150201-0107-200", tidy = FALSE)
}
Run the code above in your browser using DataLab