View source: R/covid_deflator.R
covid_deflator | R Documentation |
This function adds deflator variables to PNAD COVID19 microdata. For deflation of income variables, the documentation provided through the following address must be used: https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_PNAD_COVID19/Microdados/Documentacao/COVIDIBGE_Deflator.pdf.
covid_deflator(data_covid, deflator.file)
data_covid |
A tibble of PNAD COVID19 microdata read with |
deflator.file |
The deflator file for selected survey available on official website: (select the deflator zip file) - https://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_PNAD_COVID19/Microdados/Documentacao/. |
A tibble with the data provided from PNAD COVID19 survey and the deflator variables added for use.
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.
get_covid for downloading, labeling, deflating and creating survey design object for PNAD COVID19 microdata.
read_covid for reading PNAD COVID19 microdata.
covid_labeller for labeling categorical variables from PNAD COVID19 microdata.
covid_design for creating PNAD COVID19 survey design object.
covid_example for getting the path of the PNAD COVID19 toy example files.
# Using data read from disk
data_path <- covid_example(path="exampledata.csv")
dictionary.path <- covid_example(path="dictionaryexample.xls")
deflator.path <- covid_example(path="deflatorexample.xls")
covid.df <- read_covid(microdata=data_path, vars=c("C001","C002"))
covid.df <- covid_labeller(data_covid=covid.df, dictionary.file=dictionary.path)
covid.df <- covid_deflator(data_covid=covid.df, deflator.file=deflator.path)
# Downloading data
covid.df2 <- get_covid(year=2020, month=5, vars=c("C001","C002"),
labels=TRUE, deflator=FALSE, design=FALSE,
reload=TRUE, curlopts=list(), savedir=tempdir())
deflator.path2 <- covid_example(path="deflatorexample.xls")
covid.df2 <- covid_deflator(data_covid=covid.df2, deflator.file=deflator.path2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.