Loads information on companies and other organizations and their respective formally constituted local units, registered with the CNPJ - National Register of Legal Entities.

load_cempre(
  dataset = "cempre",
  raw_data = FALSE,
  geo_level,
  time_period,
  language = "eng",
  sectors = FALSE
)

Arguments

dataset

A dataset name ("cempre").

raw_data

A boolean setting the return of raw (TRUE) or processed (FALSE) data.

geo_level

A string that defines the geographic level of the data. Can be one of "country", "state" or "municipality".

time_period

A numeric indicating for which years the data will be loaded, in the format YYYY. Can be any vector of numbers, such as 2010:2012.

language

A string that indicates in which language the data will be returned. Portuguese ("pt") and English ("eng") are supported.

sectors

A boolean that defines if the data will be return separated by sectors (TRUE) or not (FALSE).

Value

A tibble.

Details

IBGE publishes this series in two SIDRA tables: table 6449 for 2006 to 2021, which it has closed ("serie encerrada em 2021"), and table 9418 for 2022 onwards. They have the same structure and load_cempre() reads the one that has each year, but the two do not join up: Brazil's number of companies goes from 5.75 million in 2021 to 9.43 million in 2022, so a comparison across 2021 and 2022 is a comparison across two series.

Examples

if (FALSE) { # interactive()
### DO NOT RUN ###
# download treated national-level data from 2008 to 2010
data <- load_cempre(
  raw_data = FALSE,
  geo_level = "country",
  time_period = 2008:2010,
  language = "eng"
)

# download treated state-level data split by sector
data <- load_cempre(
  raw_data = FALSE,
  geo_level = "state",
  time_period = 2008:2010,
  language = "pt",
  sectors = TRUE
)
}