Skip to main content
100%

Gist 47795c5a23bd689563b991acd76f1d86

✓ Published0🌍 Public
MMarie-Ella
Last edited Sep 13, 2019
Created on Sep 13, 2019

This example demonstrates a data-cleaning and recoding workflow for survey data, transforming raw categorical variables into labeled, analysis-ready formats. The code uses `dplyr`'s `left_join()` within a custom `recode.f()` function to merge recoded value labels from external CSV files stored in a `dat/yg_recoded/` directory. Variables such as political identification, education, income, religion, and region are sequentially processed and renamed, with a final `select()` step to drop the original region column. The output is a cleaned dataset ready for visualization, though no plotting library is featured.

AI-generated description

Similar vizzes