library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(readr)
Vote <- read_csv("~/Downloads/Vote.csv")
## Parsed with column specification:
## cols(
## .default = col_character(),
## NumChildren = col_double(),
## Immigr_Economy_GiveTake = col_double(),
## ft_fem_2017 = col_double(),
## ft_immig_2017 = col_double(),
## ft_police_2017 = col_double(),
## ft_dem_2017 = col_double(),
## ft_rep_2017 = col_double(),
## ft_evang_2017 = col_double(),
## ft_muslim_2017 = col_double(),
## ft_jew_2017 = col_double(),
## ft_christ_2017 = col_double(),
## ft_gays_2017 = col_double(),
## ft_unions_2017 = col_double(),
## ft_altright_2017 = col_double(),
## ft_black_2017 = col_double(),
## ft_white_2017 = col_double(),
## ft_hisp_2017 = col_double()
## )
## See spec(...) for full column specifications.
View(Vote)
head(Vote)
## # A tibble: 6 x 53
## gender race education familyincome children region urbancity Vote2012
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 Female White 4-year Prefer not … No West Suburb Barack …
## 2 Female White Some Col… $60K-$69,999 No West Rural Ar… Mitt Ro…
## 3 Male White High Sch… $50K-$59,999 No Midwe… City Mitt Ro…
## 4 Male White Some Col… $70K-$79,999 No South City Barack …
## 5 Male White 4-year $40K-$49,999 No South Suburb Mitt Ro…
## 6 Female White 2-year $30K-$39,999 No West Suburb Barack …
## # … with 45 more variables: Vote2016 <chr>, TrumpSanders <chr>,
## # PartyRegistration <chr>, PartyIdentification <chr>,
## # PartyIdentification2 <chr>, PartyIdentification3 <chr>,
## # NewsPublicAffairs <chr>, DemPrimary <chr>, RepPrimary <chr>,
## # ImmigrantContributions <chr>, ImmigrantNaturalization <chr>,
## # ImmigrationShouldBe <chr>, Abortion <chr>, GayMarriage <chr>,
## # DeathPenalty <chr>, DeathPenaltyFreq <chr>, TaxWealthy <chr>,
## # Healthcare <chr>, GlobWarmExist <chr>, GlobWarmingSerious <chr>,
## # AffirmativeAction <chr>, Religion <chr>, ReligiousImportance <chr>,
## # ChurchAttendance <chr>, PrayerFrequency <chr>, NumChildren <dbl>,
## # areatype <chr>, GunOwnership <chr>, EconomyBetterWorse <chr>,
## # Immigr_Economy_GiveTake <dbl>, ft_fem_2017 <dbl>, ft_immig_2017 <dbl>,
## # ft_police_2017 <dbl>, ft_dem_2017 <dbl>, ft_rep_2017 <dbl>,
## # ft_evang_2017 <dbl>, ft_muslim_2017 <dbl>, ft_jew_2017 <dbl>,
## # ft_christ_2017 <dbl>, ft_gays_2017 <dbl>, ft_unions_2017 <dbl>,
## # ft_altright_2017 <dbl>, ft_black_2017 <dbl>, ft_white_2017 <dbl>,
## # ft_hisp_2017 <dbl>
Vote %>%
select(gender, ft_fem_2017) %>%
group_by(gender) %>%
summarize(AVERAGE = mean(ft_fem_2017, na.rm = NA))
## # A tibble: 2 x 2
## gender AVERAGE
## <chr> <dbl>
## 1 Female 58.3
## 2 Male 45.3
#From this, I see out of 100, females rate on average 58 out of 100 for their feelings towards feminism. On the other hand, I see that out of 100, males rate on average 45 out of 100 for their feelings towards feminism. The averages depicts how females have stronger feelings than males for females to be recognized in society and to be perceived as equals.
Vote %>%
select(gender, Abortion) %>%
group_by(gender, Abortion) %>%
summarize(n=n()) %>%
mutate(percent=n/sum(n))
## # A tibble: 10 x 4
## # Groups: gender [2]
## gender Abortion n percent
## <chr> <chr> <int> <dbl>
## 1 Female Illegal in all cases 522 0.129
## 2 Female Legal in all cases 1587 0.391
## 3 Female Legal in some cases and Illegal in others 1669 0.411
## 4 Female Not sure 258 0.0635
## 5 Female <NA> 24 0.00591
## 6 Male Illegal in all cases 565 0.143
## 7 Male Legal in all cases 1206 0.306
## 8 Male Legal in some cases and Illegal in others 1920 0.487
## 9 Male Not sure 215 0.0546
## 10 Male <NA> 34 0.00863
#From summarizing the sum of gender and Abortion, I see how the percentages for females supporting Abortion are higher than “Illegal in all cases”, at 13%, and “Not sure”, at .6%. This is evident as the percentages for females supporting Abortion are dominant in “Legal in all cases”, at 39%, and “Legal in some cases and Illegal in others”, at 41%. The explanations for these results could possibly be due to the fact that females who leaned more on “Legal” believe that they have the natural right to control their own bodies and that it should not be a political issue. The results for males seem to be simular to females and it could show how males have empathy for females and believe that it is a females’ choice to decide what to do with their own bodies. Both genders percentages were at the highest for “Legal in some cases and Illegal in others” because they may strongly prefer abortions to be done with caution and that it cannot be done in certain stages of the pregnancy for safety reasons.
prop.table(table(Vote$gender,
Vote$Abortion),2)
##
## Illegal in all cases Legal in all cases
## Female 0.4802208 0.5682062
## Male 0.5197792 0.4317938
##
## Legal in some cases and Illegal in others Not sure
## Female 0.4650320 0.5454545
## Male 0.5349680 0.4545455
#From this cross-tabulation, I see that 57% of females feel strongly that Abortion should be “Legal in all cases” and that 48% of females feel strongly that Abortion should be “Illegal in all cases”. The results demonstrates how females who are pro-Abortion, especially at this time period feel more ownership with their bodies and aren’t as old-fashioned as females who are anti-Abortion. I feel that since the gap between the percentages for females who are pro-Abortion and anti-Abortion are small due to the fact that females may have mixed feelings about Abortions. Whereas for males, I see that most of them lean more on “Illegal in all cases”, at 52%, than “Legal in all cases”. An explanation for a higher percentages for males for “Illegal in all cases” could be due to religious reasons and patriarchal values.
#For the second part of the cross tabulations, the percentages for both female and males are close. I see that females are at 47% for “Legal in some cases and Illegal in others” and 55% for “Not sure”. I feel that the percentages for “Not sure” were higher because it is a highly sensitive topic. Moreover, for the percentages for males, I see that 53% of them choose “Legal in some cases and Illegal in others” and 45% for “Not sure”. The percentages for males may exhibit how they feel that Abortion should be legal before a pregnancy progress to make it less painful and harder for the developing fetus and the woman who’s holding the fetus. In addition, the percentages are lower in “Not sure” for males because they may feel that Abortion is not topic that they should be speaking on. Noting how both female and male percentages were close in this part of the cross-tabulation, it concludes how Abortion is still a heavy topic despite how society in America is shifting towards more open perspectives on it.
Vote %>%
select(gender, ft_gays_2017) %>%
group_by(gender) %>%
summarize(AVERAGE = mean(ft_gays_2017, na.rm = NA))
## # A tibble: 2 x 2
## gender AVERAGE
## <chr> <dbl>
## 1 Female 65.5
## 2 Male 56.0
#From this, I see how out of 100, females rate on average 65 for their feelings towards the gay populations. On the other hand, I see how out of 100, males rate on average 56 for their feelings towards the gay population. The results show that females may be more open to same-sex relationships and that there is nothing wrong with being homosexual. Due to the fact that the average rate for males are pretty low compared to female, it may show that they do not feel comfortable with the gay population, that it is not possible for people to naturally like those of the same sex, and for religious reasons.
Vote %>%
select(gender, GayMarriage) %>%
group_by(gender, GayMarriage) %>%
summarize(n=n()) %>%
mutate(percent=n/sum(n))
## # A tibble: 8 x 4
## # Groups: gender [2]
## gender GayMarriage n percent
## <chr> <chr> <int> <dbl>
## 1 Female Favor 2014 0.496
## 2 Female Not sure 548 0.135
## 3 Female Oppose 1487 0.366
## 4 Female <NA> 11 0.00271
## 5 Male Favor 1579 0.401
## 6 Male Not sure 406 0.103
## 7 Male Oppose 1937 0.492
## 8 Male <NA> 18 0.00457
#From summarizing the sum of gender and GayMarriage, I see that Females are in “Favor” of gay marriage at 50%; this shows how females are more open to same-sex marriage than males at 40% for in “Favor”. It also depicts that females may feel more comfortable with the topic of gay marriage and that gay marriage is not of a threat to society. I see that males have a higher rate for “Oppose” at 49% possibly due to religious, traditional, and moral values.
prop.table(table(Vote$gender,
Vote$GayMarriage),1)
##
## Favor Not sure Oppose
## Female 0.4974068 0.1353421 0.3672512
## Male 0.4026007 0.1035186 0.4938807
#From this cross-tabulation, I see that females are in favor of gay marriage at 50% than males at 40%. This could show how females are more empathetic and open-minded on gay-marriage than males. For “Not sure”, I see that females are at 13% and males are at 10%; the closeness of percentages for “Not sure” demonstrates how both genders have stronger opinions for “Favor” and “Oppose”. In addition, it shows how the gender groups in the dataset choose to lean on one side instead of being in the middle for this topic. Lastly, for “Oppose”, I see that females are at 36% and that males are at 49%. The reason why males have a higher percentage for “Oppose” could possibly be due to having a close-minded perception on gay marriage and for having religious, traditional, and moral values.