aqs_monitors_by_box: aqs_monitors_by_box

View source: R/bybox.R

aqs_monitors_by_boxR Documentation

aqs_monitors_by_box

Description

\lifecycle

stable Returns a table of monitors and related metadata sites with the provided parameter, aggregated by latitude/longitude bounding box (_by_box) for bdate - edate time frame.

Usage

aqs_monitors_by_box(
  parameter,
  bdate,
  edate,
  minlat,
  maxlat,
  minlon,
  maxlon,
  return_header = FALSE
)

Arguments

parameter

a character list or a single character string which represents the parameter code of the air pollutant related to the data being requested.

bdate

a R date object which represents that begin date of the data selection. Only data on or after this date will be returned.

edate

a R date object which represents that end date of the data selection. Only data on or before this date will be returned.

minlat

a R character object which represents the minimum latitude of a geographic box. Decimal latitude with north begin positive. Only data north of this latitude will be returned.

maxlat

a R character object which represents the maximum latitude of a geographic box. Decimal latitude with north begin positive. Only data south of this latitude will be returned.

minlon

a R character object which represents the minimum longitude of a geographic box. Decimal longitude with east begin positive. Only data east of this longitude will be returned.

maxlon

a R character object which represents the maximum longitude of a geographic box. Decimal longitude with east begin positive. Only data west of this longitude will be returned. Note that -80 is less than -70.

return_header

If FALSE (default) only returns data requested. If TRUE returns a AQSAPI_v2 object which is a two item list that contains header information returned from the API server mostly used for debugging purposes in addition to the data requested.

Value

a tibble or an AQS_Data Mart_APIv2 S3 object of monitors from a latitude/longitude bounding box (_by_box).

by_box aggregate functions

NA

Note

All monitors that operated between the bdate and edate will be returned

See Also

Other Aggregate _by_box functions: aqs_annualsummary_by_box(), aqs_sampledata_by_box()

Examples

#  Returns a tibble of all ozone
          #  monitors in the vicinity of central Alabama that operated in
          #  1995
          ## Not run: aqs_monitors_by_box(parameter="44201",
                                       bdate=as.Date("19950101",
                                                     format="%Y%m%d"),
                                       edate=as.Date("19951231",
                                                     format="%Y%m%d"),
                                       minlat="33.3",
                                       maxlat="33.6",
                                       minlon="-87.0",
                                       maxlon="-86.7"
                                       )
                   
## End(Not run)

USEPA/RAQSAPI documentation built on Jan. 18, 2024, 1:50 a.m.