knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

ibge

The idea of ibge is to download and make available (in a tidy format) the data from the IBGE Cidades project.

There is a dataset of municipio codes, names and UFs included.

library(ibge)
data("ibge_codes")
head(ibge_codes)

Usage

The function historic() returns a one-line dataframe of information on the municipality selected. Since this may be of limited use, it also prints out a HTML page of the same information (in an interactive session only). If using RStudio, this will appear in the Viewer pane. This function returns data in the original Portuguese.
For example, let's learn a little about Nova Olinda do Norte, in Amazonas state (I hope you've brushed up on your Brazilian Portuguese).

library(dplyr)

filter(ibge_codes, municipio == "Nova Olinda do Norte") %>% 
  pull(codes) %>% 
  historic()

Something like the following should appear in your Viewer pane:



BrazilianPublicData/ibge documentation built on May 19, 2019, 6:19 p.m.