---
title: "CEMPRE"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{CEMPRE}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
Employment, salary and firm data from IBGE's [Cadastro Central de Empresas (CEMPRE)](https://sidra.ibge.gov.br/pesquisa/cempre/tabelas). Loads information on companies and other organizations and their respective formally constituted local units, registered with the CNPJ - National Register of Legal Entities. Data is available between 2006 and 2019.
***
**Options:**
1. **dataset**: `"cempre"`
2. **raw_data**: there are two options:
* `TRUE`: if you want the data as it is originally.
* `FALSE`: if you want the treated version of the data.
3. **geo_level**: `"country"`, `"state"` or `"municipality"`
4. **time_period**: picks the years for which the data will be downloaded
5. **language**: you can choose between Portuguese `("pt")` and English `("eng")`
6. **sectors**: defines if the data will be return separated by sectors (`sectors = TRUE`) or not (`sectors = FALSE`)
***
**Examples:**
```{r, eval = FALSE}
# Download raw data (raw_data = TRUE) at the country level
# from 2008 to 2010 (time_period = 2008:2010).
data <- load_cempre(
raw_data = TRUE,
geo_level = "country",
time_period = 2008:2010
)
# Download treted data (raw_data = FALSE) by state (geo_level = "state")
# from 2008 to 2010 (time_period = 2008:2010) in portuguese (language = "pt").
# In this example, data is split by sector (sectors = TRUE)
data <- load_cempre(
raw_data = FALSE,
geo_level = "state",
time_period = 2008:2010,
language = "pt",
sectors = TRUE
)
```