# Load dataload(here::here('data', "research-paper-data-20241029.Rdata"))# shorten and 'unify' factor levels# Note: this removes variable labelsdata <- data |># use `pewmethods` to preserve order of factor levelsmutate(across(c(q19, q20, q21, q22, q23, q24, q30, q31, q32, q33, q34, q35),~pewmethods::fct_case_when( .x %in%c("Not at all confident","Not at all committed","Not at all concerned") ~"Not at all confident", .x %in%c("Not too confident","Not too committed","Not too concerned","Somewhat unconcerned") ~"Not too confident", .x %in%c("Somewhat confident","Somewhat committed","Somewhat concerned") ~"Somewhat confident", .x %in%c("Very confident","Very committed","Very concerned") ~"Very confident",TRUE~NA ))) |># unify factor levelsmutate(across(c(q25, q36), ~ pewmethods::fct_case_when( .x =="Very concerned"~"Very concerned", .x =="Somewhat concerned"~"Somewhat concerned", .x %in%c("Not too concerned", "Somewhat unconcerned") ~"Not too concerned", .x =="Not at all concerned"~"Not at all concerned",TRUE~NA))) |># reverse factor levelsmutate(across(c(q25, q36), ~forcats::fct_rev(.)))
In [3]:
# set ggplot theme that will be used for every plot# theme_get()old <- ggplot2::theme_set(ggplot2::theme_bw()) # capture current theme# set/update new themeggplot2::theme_set(new = ggplot2::theme_bw(base_family ='TeX Gyre Pagella')+# set font of ggplotstheme(legend.position ='bottom') # set legend position for all plots)
In [4]:
# custom function used to create Likert Plots# To avoid excessive copy/paste, I made a function to create Likert plots# it is mostly a wrapper around `ggstats::gglikert`, but with a specific set up# particular colors, theme, etc. likert_plot <-function(data, x, ..., symmetric =FALSE,variable_labels =NULL,label_size =2.5,vline =FALSE,title =waiver(), subtitle =waiver(),caption =waiver(),xlab =waiver()){ p <- ggstats::gglikert(data = data, include = {{ x }}, ...,variable_labels = variable_labels,symmetric = symmetric)+# customize color ggplot2::scale_fill_grey(start =0.5, end =0.1)+# custom themetheme_bw(base_family ="TeX Gyre Pagella")+theme(legend.position ='bottom', # place legend on bottomaxis.title.y.left =element_blank(), # blank out y-axis labelaxis.text.x =element_blank(), # remove percentage text along x-axisstrip.text.y.right =element_text(angle =0) # make facet label horizontal )if (vline==TRUE) { p <- p +geom_vline(xintercept =0, color ='black', linewidth =1.2) } else { p } p <- p + ggplot2::labs(..., title = title, subtitle=subtitle, caption=caption, x = xlab) p}
In [5]:
# function for creating barplotscustom_barplot <-function(data, x, group, title =NULL, subtitle =NULL,caption =NULL, legend_fill =NULL,xlab =NULL){ b <- data |>group_by({{ group }}, {{ x }}) |>count() |>drop_na() |>group_by({{ group }}) |>mutate(prop =round(n/sum(n), digits =3),pct = prop*100,res =str_c(pct,'% (', n, ')', sep ="")) |>ggplot(aes(x = {{ x }}, y = pct, fill = {{ group }}))+geom_bar(position ='dodge', stat ='identity')+geom_text(aes(label = res), position =position_dodge(1.0), size =2.5, vjust =-0.5)+scale_fill_grey(start =0.5, end =0.1) b <- b + ggplot2::labs(title = title,subtitle = subtitle,caption = stringr::str_wrap(caption, width =99),fill = legend_fill,y ="Percentage",x = stringr::str_wrap(xlab, width =85)) b}
In [6]:
# assign items to particular vectors to avoid copy/pastingtrust.az.items <- data |>select(q19, q20, q21, q22, q24) |>colnames() |>dput()trust.lcl.items <- data |>select(q30, q31, q32, q33, q35)|>colnames() |>dput()distrust.az.items <- data |>select(q28_1:q28_5)|>colnames() |>dput()distrust.lcl.items <- data |>select(q40_1:q40_5)|>colnames() |>dput()# variable labels for az and local area items, respectivelytrust.az.varlabels <-c(q19 ="Votes counted as intended",q20 ="Election officials will do good job",q21 ="Election workers will be committed",q22 ="Voting process will be fair",q24 ="Election technology will be secure")distrust.az.varlabels <-c(q28_1 ="Voter fraud will occur",q28_2 ="Many votes won't be counted",q28_3 ="Many voters will be turned away",q28_4 ="Foreign Interference",q28_5 ="Election officials will discourage voting")trust.lcl.varlabels <-c(q30 ="Votes counted as intended",q31 ="Election officials will do good job",q32 ="Election workers will be committed",q33 ="Voting process will be fair",q35 ="Election technology will be secure")distrust.lcl.varlabels <-c(q40_1 ="Voter fraud will occur",q40_2 ="Many Votes won't be counted",q40_3 ="Many voters will be turned away",q40_4 ="Foreign Interference",q40_5 ="Election officials will discourage voting")
Trust in Elections across sample
In [7]:
# plot of trust in elections # plot of trust in AZ elections trust.likertplot.az <- data |>likert_plot(x =all_of(trust.az.items),variable_labels = trust.az.varlabels,title ="Trust in Maricopa County, AZ, Elections")
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
trust.likertplot.az
Trust in Maricopa County, AZ, Elections
In [8]:
# plot of trust in Local Area elections trust.likertplot.lcl <-likert_plot(data = data, x =all_of(trust.lcl.items),variable_labels = trust.lcl.varlabels,title ="Trust in Local Area Elections")
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
trust.likertplot.lcl
Trust in Local Area Elections
In [9]:
# Instead of two separate plots, arrange into one plot while remaining separatedp1.trust <- trust.likertplot.az / trust.likertplot.lcl+ patchwork::plot_annotation(caption ="Missing values omitted")+ patchwork::plot_layout(guides ="collect") &theme(legend.position ="bottom")p1.trust
Trust in Elections
Distrust in elections across sample
In [10]:
# responses to distrust in AZ election items, overall sampledistrust.likert.az <-likert_plot( data, x =all_of(distrust.az.items), variable_labels = distrust.az.varlabels,title ="Distrust in Maricopa County, AZ Elections", subtitle =str_wrap("How likely do you think any or all of the following will happen during this year´s elections in Maricopa County, AZ?",width =95))
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
distrust.likert.az
Distrust in Maricopa County, AZ Elections
In [11]:
# responses to distrust in local election items, overall sampledistrust.likert.lcl <-likert_plot( data,x =all_of(distrust.lcl.items),variable_labels = distrust.lcl.varlabels,title ="Distrust in Local Area Elections",subtitle =str_wrap("How likely do you think any or all of the following will happen during this year´s elections in your local area?",width =95 ))
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
Concerns for Violence and Confidence in Voter Safety Across Sample
In [13]:
# plot of safety concerns and confidence :::::::::::::::::::::::::::: safety.concerns.likert <-likert_plot( data, x =c(q25, q36), y_label_wrap =15, variable_labels =c(q25 ='Thinking about Maricopa County, AZ',q36 ="Thinking about Local Area"), title ="Concern for Voter Intimidation, Threats, or Violence",subtitle =str_wrap("How concerned should voters feel about potential violence, threats of violence, or intimidation while voting in person at their local polling place?", width =99))
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
safety.concerns.likert
In [14]:
# q26 In-person voter safety at polling sitessafety.conf.likert <-likert_plot( data,x =c(q26, q37),y_label_wrap =15,variable_labels =c(q26 ="In Maricopa County, AZ", q37 ="In your local area"),title =str_wrap("Confidence for In-person voter safety at Polling Sites", width =95),subtitle =str_wrap("How confident, if at all, are you that in person polling places will be safe places for voters to cast their ballots during the upcoming elections in November?",width =95 ))
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
Trust and Distrust by Education, Gender, and Partisanship
In [16]:
# plots of trust in AZ elections by educational attainment :::::::::: trust.az.educ.likert <- data |>filter(!is.na(educ_4cat)) |>mutate(educ_3cat = pewmethods::fct_case_when( educ_4cat %in%c("H.S. or less") ~"H.S. or less", educ_4cat %in%c("Some college no degree") ~"Some college no Degree", educ_4cat %in%c("Postgraduate degree", "College degree") ~"College Graduate") ) |>likert_plot(x =all_of(trust.az.items), y ='educ_3cat', facet_rows =vars(.question),facet_label_wrap =15,variable_labels = trust.az.varlabels,subtitle ="Maricopa County, AZ")
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [17]:
# plots of trust in Local area elections by educational attainment :: trust.lcl.educ.likert <- data |>filter(!is.na(educ_4cat)) |>mutate(educ_3cat = pewmethods::fct_case_when( educ_4cat %in%c("H.S. or less") ~"H.S. or less", educ_4cat %in%c("Some college no degree") ~"Some college no Degree", educ_4cat %in%c("Postgraduate degree", "College degree") ~"College Graduate") ) |>likert_plot(x =all_of(trust.lcl.items), y ='educ_3cat', facet_rows =vars(.question),facet_label_wrap =15, variable_labels = trust.lcl.varlabels,subtitle ="Local Area" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
# plot of distrust in AZ elections by educational attainment :::::::: distrust.az.educ.likert <- data |>filter(!is.na(educ_4cat)) |>mutate(educ_3cat = pewmethods::fct_case_when( educ_4cat %in%c("H.S. or less") ~"H.S. or less", educ_4cat %in%c("Some college no degree") ~"Some college no Degree", educ_4cat %in%c("Postgraduate degree", "College degree") ~"College Graduate") ) |>likert_plot(x =all_of(distrust.az.items), y ='educ_3cat', facet_rows=vars(.question),facet_label_wrap =15, variable_labels = distrust.az.varlabels,subtitle ="Maricopa County, AZ")
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [20]:
# plot of distrust items by educational attainmentdistrust.lcl.educ.likert <- data |>filter(!is.na(educ_4cat)) |>mutate(educ_3cat = pewmethods::fct_case_when( educ_4cat %in%c("H.S. or less") ~"H.S. or less", educ_4cat %in%c("Some college no degree") ~"Some college no Degree", educ_4cat %in%c("Postgraduate degree", "College degree") ~"College Graduate") ) |>likert_plot(x =all_of(distrust.lcl.items), y ='educ_3cat', facet_rows =vars(.question),facet_label_wrap =15, variable_labels = distrust.lcl.varlabels,subtitle ="Local Area" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
# plots of trust and distrust in AZ elections by gender ::::::::::::: trust.az.gender.likert <- data |>filter(!is.na(gender_3cat), gender_3cat !='Other/Refused') |>likert_plot(x =all_of(trust.az.items), y ='gender_3cat', facet_rows =vars(.question),facet_label_wrap =15, variable_labels = trust.az.varlabels,subtitle ="Maricopa County, AZ Elections" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [23]:
# plots of distrust in AZ elections by gender ::::::::::::: distrust.az.gender.likert <- data |>filter(!is.na(gender_3cat), gender_3cat !='Other/Refused') |>likert_plot(x =all_of(distrust.az.items), y ='gender_3cat', facet_rows =vars(.question),facet_label_wrap =15, variable_labels = distrust.az.varlabels,subtitle ="Maricopa County, AZ Elections" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [24]:
p6.trust.az.gender <- (trust.az.gender.likert + distrust.az.gender.likert) + patchwork::plot_annotation(caption =str_wrap("Gender Non-binary (n=7) and those who preferred not to say (n=9) response categories omitted for lack of observations. Missing values omitted (n=15)",width =80 ),theme =theme(text =element_text(family ="TeX Gyre Pagella")) ) + patchwork::plot_layout(ncol =1, nrow =2,guides ='keep', axes ="collect") &theme(legend.position ="bottom")p6.trust.az.gender
Trust in Maricopa County, AZ Elections by Gender
In [25]:
# plot of trust in local area elections by gendertrust.lcl.gender.likert <- data |>filter(!is.na(gender_3cat), gender_3cat !='Other/Refused') |>likert_plot(x =all_of(trust.lcl.items), y ='gender_3cat',facet_rows =vars(.question),facet_label_wrap =15, variable_labels = trust.lcl.varlabels,subtitle ="Local Area Elections" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [26]:
# plot of distrust in local area elections by genderdistrust.lcl.gender.likert <- data |>filter(!is.na(gender_3cat), gender_3cat !='Other/Refused') |>likert_plot(x =all_of(distrust.lcl.items), y ='gender_3cat',facet_rows =vars(.question),facet_label_wrap =15, variable_labels = distrust.lcl.varlabels,subtitle ="Local Area Elections" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [27]:
p7.trust.lcl.gender <- trust.lcl.gender.likert/distrust.lcl.gender.likert+ patchwork::plot_annotation(caption =str_wrap("Gender Non-binary (n=7) and those who preferred not to say (n=9) response categories omitted for lack of observations. Missing values omitted (n=15)",width =80), theme =theme(text =element_text(family ="TeX Gyre Pagella"))) + patchwork::plot_layout(guides ='keep', axes ="collect") &theme(legend.position ="bottom")p7.trust.lcl.gender
Trust in Local Area Elections by Gender
In [28]:
# plot of trust in AZ elections by partisanship ::::::: trust.az.party.likert <- data |>filter(!is.na(partyid_3cat)) |>likert_plot(x =all_of(trust.az.items), y ='partyid_3cat',facet_rows =vars(.question), facet_label_wrap =15,variable_labels = trust.az.varlabels,subtitle ="Maricopa County, AZ Elections" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [29]:
# plot of distrust in AZ elections by partisanship ::::::: distrust.az.party.likert <- data |>filter(!is.na(partyid_3cat)) |>likert_plot(x =all_of(distrust.az.items), y ='partyid_3cat',facet_rows =vars(.question), facet_label_wrap =15,variable_labels = distrust.az.varlabels,subtitle ="Maricopa County, AZ Elections" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
# plot of trust and distrust in local area elections by partisanship trust.lcl.party.likert <- data |>filter(!is.na(partyid_3cat)) |>likert_plot(x =all_of(trust.lcl.items), y ='partyid_3cat',facet_rows =vars(.question), facet_label_wrap =15,variable_labels = trust.lcl.varlabels,subtitle ="Local Area Elections" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [32]:
# plot of distrust in local area elections by partisanship distrust.lcl.party.likert <- data |>filter(!is.na(partyid_3cat)) |>likert_plot(x =all_of(distrust.lcl.items), y ='partyid_3cat',facet_rows =vars(.question), facet_label_wrap =15,variable_labels = distrust.lcl.varlabels,subtitle ="Local Area Elections" )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
# plot of trust in AZ elections by treatment conditiontrust.likert.treat.az <- data |>likert_plot(x =all_of(trust.az.items), y ='group', facet_rows =vars(.question),subtitle ="Maricopa County, Arizona")+theme(strip.text.y.right =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [35]:
# plot of trust in local elections by treatment conditiontrust.likert.treat.lcl <- data |>likert_plot(x =all_of(trust.lcl.items), y ='group', facet_rows =vars(.question),facet_label_wrap =10,variable_labels = trust.lcl.varlabels, subtitle ="Local Area")+theme(strip.text.y.right =element_blank()) +theme(axis.text.y.left =element_blank(), # remove y-axis text on 2nd plotstrip.text.y.right =element_text(angle =0, size =8) )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
Trust in Election Administration by Experiment Condition
In [37]:
# distrust in AZ elections by experimental conditiondistrust.az.treat.likert <- data |>likert_plot(x =all_of(distrust.az.items), y ='group', facet_rows =vars(.question),subtitle ="Maricopa County, AZ")+theme(strip.text.y.right =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [38]:
# distrust in local area elections by treatment conditiondistrust.lcl.treat.likert <- data |>likert_plot(x =all_of(distrust.lcl.items), y ='group', facet_rows =vars(.question),facet_label_wrap =10,variable_labels = distrust.lcl.varlabels,subtitle ="Local Area")+theme(strip.text.y.right =element_blank()) +theme(axis.text.y.left =element_blank(), # remove y-axis text on 2nd plotstrip.text.y.right =element_text(angle =0, size =8) )
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
Disrust in Election Administration by Experiment Condition
trust and distrust by partisanship and treatment
In [40]:
# plots of trust and distrust by partisanship and treatment ::::::::: # plot of trust in AZ elections by experiment condition and party idtrust.az.treat.partyid <- data |>filter(!is.na(partyid_3cat)) |>likert_plot(x =all_of(trust.az.items),y ='partyid_3cat',facet_rows =vars(.question),facet_cols =vars(group),facet_label_wrap =15,variable_labels = trust.az.varlabels,subtitle ="Maricopa County, AZ")
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [41]:
# plot of trust in local elections by experiment condition and party idtrust.lcl.treat.partyid <- data |>filter(!is.na(partyid_3cat)) |>likert_plot(x =all_of(trust.lcl.items),y ='partyid_3cat',facet_rows =vars(.question),facet_cols =vars(group),facet_label_wrap =15,variable_labels = trust.lcl.varlabels,subtitle ="Local Area")
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
Trust and Distrust by Legitimacy beliefs and Treatment Condition
In [43]:
# plots of trust and distrust by legitimacy and treatment ::::::::::: # trust in AZ elections by experiment conditions among those who believe the 2020# election results were illegitimatetrust.az.treat.legit <- data |>filter(!is.na(partyid_3cat), !is.na(q7)) |>filter(q7 =="Not legitimate") |>likert_plot(x =all_of(trust.az.items), y ='group',facet_rows =vars(.question),facet_cols =vars(q7),facet_label_wrap =15,variable_labels = trust.az.varlabels,subtitle =str_wrap("Maricopa County, AZ",width =95) )+theme(text =element_text(family ='TeX Gyre Pagella'),strip.text.y.right =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [44]:
# trust in local elections by experiment conditions among those who believe the# 2020 election results were illegitimatetrust.lcl.treat.legit <- data |>filter(!is.na(partyid_3cat), !is.na(q7)) |>filter(q7 =="Not legitimate") |>likert_plot(x =all_of(trust.lcl.items), y ='group',facet_rows =vars(.question),facet_cols =vars(q7),facet_label_wrap =15,variable_labels = trust.lcl.varlabels,subtitle =str_wrap("Local Area",width =95) )+theme(text =element_text(family ='TeX Gyre Pagella'),axis.text.y.left =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
Trust in elections by treatment among those who refute the 2020 election results
In [46]:
# distrust in AZ elections by experiment conditions among those who believe the# 2020 election results were illegitimatedistrust.az.treat.legit <- data |>filter(!is.na(partyid_3cat), !is.na(q7)) |>filter(q7 =="Not legitimate") |>likert_plot(x =all_of(distrust.az.items), y ='group',facet_rows =vars(.question),facet_cols =vars(q7),facet_label_wrap =15,variable_labels = distrust.az.varlabels,subtitle =str_wrap("Maricopa County, AZ",width =95) )+theme(text =element_text(family ='TeX Gyre Pagella'),strip.text.y.right =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [47]:
# distrust in local elections by experiment conditions among those who believe# the 2020 election results were illegitimatedistrust.lcl.treat.legit <- data |>filter(!is.na(partyid_3cat), !is.na(q7)) |>filter(q7 =="Not legitimate") |>likert_plot(x =all_of(distrust.lcl.items), y ='group',facet_rows =vars(.question),facet_cols =vars(q7),facet_label_wrap =15,variable_labels = distrust.lcl.varlabels,subtitle =str_wrap("Local Area",width =95) )+theme(text =element_text(family ='TeX Gyre Pagella'),axis.text.y.left =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
Distrust in elections by treatment among those who refute the 2020 election results
Concerns for Violence and Confidence in Voter Safety by Treatment
In [49]:
# plot for safety concerns by treatment ::::::::::::::::::::::::::::: # Because q25 measures levels of concern/worry, it cannot be included in the# same Likert plot as q26 as that measures reported confidence that voters will# be safe to vote in-person# safety concerns by treatmentsafety.concern.treat.likert <- data |># Need to slightly modify text of factor levelsmutate(across(c(q25, q36),~ pewmethods::fct_case_when( .x =="Very concerned"~"Very concerned", .x =="Somewhat concerned"~"Somewhat concerned", .x %in%c("Not too concerned", "Somewhat unconcerned") ~"Not too concerned", .x =="Not at all concerned"~"Not at all concerned",TRUE~NA ) )) |>likert_plot(x =c(q25, q36),y ='group',facet_rows =vars(.question),facet_label_wrap =15,variable_labels =c(q25 ='Thinking about Maricopa County, AZ', q36 ="Thinking about Local Area"),subtitle =str_wrap("How concerned should voters feel about potential violence, threats of violence, or intimidation while voting in person at their local polling place?",width =99 ) )+theme(text =element_text(family ='TeX Gyre Pagella'), axis.title.y.left =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
In [50]:
# q26 In-person voter safety at election sites by treatmentsafety.conf.treat.likert <- data |>likert_plot(x =c(q26, q37), y ='group',facet_label_wrap =15,facet_rows =vars(.question),variable_labels =c(q26 ="In Maricopa County, AZ",q37 ="In your local area" ),subtitle =str_wrap("How confident, if at all, are you that in person polling places will be safe places for voters to cast their ballots during the upcoming elections in November?", width =95) )+theme(text =element_text(family ='TeX Gyre Pagella'), axis.title.y.left =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
#| - "Confidence for In-person voter safety at Election Sites"#| - "Concern for Voter Intimidation, Threats, or Violence"# safety concerns by treatmentsafety.concern.treat.likert <- data |># Need to slightly modify text of factor levelsmutate(across(c(q25, q36),~ pewmethods::fct_case_when( .x =="Very concerned"~"Very concerned", .x =="Somewhat concerned"~"Somewhat concerned", .x %in%c("Not too concerned", "Somewhat unconcerned") ~"Not too concerned", .x =="Not at all concerned"~"Not at all concerned",TRUE~NA ) )) |>likert_plot(x =c(q25, q36),y ='group',facet_rows =vars(.question),facet_label_wrap =15,variable_labels =c(q25 ='Thinking about Maricopa County, AZ', q36 ="Thinking about Local Area"),subtitle =str_wrap("How concerned should voters feel about potential violence, threats of violence, or intimidation while voting in person at their local polling place?",width =99 ) )+theme(text =element_text(family ='TeX Gyre Pagella'), axis.title.y.left =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
#| - "Confidence for In-person voter safety at Election Sites"#| - "Concern for Voter Intimidation, Threats, or Violence"# In-person voter safety at election sites by treatmentsafety.conf.treat.likert <- data |>likert_plot(x =c(q26, q37), y ='group',facet_label_wrap =15,facet_rows =vars(.question),variable_labels =c(q26 ="In Maricopa County, AZ",q37 ="In your local area" ),subtitle =str_wrap("How confident, if at all, are you that in person polling places will be safe places for voters to cast their ballots during the upcoming elections in November?", width =95) )+theme(text =element_text(family ='TeX Gyre Pagella'), axis.title.y.left =element_blank())
Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
#| - "Confidence for In-person voter safety at Election Sites"#| - "Concern for Voter Intimidation, Threats, or Violence"# fig asafety.concern.treat.likert# fig bsafety.conf.treat.likert
Safety Concerns by Experiment Condition
Confidence for In-person voter safety at Election Sites
Concern for Voter Intimidation, Threats, or Violence
Concern for Violence in Maricopa County, AZ Elections
Confidence in Voter Saftey at Election Sites in Maricopa County, AZ
#| fig-subcap:#| - "Concern for Violence in Maricopa County, AZ Elections"#| - "Confidence in Voter Saftey at Election Sites in Maricopa County, AZ"#| - "Concern for Violence in Local Area Elections"#| - "Confidence in Voter Saftey at Election Sites in Local Area"bar_q25 <-custom_barplot(data = data, x = q25, group = group)bar_q26 <-custom_barplot(data = data, x = q26, group = group)bar_q36 <-custom_barplot(data = data, x = q36, group = group)bar_q37 <-custom_barplot(data = data, x = q37, group = group)bar_q25bar_q26bar_q36bar_q37
Concerns for Safety
Concern for Violence in Maricopa County, AZ Elections
Confidence in Voter Saftey at Election Sites in Maricopa County, AZ
Concern for Violence in Local Area Elections
Confidence in Voter Saftey at Election Sites in Local Area