Use of data from IPUMS USA is subject to conditions including that users should cite the data appropriately. Use command `ipums_conditions()` for more details.
dat <-zap_labels(dat)
Clean up – mutations, etc.
dat_tx <- dat |>filter(AGE >=18, AGE <=59) #<---filtering for working age popdat_tx <- dat_tx |>mutate(snap =ifelse(FOODSTMP ==2, 1, 0), # 1 = received SNAP in past 12 monthsemployed =ifelse(EMPSTAT ==1, 1, 0), # 1 = at worksnap_employment_status =case_when( snap ==1& employed ==1~"SNAP recipient & Employed", snap ==1& employed ==0~"SNAP recipient & Not Employed", snap ==0& employed ==1~"Non-SNAP & Employed", snap ==0& employed ==0~"Non-SNAP & Not Employed",TRUE~NA_character_ ) )
Who is Employed & on SNAP?
library(srvyr)
Warning: package 'srvyr' was built under R version 4.4.3
Attaching package: 'srvyr'
The following object is masked from 'package:stats':
filter
So this means that the employment rate of people on SNAP is 59% and those not on SNAP is 77% – Most working age adults who receive SNAP in Texas are employed, SNAP supports low-income workers–not the work-averse!
ggplot( dat_tx |>filter(!is.na(snap_employment_status)) |>count(snap_employment_status, wt = PERWT) |>mutate(share = n /sum(n)),aes(x = snap_employment_status, y = share)) +geom_col() +scale_y_continuous(labels = scales::percent) +labs(title ="Employment Status of Adults by SNAP Participation (Texas, Age 18–64)",x =NULL,y ="Share of Population" ) +theme_minimal()
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
dat <- vroom(...)
problems(dat)
Rows: 43776 Columns: 854
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): STATENAME
dbl (690): FSAFIL1, FSAFIL2, FSAFIL3, FSAFIL4, FSAFIL5, FSAFIL6, FSAFIL7, FS...
lgl (163): FSAFIL12, FSAFIL13, FSAFIL14, FSAFIL15, FSAFIL16, REL12, REL13, R...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.