pas_filterArea: Rectangle area filtering for PurpleAir Synoptic objects

View source: R/pas_filterArea.R

pas_filterAreaR 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 containing only records within the bounding box. This includes sensors located precisely on a boundary.

See Also

pas_filter

pas_filterNear

pas_filterNearMonitor

Examples

library(AirSensor2)

pas <- example_pas_pm25
range(pas$longitude)
range(pas$latitude)

Lane_County_pas <-
  pas %>%
  pas_filterArea(
    w = -124.16,
    e = -121.76,
    s = 43.43,
    n = 44.30
  )

range(Lane_County_pas$longitude)
range(Lane_County_pas$latitude)

if ( interactive() ) {
  pas_leaflet(Lane_County_pas)
}


MazamaScience/AirSensor2 documentation built on Oct. 31, 2024, 1:39 a.m.