View source: R/stationFromExtent.R
stationFromExtent | R Documentation |
This function allows the selection of a subset of GSOD stations based on a given map extent.
stationFromExtent(bb, ...)
bb |
Object of class |
... |
Currently not used. |
A sf
object.
Florian Detsch
st_crop
# Predefined bounding box around Mt. Kilimanjaro region
kili <- sf::st_bbox(c(xmin = 37, xmax = 37.72, ymin = -3.4, ymax = -2.84))
gsod_shp_kili <- stationFromExtent(bb = kili)
rworldmap::mapGriddedData(mapRegion = "africa", plotData = FALSE, borderCol = "black",
addLegend = FALSE)
points(sf::st_coordinates(gsod_shp_kili), col = "red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.