Violence Against Women Survey Analysis

I chose to analyze the survey responses for 70 countries in regards to violence against women because I am interested in learning more about gender violence. The survey includes quantitative and qualitive variables. It includes responses from males and females from ages 15-49 from various marital, employment, education and residence status. These groups were asked if they agree that a husband is justified in beating his wife for the following reasons: for at least one specific reason, if she burns the food, if she argues with him, if she goes out without telling him, if she neglects the children and if she refuses to have sex with him.

The data in this analysis was extracted from the Demographic and Health Surveys (DHS) conducted by USAID throughout the world. The data can be accessed at Kaggle via: https://www.kaggle.com/andrewmvd/violence-against-women-and-girls or via USAID: https://dhsprogram.com/Methodology/Survey-Types/DHS-Questionnaires.cfm. These surveys are conducted periodically to gauge health issues such as breastfeeding practices, children’s health, HIV infections, etc.

I decided to analyze the two participant groups that were the most distinct to try to find differences. For this purpose, I chose the no education vs the higher education participants. At the same time, I chose to analyze the response “…for at least one specific reason” because it includes people that agree that a husband is justified in beating his wife for any reason.

The analysis shows that higher percentages of women, compared to men, believe that a husband is justified in beating his wife. This finding is consistent regardless of education level. Percentages are lower among the higher educated group; however, even higher educated women are more likely than higher educated man to believe that a husband is justified in beating his wife. These findings are surprising because women’s responses seem to go against their own interest. Per the bar plot, among the higher educated respondents, Timor L’este had the highest percentage of women’s agreement at 74.6%. Among the respondents with no education, Mali had the highest percentage at 82%.

This analysis also contains a map which compares all countries respondents (female and male) with higher ducation or no education to the same question. Per the map, Afghanistan had the highest average percentage at 68.75% of respondents that agree that a husband is justified in beating his wife for at least one specific reason.

Overall, this data is very interesting but there is more that I could have compared such as marital status and age. Also, this dataset has missing values for male respondents from various countries. In addition, I wish I could have studied the reasons for the contrast in female and male responses. I also would have liked to analyze regional trends.

library(tidyverse) #installs tidyverse package
## Warning: package 'tidyverse' was built under R version 4.0.4
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.3     v purrr   0.3.4
## v tibble  3.0.5     v dplyr   1.0.3
## v tidyr   1.1.2     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(dplyr) #installs dplyr package
setwd("C:/Users/Dano/Documents/") #sets  working directoy
Violence <- read_csv("Violencedata.csv")
## 
## -- Column specification --------------------------------------------------------
## cols(
##   RecordID = col_double(),
##   Country = col_character(),
##   Gender = col_character(),
##   `Demographics Question` = col_character(),
##   `Demographics Response` = col_character(),
##   Question = col_character(),
##   `Survey Year` = col_character(),
##   Value = col_double()
## )
# uploads data
violence1 <- na.omit(Violence) #removes missing values
  names(violence1) <- gsub(" ","_",names(violence1)) # replaces spaces in headings with underscore
violence_onereason = filter(violence1, Demographics_Response %in% c("Higher", "No education"), Question %in% c("... for at least one specific reason" ) ) # this is to select ALL rows that have higher or no education, also selects all females and males that have higher or no education.  This is the main targeted group that I want to study and compare.
violence_onereason1 = filter(violence_onereason, Demographics_Response %in% c("Higher"), Question %in% c("... for at least one specific reason" ) ) # this is to select all rows that have only higher education that belong to the group that agree that a husband is justified in hitting or beating his wife for at least one specific reason
violence_onereason1 %>%
  ggplot() + 
  geom_boxplot(aes(x = Gender, y=Value, group=Gender,fill=Gender)) +
  labs(title="Percentage Of Respondents With Higher Education Who Agree That A Husband Is
Justified In Hitting Or Beating His Wife For At Least One Specific Reason" ,x="Gender", y = "Percentage")+ scale_fill_brewer(palette="Dark2") +
  theme_classic() +  scale_x_discrete(labels=c("Female", "Male"))+ theme(legend.position = "none") #this creates a boxplot with title and classic them and splits the higher education groups into females versus males.

violence_onereason2 = filter(violence_onereason, Demographics_Response %in% c("No education"), Question %in% c("... for at least one specific reason" ) ) # this is to select all rows that have "no education" as demographic response which selects all females and males with no education.  This another  targeted groups that I want to analyze.  
violence_onereason2 %>%
  ggplot() + 
  geom_boxplot(aes(x = Gender, y=Value, group=Gender,fill=Gender)) +
  labs(title="Percentage Of Respondents With No Education Who Agree That A Husband Is
Justified In Hitting Or Beating His Wife For At Least One Specific Reason" ,x="Gender", y = "Percentage")+ scale_fill_brewer(palette="Dark2") +
  theme_classic() +  scale_x_discrete(labels=c("Female", "Male")) +  theme(legend.position = "none") #this creates a boxplot with title and classic them and splits the the no education groups into females versus males.

library(readr) 
library(ggplot2)
library(scales)
## 
## Attaching package: 'scales'
## The following object is masked from 'package:purrr':
## 
##     discard
## The following object is masked from 'package:readr':
## 
##     col_factor
library(highcharter)
## Warning: package 'highcharter' was built under R version 4.0.4
## Registered S3 method overwritten by 'quantmod':
##   method            from
##   as.zoo.data.frame zoo
library(RColorBrewer)
#installs highcharter packages that are needed to create highcharter graphs
#I now want to compare all countries females  and male respondents that have  higher education

violence_onereasonhec <- filter(violence1, Demographics_Response %in% c("Higher"), Question %in% c("... for at least one specific reason" ))  
#this is to select all rows that have higher education which selects all female and male respondents
cols <- brewer.pal(4, "Set2") #sets color palette
graph1 <-violence_onereasonhec[order(-violence_onereasonhec$Value),]
graph1 %>%
  hchart("bar", hcaes(x= Country, y = Value, group = Gender), name=c("Female", "Male")) %>%  #command for bar plot graph
  hc_title(text = "Respondents With Higher Education",
           style = list(fontWeight = "bold", fontSize = "14px"),
           align = "center") %>% #command for title and subtitle 
   hc_subtitle(text = "Percentage of Respondents Who Agree That A Husband Is Justified In Beating His Wife For At Least One Specific Reason",
              align = "center") %>% 
     hc_xAxis(title = list(text = "Countries"))%>% 
  hc_yAxis(title = list(text = "Percentage of Respondents "), minorTickInterval = "auto") %>%   #sets axis titles
  hc_size(height=1300,width=600) %>% #elongates graph vertically so that all countries show up on the graph
     hc_add_theme(hc_theme_google()) %>% #sets the google theme for this graph 
  hc_legend(align = "right",
    verticalAlign = "top") %>% #modifies legend
  hc_colors(cols) %>%
  hc_tooltip(pointFormat="<b>{point.Gender}</b>: {point.Value}%")#adds color to graph
#I now want to compare all countries for all female and male respondents with no education

violence_onereasonne <- filter(violence1, Demographics_Response %in% c("No education"), Question %in% c("... for at least one specific reason" ))  # this is to select all rows that have no education which selects all females and males.
cols <- brewer.pal(4, "Set2") #sets color palette
graph2 <-violence_onereasonne[order(-violence_onereasonne$Value),]
options(repr.plot.width = 8, repr.plot.height = 9)
graph2 %>%
  hchart("bar", hcaes(x= Country, y = Value, group = Gender), name=c("Female", "Male")) %>%  #bar plo graph command
  hc_title(text = "Respondents with No Education",
           style = list(fontWeight = "bold", fontSize = "14px"),
           align = "center") %>% #adds title and subtitle for graph
   hc_subtitle(text = "Percentage Of Respondents Who Agree That A Husband Is Justified In Beating His Wife For At Least One Specific Reason",
              align = "center") %>% 
     hc_xAxis(title = list(text = "Countries"))%>% 
  hc_yAxis(title = list(text = "Percentage Of Respondents "), minorTickInterval = "auto")%>% #adds axis title
  hc_size(height=1300,width=600) %>% #elongates graph vertically so that all countries show up
  hc_add_theme(hc_theme_google()) %>% #adds google theme
  hc_legend(
    align = "right",
    verticalAlign = "top", legend=c("Line 1", "Line 2"),
              title=("Line types")) %>% #adds legend to the right side of the graph
   hc_colors(cols) 

This map compares all countries’ respondents (female and male) with higher education or no education to the same question “…Agree that a husband is justified in beating his wife for at least one specific reason”. The map uses an average of the values from the selected groups and assigns an average percentage to each country.

https://public.tableau.com/views/GenderViolenceMap/GenderViolenceMap?:language=en&:display_count=y&publish=yes&:origin=viz_share_link