pas_filterNear {AirSensor}R Documentation

Find PurpleAir sensors within radial distance

Description

Filter for PurpleAir sensors within a specified distance from specified target coordinates.

Usage

pas_filterNear(pas = NULL, longitude = NULL, latitude = NULL, radius = "1 km")

Arguments

pas

PurpleAir pas object.

longitude

a Target longitude.

latitude

a Target latitude.

radius

Distance from target with unit (i.e "15 km").

Details

radius Should be a numeric string with a metric unit separated by a space, such as "250 m".

Value

A subset of the given pas object.

See Also

pas_filter

pas_filterArea

Examples

library(AirSensor)

# Near Diamond Bar, CA
pas <- example_pas
diamond_bar <-
  pas %>%
  pas_filterNear(
    longitude = -117.820833,
    latitude = 34.001667, 
    radius = "20 km"
  )
                 
if ( interactive() ) {
  pas_leaflet(diamond_bar)
}


[Package AirSensor version 1.0.8 Index]