covid_labeller {COVIDIBGE}R Documentation

Label categorical variables from PNAD COVID19 microdata

Description

This function labels categorical variables from PNAD COVID19 microdata.

Usage

covid_labeller(data_covid, dictionary.file)

Arguments

data_covid

A tibble of PNAD COVID19 microdata read with read_covid function.

dictionary.file

The dictionary file for selected survey available on official website: (select a dictionary xls file) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_PNAD_COVID19/Microdados/Documentacao/.

Value

A tibble with the data provided from PNAD COVID19 survey and its categorical variables as factors with related labels.

Note

For more information, visit the survey official website <https://www.ibge.gov.br/estatisticas/investigacoes-experimentais/estatisticas-experimentais/27946-divulgacao-semanal-pnadcovid1?t=o-que-e> and consult the other functions of this package, described below.

See Also

get_covid for downloading, labelling, deflating and creating survey design object for PNAD COVID19 microdata.
read_covid for reading PNAD COVID19 microdata.
covid_deflator for adding deflator variables to PNAD COVID19 microdata.
covid_design for creating PNAD COVID19 survey design object.
covid_example for getting the path of the PNAD COVID19 example files.

Examples

# Using data read from disk
data_path <- covid_example(path="exampledata.csv")
dictionary.path <- covid_example(path="dictionaryexample.xls")
covid.df <- read_covid(microdata=data_path, vars=c("C001","C002"))
covid.df <- covid_labeller(data_covid=covid.df, dictionary.file=dictionary.path)

# Downloading data
covid.df2 <- get_covid(year=2020, month=5, vars=c("C001","C002"),
                       labels=FALSE, deflator=FALSE, design=FALSE, savedir=tempdir())
dictionary.path2 <- covid_example(path="dictionaryexample.xls")
covid.df2 <- covid_labeller(data_covid=covid.df2, dictionary.file=dictionary.path2)

[Package COVIDIBGE version 0.1.4 Index]