Title: | EPA Data Helper for R |
---|---|
Description: | Aid the user in making queries to the EPA API site found at https://aqs.epa.gov/aqsweb/documents/data_api. This package combines API calling methods from various web scraping packages with specific strings to retrieve data from the EPA API. It also contains easy to use loaded variables that help a user navigate services offered by the API and aid the user in determining the appropriate way to make a an API call. |
Authors: | G.L. Orozco-Mulfinger [aut, cre], Madyline Lawrence [aut], Owais Gilani [aut] |
Maintainer: | G.L. Orozco-Mulfinger <[email protected]> |
License: | GPL-3 |
Version: | 1.1.0 |
Built: | 2024-11-04 05:04:34 UTC |
Source: | https://github.com/ropensci/epair |
Add variables to a query
add.variables(query, variables)
add.variables(query, variables)
query |
A URL containing authentication for the EPA API site. |
variables |
A list of variables. Each variable should be declared with the appropriate name. Consult VARIABLE.TYPES for the right names. |
A URL consisting of query + variables.
## Not run: endpoint <- "dailyData/byState" variable.list <- list("state" = '37', "bdate" = '20200101', "edate" = '20200102', "param" = '44201') call <- epair::create.base.call(endpoint) call <- add.variables(call, variable.list) call ## End(Not run)
## Not run: endpoint <- "dailyData/byState" variable.list <- list("state" = '37', "bdate" = '20200101', "edate" = '20200102', "param" = '44201') call <- epair::create.base.call(endpoint) call <- add.variables(call, variable.list) call ## End(Not run)
Removes all cached memory of perform.call
clear.all.cached(directory = "/cache")
clear.all.cached(directory = "/cache")
directory |
Place inside user-level cache directory that was used to store the cached data previously. Default: "/cache". |
'Done' if data was successfully forgotten, error message if cache directory was not found
## Not run: clear.all.cached() ## End(Not run)
## Not run: clear.all.cached() ## End(Not run)
Removes memory of cached perform.call data for specific parameters
clear.cached(endpoint, variables = list(), directory = "/cache")
clear.cached(endpoint, variables = list(), directory = "/cache")
endpoint |
An endpoint from the available EPA API endpoints |
variables |
A list of variables or a single variable to filter the EPA API endpoint. |
directory |
Place inside user-level cache directory that was used to store the cached data previously. Default: "/cache". |
TRUE if data was successfully forgotten, error message if cached data was not found
## Not run: endpoint <- 'list/states' clear.cached(endpoint) ## End(Not run)
## Not run: endpoint <- 'list/states' clear.cached(endpoint) ## End(Not run)
Generate the string authentication needed for EPA API
create.authentication(email, key)
create.authentication(email, key)
email |
Email registered with EPA API |
key |
Key obtained from EPA API. Register your email for a key here https://aqs.epa.gov/aqsweb/documents/data_api.html#signup. |
A string with authentication info. It looks like '&email=user_email&key=user_key'.
auth <- create.authentication("[email protected]", "myapikey") auth
auth <- create.authentication("[email protected]", "myapikey") auth
Make the first call when forming a query.
create.base.call(endpoint)
create.base.call(endpoint)
endpoint |
Endpoint for forming a query. See ENDPOINTS for all available endpoints. See SERVICES if you know the service but not the endpoint. |
A URL string containing authentication for the call.
## Not run: endpoint <- "list/states" call <- epair:::create.base.call(endpoint) call ## End(Not run)
## Not run: endpoint <- "list/states" call <- epair:::create.base.call(endpoint) call ## End(Not run)
The endpoints vector contains all endpoints available in the EPA API. To get endpoints directly from the site, use get.endpoints().
Get Monitoring Agencies.
get_all_mas()
get_all_mas()
API response containing all Monitoring Agencies.
## Not run: mas <- get_all_mas() mas$Data ## End(Not run)
## Not run: mas <- get_all_mas() mas$Data ## End(Not run)
Get Primary Quality Assurance Organizations.
get_all_pqaos()
get_all_pqaos()
API response containing all Primary Quality Assurance Organizations.
## Not run: pqaos <- get_all_pqaos() pqaos$Data ## End(Not run)
## Not run: pqaos <- get_all_pqaos() pqaos$Data ## End(Not run)
Get annual summary data in a bounding box (lat, long).
get_annual_summary_in_bbox( bdate, edate, param, minlat, maxlat, minlong, maxlong, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_annual_summary_in_bbox( bdate, edate, param, minlat, maxlat, minlong, maxlong, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
minlat |
Minimum latitude coordinate. |
maxlat |
Maximum latitude coordinate. |
minlong |
Minimum longitude coordinate. |
maxlong |
Maximum longitude coordinate. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing annual summary data in a bounding box.
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_annual_summary_in_bbox(bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_annual_summary_in_bbox(bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
Get annual summary data in a Core Based Statistical Area.
get_annual_summary_in_cbsa( bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_annual_summary_in_cbsa( bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
cbsa |
An encoding for a Core Base Statiscal Area. If unsure, use get_cbsas(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing quarterly summary data at the cbsa level.
## Not run: bdate <- "20190101" edate <- "20190601" cbsa <- "16740" param <- "42401" result <- get_annual_summary_in_cbsa(bdate, edate, param, cbsa) result$Data ## End(Not run)
## Not run: bdate <- "20190101" edate <- "20190601" cbsa <- "16740" param <- "42401" result <- get_annual_summary_in_cbsa(bdate, edate, param, cbsa) result$Data ## End(Not run)
Get annual summary data in a county.
get_annual_summary_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_annual_summary_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing annual summary data in a county.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" result <- get_annual_summary_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" result <- get_annual_summary_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get annual summary data at a measurement site.
get_annual_summary_in_site( bdate, edate, param, state.fips, county, site, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_annual_summary_in_site( bdate, edate, param, state.fips, county, site, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing annual summary data for a site.
## Not run: bdate <- "20170618" edate <- "20170618" state.fips <- "37" county <- "183" site <- "0014" param <- "44201" result <- get_annual_summary_in_site(bdate, edate, param, state.fips, county, site) result$Data ## End(Not run)
## Not run: bdate <- "20170618" edate <- "20170618" state.fips <- "37" county <- "183" site <- "0014" param <- "44201" result <- get_annual_summary_in_site(bdate, edate, param, state.fips, county, site) result$Data ## End(Not run)
Get annual summary data in a state.
get_annual_summary_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_annual_summary_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing annual summary data for a state.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" param <- "42401" result <- get_annual_summary_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" param <- "42401" result <- get_annual_summary_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get an API key from the AQS API.
get_aqs_key(user.email)
get_aqs_key(user.email)
user.email |
Email provided by the user to get an API key for. |
## Not run: email <- "[email protected]" get_aqs_key(email) ## End(Not run)
## Not run: email <- "[email protected]" get_aqs_key(email) ## End(Not run)
Get all Core Based Statistical Areas.
get_cbsas()
get_cbsas()
API response containing a list of all Core Based Statistical Areas.
## Not run: cbsas <- get_cbsas() cbsas$Data ## End(Not run)
## Not run: cbsas <- get_cbsas() cbsas$Data ## End(Not run)
Get all counties within a state.
get_counties_in_state(state.fips)
get_counties_in_state(state.fips)
state.fips |
A state FIPS code. Use get_state_fips() to find the appropriate FIPS code. |
API response containing all counties and county codes within a given state.
## Not run: state <- "37" counties.in.state <- get_state_fips(state) counties.in.state$Data ## End(Not run)
## Not run: state <- "37" counties.in.state <- get_state_fips(state) counties.in.state$Data ## End(Not run)
Returns daily summary data given a bounding box (lat, long).
get_daily_summary_in_bbox( bdate, edate, param, minlat, maxlat, minlong, maxlong, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_daily_summary_in_bbox( bdate, edate, param, minlat, maxlat, minlong, maxlong, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
minlat |
Minimum latitude coordinate. |
maxlat |
Maximum latitude coordinate. |
minlong |
Minimum longitude coordinate. |
maxlong |
Maximum longitude coordinate. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing daily summary data bounded by lat long coords.
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_daily_summary_in_bbox(bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_daily_summary_in_bbox(bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
Get daily summary data in a Core Based Statistical Area.
get_daily_summary_in_cbsa( bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_daily_summary_in_cbsa( bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
cbsa |
An encoding for a Core Base Statiscal Area. If unsure, use get_cbsas(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing daily summary data at the CBSA level.
## Not run: bdate <- 20170101 edate <- 20170101 cbsa <- 16740 param <- 42602 result <- get_daily_summary_in_cbsa(bdate, edate, cbsa, param) result$Data ## End(Not run)
## Not run: bdate <- 20170101 edate <- 20170101 cbsa <- 16740 param <- 42602 result <- get_daily_summary_in_cbsa(bdate, edate, cbsa, param) result$Data ## End(Not run)
Returns data summarized by day at the county level.
get_daily_summary_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_daily_summary_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Change begin date. (Optional) |
cedate |
Change end date. (Optional) |
API response containing daily data.
## Not run: param <- 44201 bdate <- 20170618 edate <- 20170618 state <- 37 county <- 183 result <- get_daily_summary_in_county(bdate, edate, state, county, param) result$Data ## End(Not run)
## Not run: param <- 44201 bdate <- 20170618 edate <- 20170618 state <- 37 county <- 183 result <- get_daily_summary_in_county(bdate, edate, state, county, param) result$Data ## End(Not run)
Returns data summarized by day at measurement site level.
get_daily_summary_in_site( bdate, edate, state.fips, county, site, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_daily_summary_in_site( bdate, edate, state.fips, county, site, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Change begin date. (Optional) |
cedate |
Change end date. (Optional) |
API response containing daily data.
## Not run: param <- 44201 bdate <- 20170618 edate <- 20170618 state <- 37 county <- 183 site <- 0014 result <- get_daily_summary_in_site(bdate, edate, state, county, site, param) result$Data ## End(Not run)
## Not run: param <- 44201 bdate <- 20170618 edate <- 20170618 state <- 37 county <- 183 site <- 0014 result <- get_daily_summary_in_site(bdate, edate, state, county, site, param) result$Data ## End(Not run)
Returns daily data at the state level.
get_daily_summary_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
get_daily_summary_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache", cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
cbdate |
Change begin date. (Optional) |
cedate |
Change end date. (Optional) |
API response containing daily data.
## Not run: param <- 44201 bdate <- 20170618 edate <- 20170618 state <- 37 result <- get_daily_summary_in_state(bdate, edate, state, param) result$Data ## End(Not run)
## Not run: param <- 44201 bdate <- 20170618 edate <- 20170618 state <- 37 result <- get_daily_summary_in_state(bdate, edate, state, param) result$Data ## End(Not run)
Get fields required per service.
get_fields_by_service(service)
get_fields_by_service(service)
service |
A service provided by EPA's AQS system. |
## Not run: result <- get_fields_by_service() result$Data ## End(Not run)
## Not run: result <- get_fields_by_service() result$Data ## End(Not run)
Get any known issues within the API.
get_known_issues()
get_known_issues()
## Not run: result <- get_known_issues() result$Data ## End(Not run)
## Not run: result <- get_known_issues() result$Data ## End(Not run)
Get all monitoring sites within a bounding box (lat, long).
get_monitors_in_bbox( bdate, edate, param, minlat, maxlat, minlong, maxlong, cached = TRUE, cache_directory = "/cache" )
get_monitors_in_bbox( bdate, edate, param, minlat, maxlat, minlong, maxlong, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
minlat |
Minimum latitude coordinate. |
maxlat |
Maximum latitude coordinate. |
minlong |
Minimum longitude coordinate. |
maxlong |
Maximum longitude coordinate. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_monitors_in_bbox(bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_monitors_in_bbox(bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
Get monitors within a Core Based Statistical Area.
get_monitors_in_cbsa( bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache" )
get_monitors_in_cbsa( bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
cbsa |
An encoding for a Core Base Statiscal Area. If unsure, use get_cbsas(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" cbsa <- "16740" param <- "42401" result <- get_monitors_in_cbsa(bdate, edate, param, cbsa) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" cbsa <- "16740" param <- "42401" result <- get_monitors_in_cbsa(bdate, edate, param, cbsa) result$Data ## End(Not run)
Get all monitors in a county.
get_monitors_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_monitors_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" result <- get_monitors_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" result <- get_monitors_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get all monitors at a site.
get_monitors_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_monitors_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" site <- "001" result <- get_monitors_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" site <- "001" result <- get_monitors_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get monitors in state.
get_monitors_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_monitors_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" param <- "42401" result <- get_monitors_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" param <- "42401" result <- get_monitors_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get all types of parameters.
get_parameter_classes()
get_parameter_classes()
API response containing types of parameters and their respective code.
## Not run: classes <- get_parameter_classes() classes$Data ## End(Not run)
## Not run: classes <- get_parameter_classes() classes$Data ## End(Not run)
Get all parameters available within a particular parameter class.
get_parameters_in_class(class)
get_parameters_in_class(class)
class |
A type of pollutant. Find types of pollutants with get_parameter_classes(). |
API response containing parameters found within a class/group of like parameters.
## Not run: class <- "AQI POLLUTANTS" parameters <- get_parameters_in_class(class) parameters$Data ## End(Not run)
## Not run: class <- "AQI POLLUTANTS" parameters <- get_parameters_in_class(class) parameters$Data ## End(Not run)
Get quality assurance annual performance evaluations for a monitoring agency.
get_qa_ape_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_qa_ape_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20170101" edate <- "20171231" param <- "44201" agency <- "0013" result <- get_qa_ape_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" param <- "44201" agency <- "0013" result <- get_qa_ape_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get quality assurance annual performance evaluations in a county.
get_qa_ape_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_qa_ape_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" county <- "003" param <- "44201" result <- get_qa_ape_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" county <- "003" param <- "44201" result <- get_qa_ape_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get quality assurance annual performance evaluations for a primary quality assurance organization.
get_qa_ape_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
get_qa_ape_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a primary quality assurance organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20170101" edate <- "20171231" pqao <- "0013" param <- "44201" result <- get_qa_ape_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" pqao <- "0013" param <- "44201" result <- get_qa_ape_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
Get quality assurance annual performance evaluations at a site.
get_qa_ape_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_qa_ape_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20200101" edate <- "20201231" state.fips <- "01" county <- "003" param <- "44201" site <- "0010" result <- get_qa_ape_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20201231" state.fips <- "01" county <- "003" param <- "44201" site <- "0010" result <- get_qa_ape_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quality assurance annual performance evaluations in a state.
get_qa_ape_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_qa_ape_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" param <- "44201" result <- get_qa_ape_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" param <- "44201" result <- get_qa_ape_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get quality assurance blank data for a monitoring agency.
get_qa_blanks_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_qa_blanks_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance blank data.
## Not run: bdate <- "20180101" edate <- "20180131" param <- "88101" agency <- "0013" result <- get_qa_blanks_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20180131" param <- "88101" agency <- "0013" result <- get_qa_blanks_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get quality assurance blank data in a county.
get_qa_blanks_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_qa_blanks_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance blank data.
## Not run: bdate <- "20180101" edate <- "20180131" state.fips <- "01" county <- "033" param <- "88101" result <- get_qa_blanks_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20180131" state.fips <- "01" county <- "033" param <- "88101" result <- get_qa_blanks_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get quality assurance blank data for a primary quality assurance organization.
get_qa_blanks_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
get_qa_blanks_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a primary quality assurance organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance blank data.
## Not run: bdate <- "20180101" edate <- "20180131" param <- "88101" pqao <- "0013" result <- get_qa_blanks_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20180131" param <- "88101" pqao <- "0013" result <- get_qa_blanks_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
Get quality assurance blank data at a site.
get_qa_blanks_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_qa_blanks_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance blank data.
## Not run: bdate <- "20180101" edate <- "20180131" state.fips <- "01" county <- "033" param <- "88101" site <- "1002" result <- get_qa_blanks_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20180131" state.fips <- "01" county <- "033" param <- "88101" site <- "1002" result <- get_qa_blanks_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quality assurance blank data in a state.
get_qa_blanks_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_qa_blanks_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance blank data.
## Not run: bdate <- "20180101" edate <- "20180131" state.fips <- "01" param <- "88101" result <- get_qa_blanks_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20180131" state.fips <- "01" param <- "88101" result <- get_qa_blanks_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get quality assurance collocated assessment data for a monitoring agency.
get_qa_ca_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_qa_ca_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20190101" edate <- "20190131" param <- "88101" agency <- "0013" result <- get_qa_ca_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20190101" edate <- "20190131" param <- "88101" agency <- "0013" result <- get_qa_ca_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get quality assurance collocated assessment data in a county.
get_qa_ca_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_qa_ca_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20190101" edate <- "20190131" state.fips <- "01" county <- "089" param <- "88101" result <- get_qa_ca_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20190101" edate <- "20190131" state.fips <- "01" county <- "089" param <- "88101" result <- get_qa_ca_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get quality assurance collocated assessment data for a primary quality assurance organization.
get_qa_ca_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
get_qa_ca_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a primary quality assurance organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20190101" edate <- "20190131" param <- "88101" pqao <- "0013" result <- get_qa_ca_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20190101" edate <- "20190131" param <- "88101" pqao <- "0013" result <- get_qa_ca_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
Get quality assurance collocated assessment data at a site.
get_qa_ca_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_qa_ca_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20190101" edate <- "20190131" state.fips <- "01" county <- "089" param <- "88101" site <- "0014" result <- get_qa_ca_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20190101" edate <- "20190131" state.fips <- "01" county <- "089" param <- "88101" site <- "0014" result <- get_qa_ca_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quality assurance collocated assessment data in a state.
get_qa_ca_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_qa_ca_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations.
## Not run: bdate <- "20190101" edate <- "20190131" state.fips <- "01" param <- "88101" result <- get_qa_ca_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20190101" edate <- "20190131" state.fips <- "01" param <- "88101" result <- get_qa_ca_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get quality assurance flow rate audit data for a monitoring agency.
get_qa_fra_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_qa_fra_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate audit data.
## Not run: bdate <- "20200101" edate <- "20200131" param <- "88101" agency <- "0013" result <- get_qa_fra_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" param <- "88101" agency <- "0013" result <- get_qa_fra_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get quality assurance flow rate audit data in a county.
get_qa_fra_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_qa_fra_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate audit data.
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" county <- "003" param <- "88101" result <- get_qa_fra_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" county <- "003" param <- "88101" result <- get_qa_fra_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get quality assurance flow rate audit data for a primary quality assurance organization.
get_qa_fra_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
get_qa_fra_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a primary quality assurance organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate audit data.
## Not run: bdate <- "20200101" edate <- "20200131" param <- "88101" pqao <- "0013" result <- get_qa_fra_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" param <- "88101" pqao <- "0013" result <- get_qa_fra_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
Get quality assurance flow rate audit data at a site.
get_qa_fra_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_qa_fra_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate audit data.
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" county <- "003" param <- "88101" site <- "0010" result <- get_qa_fra_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" county <- "003" param <- "88101" site <- "0010" result <- get_qa_fra_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quality assurance flow rate audit data in a state.
get_qa_fra_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_qa_fra_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate audit data.
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" param <- "88101" result <- get_qa_fra_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" param <- "88101" result <- get_qa_fra_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get quality assurance flow rate verification data for a monitoring agency.
get_qa_frv_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_qa_frv_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate verification data.
## Not run: bdate <- "20200101" edate <- "20200131" param <- "88101" agency <- "0013" result <- get_qa_frv_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" param <- "88101" agency <- "0013" result <- get_qa_frv_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get quality assurance flow rate verification data in a county.
get_qa_frv_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_qa_frv_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate verification data.
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" county <- "003" param <- "88101" result <- get_qa_frv_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" county <- "003" param <- "88101" result <- get_qa_frv_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get quality assurance flow rate verification data for a primary quality assurance organization.
get_qa_frv_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
get_qa_frv_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a primary quality assurance organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate verification data.
## Not run: bdate <- "20200101" edate <- "20200131" param <- "88101" pqao <- "0013" result <- get_qa_frv_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" param <- "88101" pqao <- "0013" result <- get_qa_frv_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
Get quality assurance flow rate verification data at a site.
get_qa_frv_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_qa_frv_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate verification data.
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" county <- "003" param <- "88101" site <- "0010" result <- get_qa_frv_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" county <- "003" param <- "88101" site <- "0010" result <- get_qa_frv_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quality assurance flow rate verification data in a state.
get_qa_frv_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_qa_frv_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance flow rate verification data.
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" param <- "88101" result <- get_qa_frv_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200131" state.fips <- "01" param <- "88101" result <- get_qa_frv_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get quality assurance PEP audit data for a monitoring agency.
get_qa_pep_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_qa_pep_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance PEP audit data.
## Not run: bdate <- "20180101" edate <- "20181231" param <- "88101" agency <- "0013" result <- get_qa_pep_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20181231" param <- "88101" agency <- "0013" result <- get_qa_pep_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get quality assurance PEP audit data in a county.
get_qa_pep_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_qa_pep_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance PEP audit data.
## Not run: bdate <- "20180101" edate <- "20181231" state.fips <- "01" county <- "089" param <- "88101" result <- get_qa_pep_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20181231" state.fips <- "01" county <- "089" param <- "88101" result <- get_qa_pep_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get quality assurance PEP audit data for a primary quality assurance organization.
get_qa_pep_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
get_qa_pep_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a primary quality assurance organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance PEP audit data.
## Not run: bdate <- "20180101" edate <- "20181231" param <- "88101" pqao <- "0013" result <- get_qa_pep_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20181231" param <- "88101" pqao <- "0013" result <- get_qa_pep_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
Get quality assurance PEP audit data at a site.
get_qa_pep_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_qa_pep_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance PEP audit data.
## Not run: bdate <- "20180101" edate <- "20181231" state.fips <- "01" county <- "089" param <- "88101" site <- "0014" result <- get_qa_pep_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20181231" state.fips <- "01" county <- "089" param <- "88101" site <- "0014" result <- get_qa_pep_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quality assurance PEP audit data in a state.
get_qa_pep_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_qa_pep_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance PEP audit data.
## Not run: bdate <- "20180101" edate <- "20181231" state.fips <- "01" param <- "88101" result <- get_qa_pep_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20180101" edate <- "20181231" state.fips <- "01" param <- "88101" result <- get_qa_pep_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get quality assurance one point quality control data for a monitoring agency.
get_qa_qc_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_qa_qc_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance one point quality control data.
## Not run: bdate <- "20170101" edate <- "20171231" param <- "44201" agency <- "0013" result <- get_qa_qc_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" param <- "44201" agency <- "0013" result <- get_qa_qc_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get quality assurance annual one point quality control data in a county.
get_qa_qc_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_qa_qc_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance one point quality control data.
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" county <- "003" param <- "44201" result <- get_qa_qc_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" county <- "003" param <- "44201" result <- get_qa_qc_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get quality assurance one point quality control data for a primary quality assurance organization.
get_qa_qc_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
get_qa_qc_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a primary quality assurance organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance one point quality control data.
## Not run: bdate <- "20170101" edate <- "20171231" pqao <- "0013" param <- "44201" result <- get_qa_qc_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" pqao <- "0013" param <- "44201" result <- get_qa_qc_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
Get quality assurance one point quality control data at a site.
get_qa_qc_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_qa_qc_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance one point quality control data.
## Not run: bdate <- "20200101" edate <- "20201231" state.fips <- "01" county <- "003" param <- "44201" site <- "0010" result <- get_qa_qc_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20201231" state.fips <- "01" county <- "003" param <- "44201" site <- "0010" result <- get_qa_qc_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quality assurance one point quality control data in a state.
get_qa_qc_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_qa_qc_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance one point quality control data.
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" param <- "44201" result <- get_qa_qc_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" param <- "44201" result <- get_qa_qc_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get quarterly summary data in a bounding box (lat, long).
get_quarterly_summary_in_bbox( bdate, edate, param, minlat, maxlat, minlong, maxlong, cbdate = NULL, cedate = NULL )
get_quarterly_summary_in_bbox( bdate, edate, param, minlat, maxlat, minlong, maxlong, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
minlat |
Minimum latitude coordinate. |
maxlat |
Maximum latitude coordinate. |
minlong |
Minimum longitude coordinate. |
maxlong |
Maximum longitude coordinate. |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing quarterly summary data in a bounding box.
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_quarterly_summary_in_bbox(bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_quarterly_summary_in_bbox(bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
Get quarterly summary data in a Core Based Statistical Area.
get_quarterly_summary_in_cbsa( bdate, edate, param, cbsa, cbdate = NULL, cedate = NULL )
get_quarterly_summary_in_cbsa( bdate, edate, param, cbsa, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
cbsa |
An encoding for a Core Base Statiscal Area. If unsure, use get_cbsas(). |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing quarterly summary data at the cbsa level.
## Not run: bdate <- "20190101" edate <- "20190601" cbsa <- "16740" param <- "42401" result <- get_quarterly_summary_in_cbsa(bdate, edate, param, cbsa) result$Data ## End(Not run)
## Not run: bdate <- "20190101" edate <- "20190601" cbsa <- "16740" param <- "42401" result <- get_quarterly_summary_in_cbsa(bdate, edate, param, cbsa) result$Data ## End(Not run)
Get quarterly summary data in a county.
get_quarterly_summary_in_county( bdate, edate, state.fips, county, param, cbdate = NULL, cedate = NULL )
get_quarterly_summary_in_county( bdate, edate, state.fips, county, param, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing quarterly summary data in a county.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" result <- get_quarterly_summary_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" result <- get_quarterly_summary_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Returns data summaries by yearly quarter.
get_quarterly_summary_in_site( bdate, edate, state.fips, county, param, site, cbdate = NULL, cedate = NULL )
get_quarterly_summary_in_site( bdate, edate, state.fips, county, param, site, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing quarterly summary data at a site.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" site <- "001" param <- "42401" result <- get_quarterly_summary_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" site <- "001" param <- "42401" result <- get_quarterly_summary_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quarterly summary data in a state.
get_quarterly_summary_in_state( bdate, edate, state.fips, param, cbdate = NULL, cedate = NULL )
get_quarterly_summary_in_state( bdate, edate, state.fips, param, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing quarterly summary data for a state.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" param <- "42401" result <- get_quarterly_summary_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" param <- "42401" result <- get_quarterly_summary_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get the API's revision history.
get_revision_history()
get_revision_history()
## Not run: result <- get_revision_history() result$Data ## End(Not run)
## Not run: result <- get_revision_history() result$Data ## End(Not run)
Get samples (finest grained data) for a bounding box (lat, long).
get_samples_in_bbox( bdate, edate, minlat, maxlat, minlong, maxlong, param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
get_samples_in_bbox( bdate, edate, minlat, maxlat, minlong, maxlong, param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
minlat |
Minimum latitude coordinate. |
maxlat |
Maximum latitude coordinate. |
minlong |
Minimum longitude coordinate. |
maxlong |
Maximum longitude coordinate. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_samples_in_bbox(bdate = bdate, edate = edate, param = param, minlat = minlat, maxlat = maxlat, minlong = minlong, maxlong = maxlong) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- get_samples_in_bbox(bdate = bdate, edate = edate, param = param, minlat = minlat, maxlat = maxlat, minlong = minlong, maxlong = maxlong) result$Data ## End(Not run)
Get samples (finest grained data) for a Core Based Statistical Area.
get_samples_in_cbsa( bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
get_samples_in_cbsa( bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
cbsa |
An encoding for a Core Base Statiscal Area. If unsure, use get_cbsas(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Change begin date. (Optional) |
cedate |
Change end date. (Optional) |
API response containing sample measurements in a CBSA.
## Not run: bdate <- "20200101" edate <- "20200102" cbsa <- "16740" param <- "42401" result <- get_samples_in_cbsa(bdate, edate, cbsa, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" cbsa <- "16740" param <- "42401" result <- get_samples_in_cbsa(bdate, edate, cbsa, param) result$Data ## End(Not run)
Get samples (finest grained data) for a county.
get_samples_in_county( bdate, edate, state.fips, param, county, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
get_samples_in_county( bdate, edate, state.fips, param, county, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
county |
County code. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Change begin date. (Optional) |
cedate |
Change end date. (Optional) |
API response containing sample measurements in a state.
## Not run: bdate <- "20160101" edate <- "20160102" state.fips <- "15" county <- "001" param <- "42401" result <- get_samples_in_county(bdate = bdate, edate = edate, param = param, state.fips = state.fips, county = county) result$Data ## End(Not run)
## Not run: bdate <- "20160101" edate <- "20160102" state.fips <- "15" county <- "001" param <- "42401" result <- get_samples_in_county(bdate = bdate, edate = edate, param = param, state.fips = state.fips, county = county) result$Data ## End(Not run)
Get samples (finest grained data) for a measurement site.
get_samples_in_site( bdate, edate, state.fips, county, site, param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
get_samples_in_site( bdate, edate, state.fips, county, site, param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Change begin date. (Optional) |
cedate |
Change end date. (Optional) |
API response containing samples at given site.
## Not run: bdate <- "20160101" edate <- "20160102" state.fips <- "15" county <- "001" param <- "42401" site <- "0007" cbdate <- "20200101" cedate <- "20201231" result <- get_samples_in_site(bdate = bdate, edate = edate, param = param, state.fips = state.fips, county = county, site = site) result$Data ## End(Not run)
## Not run: bdate <- "20160101" edate <- "20160102" state.fips <- "15" county <- "001" param <- "42401" site <- "0007" cbdate <- "20200101" cedate <- "20201231" result <- get_samples_in_site(bdate = bdate, edate = edate, param = param, state.fips = state.fips, county = county, site = site) result$Data ## End(Not run)
Get samples (finest grained data) for a state.
get_samples_in_state( bdate = bdate, edate = edate, state.fips = state.fips, param = param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
get_samples_in_state( bdate = bdate, edate = edate, state.fips = state.fips, param = param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Change begin date. (Optional) |
cedate |
Change end date. (Optional) |
API response containing sample measurements in a state.
## Not run: bdate <- "20160101" edate <- "20160102" state.fips <- "15" param <- "42401" result <- get_samples_in_state(bdate = bdate, edate = edate, param = param, state.fips = state.fips) result$Data ## End(Not run)
## Not run: bdate <- "20160101" edate <- "20160102" state.fips <- "15" param <- "42401" result <- get_samples_in_state(bdate = bdate, edate = edate, param = param, state.fips = state.fips) result$Data ## End(Not run)
Get all measurement sites within a county.
get_sites_in_county(state.fips, county.code)
get_sites_in_county(state.fips, county.code)
state.fips |
A state FIPS code. Use get_state_fips() to find the appropriate FIPS code. |
county.code |
A county code. Use get_counties_in_state() to find the appropriate code for a given county. |
API response containing all measurement sites within a given county.
## Not run: state <- "37" county.code <- "001" measurement.sites <- get_sites_in_county(state, county.code) measurement.sites$Data ## End(Not run)
## Not run: state <- "37" county.code <- "001" measurement.sites <- get_sites_in_county(state, county.code) measurement.sites$Data ## End(Not run)
Get all FIPS codes for each US state.
get_state_fips()
get_state_fips()
API response containing states and their respective FIPS codes.
## Not run: state.fips <- get_state_fips() state.fips$Data ## End(Not run)
## Not run: state.fips <- get_state_fips() state.fips$Data ## End(Not run)
Get quality assurance annual performance evaluations for a monitoring agency in transaction format.
get_tf_qa_ape_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_tf_qa_ape_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations in transaction format.
## Not run: bdate <- "20170101" edate <- "20171231" param <- "44201" agency <- "0013" result <- get_tf_qa_ape_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" param <- "44201" agency <- "0013" result <- get_tf_qa_ape_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get quality assurance annual performance evaluations in a county in transaction format.
get_tf_qa_ape_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_tf_qa_ape_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations in transaction format.
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" county <- "003" param <- "44201" result <- get_tf_qa_ape_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" county <- "003" param <- "44201" result <- get_tf_qa_ape_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get quality assurance annual performance evaluations for a primary quality assurance organization in transaction format.
get_tf_qa_ape_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
get_tf_qa_ape_in_pqao( bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a primary quality assurance organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations in transaction format.
## Not run: bdate <- "20170101" edate <- "20171231" pqao <- "0013" param <- "44201" result <- get_tf_qa_ape_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" pqao <- "0013" param <- "44201" result <- get_tf_qa_ape_in_pqao(bdate, edate, param, pqao) result$Data ## End(Not run)
Get quality assurance annual performance evaluations at a site in transaction format.
get_tf_qa_ape_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_tf_qa_ape_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations in transaction format.
## Not run: bdate <- "20200101" edate <- "20201231" state.fips <- "01" county <- "003" param <- "44201" site <- "0010" result <- get_tf_qa_ape_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20201231" state.fips <- "01" county <- "003" param <- "44201" site <- "0010" result <- get_tf_qa_ape_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get quality assurance annual performance evaluations in a state in transaction format.
get_tf_qa_ape_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_tf_qa_ape_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing operational information about the quality assurance annual performance evaluations in transaction format.
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" param <- "44201" result <- get_tf_qa_ape_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20170101" edate <- "20171231" state.fips <- "01" param <- "44201" result <- get_tf_qa_ape_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Get sample data in the transaction format for a monitoring agency.
get_tf_sample_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
get_tf_sample_in_agency( bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing all sample data in submission format.
## Not run: bdate <- "20200101" edate <- "20200331" state.fips <- "01" param <- "44201" agency <- "0013" result <- get_tf_sample_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200331" state.fips <- "01" param <- "44201" agency <- "0013" result <- get_tf_sample_in_agency(bdate, edate, param, agency) result$Data ## End(Not run)
Get sample data in the transaction format in a county.
get_tf_sample_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
get_tf_sample_in_county( bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing all sample data in submission format.
## Not run: bdate <- "20200101" edate <- "20200331" state.fips <- "01" county <- "003" param <- "44201" result <- get_tf_sample_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200331" state.fips <- "01" county <- "003" param <- "44201" result <- get_tf_sample_in_county(bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Get sample data in the transaction format at a site.
get_tf_sample_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
get_tf_sample_in_site( bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing all sample data in submission format.
## Not run: bdate <- "20200101" edate <- "20200331" state.fips <- "01" county <- "003" param <- "44201" site <- "0010" result <- get_tf_sample_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200331" state.fips <- "01" county <- "003" param <- "44201" site <- "0010" result <- get_tf_sample_in_site(bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Get sample data in the transaction format in a state.
get_tf_sample_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
get_tf_sample_in_state( bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache" )
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
API response containing all sample data in submission format.
## Not run: bdate <- "20200101" edate <- "20200331" state.fips <- "01" param <- "44201" result <- get_tf_sample_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200331" state.fips <- "01" param <- "44201" result <- get_tf_sample_in_state(bdate, edate, state.fips, param) result$Data ## End(Not run)
Transpose a data frame
get.transpose(df)
get.transpose(df)
df |
Data frame to be transposed |
The transposed data frame. First variable entries become column names.
service <- c("Sign up") description <- c("Email will\r\n\t\t\t\t\t\t\t be sent to the registered address from [email protected].") df <- data.frame(service, description) t.df <- epair:::get.transpose(df) t.df
service <- c("Sign up") description <- c("Email will\r\n\t\t\t\t\t\t\t be sent to the registered address from aqsdatamart@epa.gov.") df <- data.frame(service, description) t.df <- epair:::get.transpose(df) t.df
Check if the API is up and running
is_API_running()
is_API_running()
## Not run: is_API_running() ## End(Not run)
## Not run: is_API_running() ## End(Not run)
Shows contents of cache directory
list.cached.data(directory = "/cache")
list.cached.data(directory = "/cache")
directory |
Place inside user-level cache directory that was used to store the cached data previously. Default: "/cache". |
Character vector of file names currently in cache directory.
## Not run: my.files <- list.cached.data() my.files ## End(Not run)
## Not run: my.files <- list.cached.data() my.files ## End(Not run)
Remove tabs, new lines, and empty spaces from entries in a list
list.remove.escapes.spaces(a.list)
list.remove.escapes.spaces(a.list)
a.list |
List to remove entries from. |
A list without tabs, new lines, and empty spaces
service <- c("Sign up") description <- c("Email will\r\n\t\t\t\t\t\t\t be sent to the registered address from [email protected].") og_list <- list("service" = service, "description" = description) clean <- epair:::remove.escapes.spaces(og_list) clean
service <- c("Sign up") description <- c("Email will\r\n\t\t\t\t\t\t\t be sent to the registered address from aqsdatamart@epa.gov.") og_list <- list("service" = service, "description" = description) clean <- epair:::remove.escapes.spaces(og_list) clean
Replace every string entry in a list
list.string.replacer(entry.list, pattern, replacement)
list.string.replacer(entry.list, pattern, replacement)
entry.list |
List containing character entries |
pattern |
Pattern to replace |
replacement |
Replacement for entries following the pattern |
A list with entries matching the pattern replaced by replacement
services <- list("\t Some text from the table") services <- epair:::list.string.replacer(services, "\t", "") services
services <- list("\t Some text from the table") services <- epair:::list.string.replacer(services, "\t", "") services
Internal function to perform geospatial lookup by bounding box (lat, long).
lookup_by_bbox( endpoint, bdate, edate, param, minlat, maxlat, minlong, maxlong, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
lookup_by_bbox( endpoint, bdate, edate, param, minlat, maxlat, minlong, maxlong, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
endpoint |
Base url to make call. |
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
minlat |
Minimum latitude coordinate. |
maxlat |
Maximum latitude coordinate. |
minlong |
Minimum longitude coordinate. |
maxlong |
Maximum longitude coordinate. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing bbox bounded data.
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- lookup_by_bbox(MONITORS, bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" param <- "42401" minlat <- 33.3 maxlat <- 33.6 minlong <- -87 maxlong <- -86.7 result <- lookup_by_bbox(MONITORS, bdate, edate, param, minlat, maxlat, minlong, maxlong) result$Data ## End(Not run)
Internal function to perform geospatial lookup by Core Based Statistical Area.
lookup_by_cbsa( endpoint, bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
lookup_by_cbsa( endpoint, bdate, edate, param, cbsa, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
endpoint |
Base url to make call. |
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
cbsa |
An encoding for a Core Base Statiscal Area. If unsure, use get_cbsas(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing data at the cbsa level.
## Not run: bdate <- "20200101" edate <- "20200102" cbsa <- "16740" param <- "42401" result <- lookup_by_cbsa(MONITORS, bdate, edate, param, cbsa) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" cbsa <- "16740" param <- "42401" result <- lookup_by_cbsa(MONITORS, bdate, edate, param, cbsa) result$Data ## End(Not run)
Internal function to perform geospatial lookup by county.
lookup_by_county( endpoint, bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
lookup_by_county( endpoint, bdate, edate, state.fips, county, param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
endpoint |
Base url to make call. |
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" result <- lookup_by_county(MONITORS, bdate, edate, state.fips, county, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" param <- "42401" result <- lookup_by_county(MONITORS, bdate, edate, state.fips, county, param) result$Data ## End(Not run)
Internal function to perform geospatial lookup by monitoring agency.
lookup_by_ma( endpoint, bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
lookup_by_ma( endpoint, bdate, edate, param, agency, cached = TRUE, cache_directory = "/cache" )
endpoint |
Base url to make call. |
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
agency |
The monitoring agency. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
## Not run: bdate <- "20200101" edate <- "20201231" param <- "44201" agency <- "0013" result <- lookup_by_ma(QA_APE, bdate, edate, param, agency) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20201231" param <- "44201" agency <- "0013" result <- lookup_by_ma(QA_APE, bdate, edate, param, agency) result$Data ## End(Not run)
Internal function to perform geospatial lookup by primary quality assurance organization.
lookup_by_pqao( endpoint, bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
lookup_by_pqao( endpoint, bdate, edate, param, pqao, cached = TRUE, cache_directory = "/cache" )
endpoint |
Base url to make call. |
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
param |
Pollutant parameter that site is measuring. |
pqao |
An encoding for a Primary Quality Assurance Organization. If unsure, use get_all_pqaos(). |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
## Not run: bdate <- "20200101" edate <- "20201231" param <- "44201" pqao <- "0013" result <- lookup_by_pqao(QA_APE, bdate, edate, param, pqao) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20201231" param <- "44201" pqao <- "0013" result <- lookup_by_pqao(QA_APE, bdate, edate, param, pqao) result$Data ## End(Not run)
Internal function to perform geospatial lookup by site.
lookup_by_site( endpoint, bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
lookup_by_site( endpoint, bdate, edate, state.fips, county, param, site, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
endpoint |
Base url to make call. |
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
county |
County code. Use get_counties_in_state() if unsure. |
param |
Pollutant parameter that site is measuring. |
site |
Measurement site code. Use get_sites_by_county() if unsure. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" site <- "001" param <- "42401" result <- lookup_by_site(MONITORS, bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" county <- "001" site <- "001" param <- "42401" result <- lookup_by_site(MONITORS, bdate, edate, state.fips, county, param, site) result$Data ## End(Not run)
Internal function to perform geospatial lookup by state.
lookup_by_state( endpoint, bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
lookup_by_state( endpoint, bdate, edate, state.fips, param, cached = TRUE, cache_directory = "/cache", duration = NULL, cbdate = NULL, cedate = NULL )
endpoint |
Base url to make call. |
bdate |
Beginning date to check. Year, month, day format. |
edate |
Ending date to check. Year, month, day format. |
state.fips |
State FIPS code. Use get_state_fips() if unsure. |
param |
Pollutant parameter that site is measuring. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. (Optional) |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". (Optional) |
duration |
The 1-character AQS sample duration code. (Optional) |
cbdate |
Beginning date of last change to DB. (Optional) |
cedate |
Ending date of last change to DB. (Optional) |
API response containing operational information about the monitor.
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" param <- "42401" result <- lookup_by_state(MONITORS, bdate, edate, state.fips, param) result$Data ## End(Not run)
## Not run: bdate <- "20200101" edate <- "20200102" state.fips <- "37" param <- "42401" result <- lookup_by_state(MONITORS, bdate, edate, state.fips, param) result$Data ## End(Not run)
Perform call and convert data into list
non.cached.perform.call(endpoint, variables = list())
non.cached.perform.call(endpoint, variables = list())
endpoint |
An endpoint from the available EPA API endpoints |
variables |
A list of variables or a single variable to filter the EPA API endpoint. |
A list containing requested data
## Not run: endpoint <- 'list/states' result <- non.cached.perform.call(endpoint) ## End(Not run)
## Not run: endpoint <- 'list/states' result <- non.cached.perform.call(endpoint) ## End(Not run)
Cached version of the perform.call function
perform.call( endpoint, variables = list(), cached = TRUE, cache_directory = "/cache" )
perform.call( endpoint, variables = list(), cached = TRUE, cache_directory = "/cache" )
endpoint |
An endpoint from the available EPA API endpoints |
variables |
A list of variables or a single variable to filter the EPA API endpoint. |
cached |
TRUE or FALSE specifying if the data from the call is to be cached. Default: TRUE. |
cache_directory |
Place inside user-level cache directory to store the cached data. Default: "/cache". |
A list containing requested data
## Not run: endpoint <- 'list/states' result <- perform.call(endpoint) ## End(Not run)
## Not run: endpoint <- 'list/states' result <- perform.call(endpoint) ## End(Not run)
Perform call and keep original result
perform.call.raw(endpoint, variables = list())
perform.call.raw(endpoint, variables = list())
endpoint |
An endpoint from the available EPA API endpoints |
variables |
A list of variables or a single variable to filter the EPA API endpoint. |
A list containing result from query to EPA API
## Not run: endpoint <- 'list/states' result <- perform.call.raw(endpoint) ## End(Not run)
## Not run: endpoint <- 'list/states' result <- perform.call.raw(endpoint) ## End(Not run)
Place the URL as a call to the EPA API
place.call(url)
place.call(url)
url |
A string with a valid URL for the EPA API |
Result of query from the API
## Not run: url <- "user_url" result <- place.call(url) ## End(Not run)
## Not run: url <- "user_url" result <- place.call(url) ## End(Not run)
Perform call and maintain JSON Lite structure
place.call.raw(url)
place.call.raw(url)
url |
URL following structure from EPA API |
Results of data request in JSON format
## Not run: endpoint <- 'list/states' call <- create.base.call(endpoint) raw.call <- place.call.raw(call) raw.call ## End(Not run)
## Not run: endpoint <- 'list/states' call <- create.base.call(endpoint) raw.call <- place.call.raw(call) raw.call ## End(Not run)
Remove tabs, new lines, and empty spaces from entries in a data frame
remove.escapes.spaces(df)
remove.escapes.spaces(df)
df |
Data frame to remove tabs, new lines, and empty spaces from |
Data frame without tabs, new lines, and empty spaces
service <- c("Sign up") description <- c("Email will\r\n\t\t\t\t\t\t\t be sent to the registered address from [email protected].") og.df <- data.frame(service, description) clean.df <- epair:::remove.escapes.spaces(og.df) clean.df
service <- c("Sign up") description <- c("Email will\r\n\t\t\t\t\t\t\t be sent to the registered address from aqsdatamart@epa.gov.") og.df <- data.frame(service, description) clean.df <- epair:::remove.escapes.spaces(og.df) clean.df
Retrieves memory of previously cached call.
retrieve.cached.call(endpoint, variables = list(), directory = "/cache")
retrieve.cached.call(endpoint, variables = list(), directory = "/cache")
endpoint |
An endpoint from the available EPA API endpoints |
variables |
A list of variables or a single variable to filter the EPA API endpoint. |
directory |
Place inside user-level cache directory that was used to store the cached data previously. Default: "/cache". |
A list containing requested data
endpoint <- 'list/states' retrieve.cached.call(endpoint)
endpoint <- 'list/states' retrieve.cached.call(endpoint)
Saves a new call that has not been previously cached yet.
save.new.cached.call(endpoint, variables = list(), directory = "/cache")
save.new.cached.call(endpoint, variables = list(), directory = "/cache")
endpoint |
An endpoint from the available EPA API endpoints |
variables |
A list of variables or a single variable to filter the EPA API endpoint. |
directory |
Place inside user-level cache directory that was used to store the cached data previously. Default: "/cache". |
A list containing requested data
## Not run: endpoint <- 'list/states' save.new.cached.call(endpoint) ## End(Not run)
## Not run: endpoint <- 'list/states' save.new.cached.call(endpoint) ## End(Not run)
The service.names list contains names of all services offered by the EPA API along with a description of each service.
The services list contains comprehensive information about all services provided by the EPA API site.
Replace all characters entries in data frame
string.replacer(df, pattern, replacement)
string.replacer(df, pattern, replacement)
df |
Data frame containing character entries |
pattern |
Pattern to use for matching |
replacement |
Replacement of entries matching pattern |
A data frame with entries following the pattern being replaced by replacement
df <- data.frame(c("1", "2", "3", "4")) modified.df <- epair:::string.replacer(df, "1", "One") modified.df
df <- data.frame(c("1", "2", "3", "4")) modified.df <- epair:::string.replacer(df, "1", "One") modified.df
The variable.types list contains the listing endpoints for finding out more information in making calls requiring more variables.
The variables data frame contains information about what variables can be used to build queries in the EPA API.