pas_filterArea {AirSensor}R Documentation

Rectangle area filtering for PurpleAir Synoptic objects

Description

Filters pas object sensors based on a bounding box.

Usage

pas_filterArea(pas = NULL, w = NULL, e = NULL, s = NULL, n = NULL)

Arguments

pas

PurpleAir Synoptic pas object.

w

West edge of area bounding box (deg E).

e

East edge of area bounding box (deg E).

s

South edge of area bounding box (deg N).

n

North edge of area bounding box (deg N).

Value

A subset of the given pas object.

See Also

pas_filter, pas_filterNear

Examples

library(AirSensor)

pas <- example_pas
range(pas$longitude)
range(pas$latitude)
scsb <- 
  pas %>%
  pas_filterArea(
    w = -118.10,
    e = -118.07,
    s = 33.75,
    n = 33.78
  )
range(scsb$longitude)
range(scsb$latitude)

if ( interactive() ) {
  pas_leaflet(scsb)
}


[Package AirSensor version 1.0.8 Index]