ColombiAPI

License: GPL v3 CRAN downloads CRAN total downloads

The ColombiAPI package provides a comprehensive interface to access diverse public data about Colombia through multiple APIs and curated datasets. The package integrates four different APIs: API-Colombia for Colombian-specific data including geography, culture, tourism, and government information; World Bank API for economic and demographic indicators; Nager.Date API for public holidays; and REST Countries API for general country information. This allows users to retrieve up-to-date or historical information on topics such as geographic locations, cultural attractions, economic indicators, demographic data, and public holidays.

In addition to API-access functions, the package includes curated datasets covering a wide range of topics, including Bogota air stations, business and holiday dates, public schools, Colombian coffee exports, cannabis licenses, Medellin rainfall, malls in Bogota, indigenous languages, student admissions and school statistics, forest liana mortality, municipal and regional data, connectivity and digital infrastructure, program graduates, vehicle counts, international visitors, and GDP projections. These datasets provide a rich and multifaceted view of Colombian social, economic, environmental, and technological information.

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)