BrazilDataAPI

The BrazilDataAPI package provides a unified interface to access open data from the BrasilAPI, REST Countries API, Nager.Date API, and World Bank API, with a focus on Brazil. It allows users to easily retrieve up-to-date information on postal codes, banks, economic indicators, holidays, company registrations, international country-level data, public holidays information, and economic development data relevant to Brazil.

In addition to API-access functions, the package includes a collection of curated datasets related to Brazil, covering diverse domains such as demographics (male and female population by state and year), river levels in Manaus, environmental emission factors in São Paulo, Brazilian film festivals, and historical yellow fever outbreaks.

Installation

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


install.packages("BrazilDataAPI")

Usage

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


library(BrazilDataAPI)

BrazilDataAPI Functions

Some of the BrazilDataAPI Datasets

The naming convention helps you easily understand the structure of each dataset:

Example Code:


# Load the package
library(BrazilDataAPI)

# Selected, essential information about Brazil
get_country_info_br()

# Get List of Banks in Brazil
get_brazil_banks()

# Load a dataset
data("Brasil_females_df")

# Shows six rows of the dataset
head(Brasil_females_df)

# Display the structure of the dataset
str(Brasil_females_df)

# Shows the whole dataset

View(Brasil_females_df)