Skip to contents

Download climate data from stations contained in a municipality or department. This data is retrieved from local meteorological stations provided by IDEAM.

Usage

download_climate(code, start_date, end_date, tag)

Arguments

code

character with the DIVIPOLA code for the area (2 digits for departments and 5 digits for municipalities).

start_date

character with the first date to consult in the format "YYYY-MM-DD". (First available date is "1920-01-01").

end_date

character with the last date to consult in the format "YYYY-MM-DD". (Last available date is "2023-05-31").

tag

character containing climate tag to consult. Please use cliamte_tags() to check IDEAM tags.

Value

data.frame object with observations from the stations in the area.

Examples

# \donttest{
ptpm <- download_climate("73148", "2021-11-14", "2021-11-20", "PTPM_CON")
#> ColOpenData provides open data derived from Departamento Administrativo
#> Nacional de Estadística (DANE), and Instituto de Hidrología,
#> Meteorología y Estudios Ambientales (IDEAM) but with modifications for
#> specific functional needs. These changes may alter the structure,
#> format, or content, meaning the data does not reflect the official
#> dataset. The package is developed independently, with no endorsement or
#> involvement from these institutions or any Colombian government body.
#> The authors of ColOpenData are not liable for how users utilize the
#> data, and users are responsible for any outcomes from their use or
#> analysis of the data.
#> Stored by Universidad de Los Andes under the Epiverse TRACE initiative.
head(ptpm)
#>    station    longitude   latitude       date     hour      tag value
#> 1 21190290 -74.71311111 4.16102778 2021-11-14 07:00:00 PTPM_CON     0
#> 2 21190290 -74.71311111 4.16102778 2021-11-15 07:00:00 PTPM_CON     7
#> 3 21190290 -74.71311111 4.16102778 2021-11-16 07:00:00 PTPM_CON     0
#> 4 21190290 -74.71311111 4.16102778 2021-11-17 07:00:00 PTPM_CON     0
#> 5 21190290 -74.71311111 4.16102778 2021-11-18 07:00:00 PTPM_CON     0
#> 6 21190290 -74.71311111 4.16102778 2021-11-19 07:00:00 PTPM_CON     0
# }