Skip to contents

[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 the begin date of the data selection. Only data on or after this date will be returned.

edate

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

minlat

a R character object that represents the minimum latitude of a geographic box. Decimal latitude with north being 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 being 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_DataMart_APIv2 S3 object of monitors from a latitude/longitude bounding box (_by_box).

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
          if (FALSE) 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'
                                       )
                    # \dontrun{}