cps_data <- read_csv("./inst/extdata/cps_00001.csv.gz")
cps_data %<>%
select(YEAR, AGE, RACE, SEX, EDUC, WTSUPP) %>%
rename(Year = YEAR) %>%
mutate(Age_Group = sapply(AGE, cps_age_group)) %>%
mutate(Race = sapply(RACE, cps_race)) %>%
mutate(Sex = gsub(1, "Male", SEX)) %>%
mutate(Sex = gsub(2, "Female", Sex)) %>%
mutate(Education = sapply(EDUC, cps_education)) %>%
group_by(Year, Age_Group, Race, Sex, Education) %>%
summarise(Population = sum(WTSUPP))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.