download_climate_geom {ColOpenData} | R Documentation |
Download climate data from stations contained in a Region of Interest (ROI/geometry). This data is retrieved from local meteorological stations provided by IDEAM.
download_climate_geom(geometry, start_date, end_date, tag)
geometry |
|
start_date |
character with the first date to consult in the format
|
end_date |
character with the last date to consult in the format
|
tag |
character containing climate tag to consult. |
data.frame
object with observations from the stations in the
area.
lat <- c(4.172817, 4.172817, 4.136050, 4.136050, 4.172817)
lon <- c(-74.749121, -74.686169, -74.686169, -74.749121, -74.749121)
polygon <- sf::st_polygon(x = list(cbind(lon, lat)))
geometry <- sf::st_sfc(polygon)
roi <- sf::st_as_sf(geometry)
ptpm <- download_climate_geom(roi, "2022-11-14", "2022-11-20", "PTPM_CON")
head(ptpm)