Learn R Programming

ColOpenData

ColOpenData is a package designed to access curated and wrangled Colombian demographic, geospatial, climate and population projections data, retrieved from various open Colombian data sources. The package addresses the challenge of scattered Colombian data across multiple web sources by providing functions that enable users to select and load desired datasets without the need for extensive data acquisition processes. Additionally, the tidy data structure offered for demographic and climate data facilitates analysis and visualization.

ColOpenData is developed at Universidad de Los Andes as part of the Epiverse-TRACE program.

Installation

You can install the CRAN version of ColOpenData with:

install.packages("ColOpenData")

You can also install the development version of ColOpenData from GitHub with:

# install.packages("pak")
pak::pak("epiverse-trace/ColOpenData")

Quick Overview

ColOpenData contains data from two public data sources: Departamento Administrativo Nacional de Estadística (DANE), and Instituto de Hidrología, Meteorología y Estudios Ambientales (IDEAM). The available data is divided in four categories:

  • Demographic: Demographic and Socioeconomic data presents information from the National Population and Dwelling Census (CNPV) of 2018. The CNPV data corresponds to the most recent census available to date and the information is presented as an answer to three questions: How many are we?, Where are we? and How do we live?

  • Geospatial: This data is retrieved from the National Geostatistical Framework (MGN), which includes maps and a summarized version of the 2018 CNPV, aggregated to spatial geometries. The data is available at different aggregation levels including: Blocks, Urban and Rural Sections, Urban and Rural Sectors, Urban Areas, Municipalities and Departments.

  • Climate: Climate data is recovered from backup information provided by IDEAM, containing historical data from the first station in the country (January 1st 1920) until May 31st 2023. This backup includes temperature, precipitation, sunshine duration, wind direction, among others.

  • Population projections: Population Projections data contains the population projections and back projections from 1950 to 2070, considering the post COVID-19 update, which was calculated based on the results of 2018 CNPV.

Documentation and vignettes are available for the modules in the user vignettes.

Similar R Packages

Similar R packages are offered for international communities, allowing the user to download census, geospatial and climate data.

Disclaimer

ColOpenData stores and distributes open data originally obtained from Departamento Administrativo Nacional de Estadística (DANE), and Instituto de Hidrología, Meteorología y Estudios Ambientales (IDEAM). It is important to note that the data retrieved from these sources has been processed, transformed, and adapted to meet the functional requirements of this package. These modifications may result in changes to the structure, format, or content of the original data, and as such, the data provided by this package does not represent the official datasets as maintained by IDEAM or DANE. The development of this package is completely independent of these institutions, and neither IDEAM, DANE, nor any other Colombian government body endorses, sponsors, or is involved in the creation or maintenance of this package. Consequently, they bear no responsibility for the data as presented within this package. Furthermore, the authors of the ColOpenData assume no liability for any outcomes resulting from the use or misuse of the data provided. The user is solely responsible for how they utilize the data, and any conclusions drawn, analyses performed, or actions taken based on this data are the user’s responsibility. This package and its authors make no claims to represent or act on behalf of IDEAM, DANE, or any other official entity.

Lifecycle

This package is currently stable, as defined by the RECON software lifecycle. Therefore, this is a functional package and it is documented and tested. However, it still may change over time.

Contributions

Contributions are welcome via pull requests.

Code of Conduct

Please note that the ColOpenData project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Funding

This work is part of the TRACE-LAC research project funded by the International Research Centre (IDRC) Ottawa, Canada.[109848-001-].

Copy Link

Version

Install

install.packages('ColOpenData')

Monthly Downloads

269

Version

1.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Maria Camila Tavera-Cifuentes

Last Published

March 6th, 2025

Functions in ColOpenData (1.0.0)

datasets_list

datasets_list
download_climate_stations

Download climate data from stations
code_to_name_dep

Retrieve departments' DIVIPOLA names from codes
divipola_table

Retrieve DIVIPOLA table
climate_tags

climate_tags
merge_geo_demographic

Match and merge geospatial and demographic datasets
geospatial_dictionary

Download data dictionaries
download_pop_projections

Download population projections
name_to_standard_dep

Translate department names to official departments' DIVIPOLA names
name_to_code_mun

Retrieve municipalities' DIVIPOLA codes from names
name_to_code_dep

Retrieve departments' DIVIPOLA codes from names
monthly_tssm

Calculate monthly dry-bulb mean temperature
retrieve_path

Retrieve demographic and geospatial path of named dataset
retrieve_support_path

Retrieve support dataset path
monthly_bshg

Calculate monthly sunshine duration
retrieve_table

Retrieve table (csv and data) file
name_to_standard_mun

Translate municipality names to official municipalities' DIVIPOLA names
stations_in_roi

Stations in region of interest
code_to_name_mun

Retrieve municipalities' DIVIPOLA names from codes
daily_bshg

Calculate daily sunshine duration
retrieve_geospatial_name

Retrieve geospatial dataset name for consultation
geospatial_dictionaries

geospatial_dictionaries
monthly_tmx

Calculate monthly maximum temperature
retrieve_value_key

Retrieve value from key
list_datasets

Download list of available datasets
get_climate_tags

List climate (IDEAM) tags
download_geospatial

Download geospatial dataset
monthly_ptpm

Calculate monthly precipitation
look_up

Filter list of available datasets based on keywords given by the user
retrieve_dict_path

Retrieve dictionary path of named dataset
retrieve_code

Retrieve code
monthly_tmn

Calculate monthly minimum temperature
retrieve_climate_path

Retrieve climate directory path
retrieve_climate

Retrieve climate table file from one station
annual_tmn

Calculate annual minimum temperature
aggregate_climate

Aggregate climate data for different frequencies
download_climate

Download climate from named geometry (municipality or department)
download_climate_geom

Download climate data from geometry
annual_tssm

Calculate annual dry-bulb mean temperature
annual_bshg

Calculate annual sunshine duration
annual_ptpm

Calculate annual precipitation
aggregate_monthly

Calculate monthly aggregate of climate data
annual_tmx

Calculate annual maximum temperature
aggregate_annual

Calculate annual aggregate of climate data
check_climate_args

Check arguments in climate functions
daily_tssm

Climate aggregation rules
aggregate_daily

Calculate daily aggregate of climate data
download_demographic

Download demographic dataset