ColombiAPI

The ColombiAPI package provides a unified interface to access open data from the API-Colombia, World Bank API, Nager.Date API, and the REST Countries API, with a focus on Colombia. It allows users to retrieve up-to-date or historical information on topics such as geographic locations, cultural attractions, economic indicators, demographic data, national holidays, and key country-level details.

In addition to API-access functions, the package includes a collection of curated datasets related to Colombia. These datasets cover a wide range of topics including air quality monitoring, education (public schools), business and holiday calendars, agricultural exports (coffee), regulatory information (cannabis licenses), climate data (Medellin rainfall), and urban development (Bogotá shopping malls).

Installation

You can install the ColombiAPI package from CRAN with the following R function:


install.packages("ColombiAPI")

Usage

After installation, load the package and start exploring and using its functions and datasets.


library(ColombiAPI)

ColombiAPI Functions

Below is a list of the main functions included in the package:

Dataset Suffixes

Each dataset in ColombiAPI is labeled with a suffix to indicate its type and structure:

Datasets Included in ColombiAPI

In addition to API functions, ColombiAPI includes several preloaded datasets that provide valuable insights into various aspects of Colombia:

Example Code:


# Load the package

library(ColombiAPI)

# List colombian presidents

get_colombia_presidents()

# Shows Colombia's general information 

get_country_info_co()

# Load a dataset

data("Bogota_airstations_df")

# # Shows six rows of the dataset

head(Bogota_airstations_df)

# Load another dataset

data("Tulua_Public_Schools_tbl_df")

# Display the structure of the tibble

str(Tulua_Public_Schools_tbl_df)