Skip to content

Quantitative analysis of Brazilian Labor Market dynamics (PNAD Contínua), featuring seasonal adjustments, income tracking, and macroeconomic correlations (Phillips Curve) using R

Notifications You must be signed in to change notification settings

lauroaguiar/labor-market-br

Repository files navigation

🇧🇷 Brazilian Labor Market Analysis (Nov/23)

Official repository for the Labor Market conjunctural analysis, focusing on PNAD Contínua data and macroeconomic indicators.

R Data Source Status

📄 About the Project

This project performs a deep quantitative analysis of the labor market dynamics in Brazil. The code automates the extraction of public data (SIDRA API and Central Bank), performs statistical treatments (such as seasonal adjustment), and generates visualizations for economic monitoring.

This work served as the basis for the "Labor Market Analysis" report for the Applied Macroeconomics course taught by André Valério, covering the Nov-23 period with an emphasis on post-pandemic recovery and the relationship between unemployment and macroeconomic variables (inflation and interest rates).

📊 Key Indicators Analyzed

The analise-mercado-trabalho.R script covers the following dimensions:

  • Unemployment: Unemployment rate (Level and YoY Variation) and unemployed population.
  • Seasonal Adjustment: Time series decomposition for trend analysis (via dynlm and mFilter).
  • Participation and Occupation: Labor force participation rate and categorization of employed persons (Formal, Informal, Self-employed, etc.).
  • Income: Comparison between Nominal Income and Real Income, highlighting purchasing power loss/gain.
  • Hours Worked: Analysis of habitual hours by gender, age group, and education level.
  • Underutilization: Monitoring of the underemployment rate due to insufficient hours.
  • Macroeconomics:
    • Phillips Curve: Correlation between Unemployment and Inflation (IPCA).
    • Monetary Policy: Relationship between Unemployment and the Selic Rate.
    • Activity: Central Bank Economic Activity Index (IBC-Br).

🛠 Technologies and Packages

The analysis was developed entirely in R, using a modern Tidyverse approach for data manipulation and official APIs to ensure reproducibility.

Main Packages

  • sidrar: Direct collection from PNAD Contínua (IBGE).
  • rbcb: Collection of Central Bank series (Selic, IBC-Br, Expectations).
  • tidyverse (ggplot2, dplyr): Data manipulation and visualization.
  • dynlm & mFilter: Time series modeling and seasonal filters.
  • zoo & lubridate: Date handling and moving quarters.

🚀 How to Run

  1. Clone the repository:

    git clone [https://github.com/your-username/Labor-Macro-BR.git](https://github.com/your-username/labor-market-br.git)
  2. Open the project in RStudio.

  3. Install dependencies: The script has an automatic check, but you can run the following beforehand:

    pacotes <- c("tidyverse", "sidrar", "rbcb", "ipeadatar", "mFilter", "dynlm", "zoo")
    install.packages(pacotes)
  4. Run the Script: Run the analise-mercado-trabalho.R file. It will automatically download the latest series and generate the charts in your plotting area.

📈 Visualization Example

The code generates comparative charts like this one (conceptual example of the Nominal vs. Real Income relationship):

# Code snippet for Income plotting
ggplot(renda_df, aes(x = time)) +
  geom_line(aes(y = renda_nom, colour = 'Nominal Income')) +
  geom_line(aes(y = renda_real, colour = 'Real Income')) +
  labs(title = 'Nominal vs Real Income (PNADC)', y = 'R$')

👥 Authors

  • Lauro Aguiar
  • Márcia Borges
  • Maria Emília
  • Marina Barros
  • Pedro Paiano

This project is academic and educational in nature, developed within the scope of the Applied Macroeconomics course.

About

Quantitative analysis of Brazilian Labor Market dynamics (PNAD Contínua), featuring seasonal adjustments, income tracking, and macroeconomic correlations (Phillips Curve) using R

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages