Description Usage Arguments Details Value See Also Examples
View source: R/pas_filterNear.R
Filter for PurpleAir sensors within a specified distance from specified target coordinates.
1 | pas_filterNear(pas = NULL, longitude = NULL, latitude = NULL, radius = "1 km")
|
pas |
PurpleAir pas object. |
longitude |
a Target longitude. |
latitude |
a Target latitude. |
radius |
Distance from target with unit (i.e "15 km"). |
radius
Should be a numeric string with a metric unit
separated by a space, such as "250 m"
.
A subset of the given pas object.
pas_filter
pas_filterArea
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.