A sample of categorical variables from the General Social survey

gss_cat

Format

year

year of survey, 2000--2014

age

age. Maximum age truncated to 89.

marital

marital status

race

race

rincome

reported income

partyid

party affiliation

relig

religion

denom

denomination

tvhours

hours per day watching tv

Source

Downloaded from https://gssdataexplorer.norc.org/.

Examples

gss_cat
#> # A tibble: 21,483 x 9 #> year marital age race rincome partyid relig denom tvhours #> <int> <fct> <int> <fct> <fct> <fct> <fct> <fct> <int> #> 1 2000 Never ma… 26 White $8000 to … Ind,near r… Protesta… Souther… 12 #> 2 2000 Divorced 48 White $8000 to … Not str re… Protesta… Baptist… NA #> 3 2000 Widowed 67 White Not appli… Independent Protesta… No deno… 2 #> 4 2000 Never ma… 39 White Not appli… Ind,near r… Orthodox… Not app… 4 #> 5 2000 Divorced 25 White Not appli… Not str de… None Not app… 1 #> 6 2000 Married 25 White $20000 - … Strong dem… Protesta… Souther… NA #> 7 2000 Never ma… 36 White $25000 or… Not str re… Christian Not app… 3 #> 8 2000 Divorced 44 White $7000 to … Ind,near d… Protesta… Luthera… NA #> 9 2000 Married 44 White $25000 or… Not str de… Protesta… Other 0 #> 10 2000 Married 47 White $25000 or… Strong rep… Protesta… Souther… 3 #> # … with 21,473 more rows
fct_count(gss_cat$relig)
#> # A tibble: 16 x 2 #> f n #> <fct> <int> #> 1 No answer 93 #> 2 Don't know 15 #> 3 Inter-nondenominational 109 #> 4 Native american 23 #> 5 Christian 689 #> 6 Orthodox-christian 95 #> 7 Moslem/islam 104 #> 8 Other eastern 32 #> 9 Hinduism 71 #> 10 Buddhism 147 #> 11 Other 224 #> 12 None 3523 #> 13 Jewish 388 #> 14 Catholic 5124 #> 15 Protestant 10846 #> 16 Not applicable 0
fct_count(fct_lump(gss_cat$relig))
#> # A tibble: 2 x 2 #> f n #> <fct> <int> #> 1 Protestant 10846 #> 2 Other 10637