Description Usage Arguments Value See Also Examples
Load the PAS within a specified area
1 2 3 4 5 6 7 8 9 10 11 | get_area_pas(
state_code = input_stateCode,
west = input_west,
east = input_east,
south = input_south,
north = input_north,
labels = input_labels,
datestamp = input_enddate,
startdate = input_startdate,
archive_url = "https://airsensor.aqmd.gov/PurpleAir/v1/"
)
|
state_code |
Character, optional. State of monitors to include. If NULL/unspecified, all monitors specified in the above boundaries will be included regardless of state. |
west |
Numeric; The western boundary coordinate |
east |
Numeric; The eastern boundary coordinate |
south |
Numeric; The southern boundary coordinate |
north |
Numeric; The northern boundary coordinate |
labels |
Character list, optional; Labels of monitors to include. If |
datestamp |
Character; Important argument for loading historical data, as not all monitors might be actively reporting anymore. Format: "YYYY-MM-DD". |
startdate |
Character; Relevant for calculating lookback days (the maximum number of days to go back and try to load data if the requested date cannot be retrieved). Format: "YYYY-MM-DD". |
archive_url |
Character; see setArchiveBaseUrl. Known options include:
|
A dataframe returning all PAS within the defined area
Other PA API functions:
get_area_pat()
,
get_ids()
,
wrangle_data()
1 2 3 | get_area_pas("OR", -122.854, 45.4, -122.58, 45.6,
c("se", "SE", "Se", "\\bSTAR\\b", "\\bPSU\\b"),
datestamp = "2020-07-07", startdate = "2020-07-01")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.