Introduction

In 2021, SB-90 was passed, creating many changes to election laws, including more restrictions on Vote-by-Mail usage. The goal of this project is to see if there is a decrease in Vote-by-Mail usage once this legislation came into effect on January 1st, 2023. I decided to start with Palm Beach County because the data was accessible, I had a connection, and the county was large enough to have data for previous elections as well. Using the Florida Voter File and the Florida Voter History File, I manipulated code I was given to determine what elections I wanted to select in Palm Beach County.

Loading in the Voter Files and Vote History

This is where I load the code for libraries and the Florida Voter file, while cleaning up duplicate municipalities.


```
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.2     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.3     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package () to force all conflicts to become errors
## 
## Attaching package: 'scales'
## 
## 
## The following object is masked from 'package:purrr':
## 
##     discard
## 
## 
## The following object is masked from 'package:readr':
## 
##     col_factor
```

Create Table to Find Election Dates

This table shows all the election dates in the Voter File. Using this table, I decided to use the March 14th 2023 municipal election date and the March 09th 2021 municipal election date. Further evaluation from the Supervisor of Elections website shows these municipal elections are comparable because they show similar races and municipalities.

table(PAL_hist$Election_Date)
## 
## 01/11/2022 01/29/2008 01/30/2018 01/31/2012 02/02/2010 02/03/2009 02/05/2008 
##      19651     191391       6090      61246      16829       2084       1748 
## 02/07/2006 02/10/2009 02/12/2008 02/16/2007 02/17/2009 02/21/2006 03/03/2009 
##          4        214        319        107       1987          2         89 
## 03/04/2008 03/06/2007 03/08/2011 03/08/2022 03/09/2010 03/09/2021 03/10/2009 
##        107         55      21388      60310      22892      63845      15599 
## 03/11/2008 03/12/2013 03/13/2007 03/14/2006 03/14/2023 03/15/2016 03/17/2020 
##      23724      22727      22683      18117      24815     247284     199554 
## 03/22/2022 03/23/2010 03/23/2021 03/24/2009 03/25/2008 03/26/2013 03/28/2006 
##      20253       4261       3921       2763       2156       1096       2372 
## 04/10/2018 04/10/2023 04/13/2010 05/12/2015 06/02/2020 06/24/2008 06/28/2011 
##      26170        849      31097        196        916       3027       9617 
## 07/12/2011 08/04/2009 08/14/2012 08/18/2020 08/23/2022 08/24/2010 08/25/2009 
##       1834       7500      91226     249526     235985      86210       2542 
## 08/26/2008 08/26/2014 08/28/2018 08/30/2016 09/05/2006 10/10/2006 11/02/2010 
##      59416      82439     211918     140550      62308        576     273918 
## 11/02/2021 11/03/2009 11/03/2020 11/04/2008 11/04/2014 11/06/2012 11/06/2018 
##      16980       2166     744238     397819     344788     470582     533658 
## 11/07/2006 11/08/2011 11/08/2016 11/08/2022 11/17/2009 11/18/2008 12/02/2008 
##     217869       2214     587721     543181       1937       2162         10

Create March 14 2023 dataframe

Next, I included code that created another column for March 14th 2023 election results, including vote method.

Election Results for Mar 14 2023 in each city

This table shows election results for each municipality on 3/14/2023.

#diagnostic
table(FLVF_PAL_hist$ResidenceCity, FLVF_PAL_hist$vote2023March14)
##                       
##                           A    B    P    Y
##   *                      21    1    0   60
##   atlantis              147    5    0  232
##   belle glade           562   20    0  852
##   boca raton           4021  111    0 2556
##   boynton beach         851   22    0  923
##   briny breezes           0    0    0    0
##   canal point             0    0    0    0
##   cloud lake              0    0    0    0
##   delray beach         3624   88    1 3316
##   glenridge               0    0    0    0
##   greenacres              1    0    0    1
##   gulf stream             0    0    0    0
##   haverhill               0    0    0    0
##   highland beach        309   12    0  550
##   hypoluxo              126    4    0  139
##   juno beach            462   11    0  669
##   jupiter                 2    0    0    5
##   jupiter inlet colony    0    0    0    0
##   lake clarke shores    273    7    0  617
##   lake harbor             0    0    0    0
##   lake park             154    0    0  289
##   lake worth              4    0    0    1
##   lake worth beach        2    0    0    1
##   lantana               277    8    0  618
##   loxahatchee             0    0    0    0
##   loxahatchee groves      0    0    0    0
##   manalapan               0    0    0    0
##   mangonia park          14    2    0   76
##   north palm beach        0    0    0    2
##   ocean ridge           167    8    0  572
##   pahokee                 0    0    0    0
##   palm beach              2    0    0    0
##   palm beach gardens      2    0    0    1
##   palm beach shores      45    2    0  298
##   palm springs          226   11    0  184
##   riviera beach           1    0    0    1
##   royal palm beach        0    0    0    0
##   south bay             103    6    0  342
##   south palm beach        0    0    0    0
##   tequesta              224    8    0  427
##   village of golf         0    0    0    0
##   wellington              3    0    0    0
##   west palm beach         4    0    0    3
##   westlake                1    0    0    0

Create March 09 2021 dataframe

Next, I added code that created another column for the 3/09/2021 election, including voter method.

Election Results for Mar 09 2021 in each city

This table shows election results for each municipality by voting method.

table(FLVF_PAL_hist$ResidenceCity, FLVF_PAL_hist$Vote2021March09)
##                       
##                           A    B    P    Y
##   *                     115    2    0  100
##   atlantis               13    0    0    6
##   belle glade           799   37    0 1026
##   boca raton           8448  119    2 3321
##   boynton beach         361    9    0  117
##   briny breezes          41    0    0   47
##   canal point             0    0    0    3
##   cloud lake              1    0    0    0
##   delray beach         7520  113    1 3442
##   glenridge               0    0    0    1
##   greenacres             32    1    0    7
##   gulf stream             0    0    0    4
##   haverhill             109    4    0   75
##   highland beach         21    0    0    2
##   hypoluxo              173    5    0  103
##   juno beach            644    8    0  424
##   jupiter               132    0    0   46
##   jupiter inlet colony    1    0    0    0
##   lake clarke shores     11    1    0    2
##   lake harbor             0    0    0    0
##   lake park              19    1    0    9
##   lake worth            124    3    0   41
##   lake worth beach     2093   30    0 1772
##   lantana               705   12    0  619
##   loxahatchee            19    1    0   14
##   loxahatchee groves    241    0    0  395
##   manalapan               3    0    0    0
##   mangonia park           3    1    0    2
##   north palm beach     1613   15    0  995
##   ocean ridge           282    4    1  381
##   pahokee               255   10    2  394
##   palm beach           1528   30    2 1066
##   palm beach gardens   5992   65    0 1100
##   palm beach shores       3    0    0    1
##   palm springs           20    1    0    3
##   riviera beach        2667   62    0 1494
##   royal palm beach       38    0    0   12
##   south bay             198    6    0  263
##   south palm beach       11    0    0    6
##   tequesta              564    5    0  491
##   village of golf         5    0    0    0
##   wellington             33    1    0   18
##   west palm beach      6323  104    0 2017
##   westlake               18    1    0    9

Voter Turnout in 2021 and 2023 for the 9 municipalities

In this next section, I wanted to analyze voter turnout. After further evaluation using results available on the Supervisor of Elections website, I have identified 9 municipalities with comparable elections in 2023 and 2021:

Belle Glade, Boca Raton, Delray Beach, Hypoluxo, Juno Beach, Lantana, Ocean Ridge, South Bay, Tequesta.

Using those eligible to vote in these 9 municipalities, I calculated those who voted and who did not vote in 2023 and 2021 to find the difference in turnout rates.

## Warning in rbind(deparse.level, ...): number of columns of result, 3, is not a
## multiple of vector length 4 of arg 2

Combining Voter Turnout 2021 and 2023

After finding turnout rates for each 2021 and 2023 municipal elections, I combined these graphs to get a better idea of how turnout changed between 2021 and 2023.

library(ggplot2)
library(patchwork)

# Your first ggplot
VNVplot1 <- ggplot(results2021, aes(x = vote2023, y = n, fill = Value)) +
  geom_bar(stat = "identity", position = "dodge") +
  labs(
    title = "2021 Municipal Turnout",
    x = "Voted Status",
    y = "Count"
  ) +
  scale_y_continuous(labels = scales::comma) +
  geom_text(
    data = results2021_percentages,
    aes(x = vote2023, y = n, label = sprintf("%4.2f%%", percent * 100)),
    position = position_dodge(width = 0.9),
    vjust = -0.5,
    size = 3
  ) +
  geom_text(
    aes(label = comma(n)),
    position = position_dodge(width = 0.9),
    vjust = 1.5,
    size = 3
  )+
  coord_cartesian(ylim = c(0, 325000)) +
  theme(axis.text.x = element_blank(), axis.ticks.x = element_blank(),
        legend.position = "none")  # Remove the legend

# Your second ggplot
VNVplot2 <- ggplot(turnoutresults2023, aes(x = vote2023, y = n, fill = Value)) +
  geom_bar(stat = "identity", position = "dodge") +
  labs(
    title = "2023 Municipal Turnout",
    x = "Voted Status",
    y = "Count"
  ) +
  scale_y_continuous(labels = scales::comma) +
  geom_text(
    data = results2023_percentages,
    aes(x = vote2023, y = n, label = sprintf("%4.2f%%", percent * 100)),
    position = position_dodge(width = 0.9),
    vjust = -0.5,
    size = 3
  ) +
  geom_text(
    aes(label = comma(n)),
    position = position_dodge(width = 0.9),
    vjust = 1.5,
    size = 3
  ) +
  coord_cartesian(ylim = c(0, 325000)) +
  theme(axis.text.x = element_blank(), axis.ticks.x = element_blank(),
        legend.position = "none")

# Combine the two plots
Voted_NotVoted_combined_plot <- VNVplot1 + VNVplot2 

################## FINAL PRODUCT #################### 
Voted_NotVoted_combined_plot

We see a decrease in voter turnout by 3 percentage points, or 10,394 votes.

Code for VBM Turnout

The following actions I performed were coding graphs comparing vote by mail to other methods of voting in 2021 and 2023 elections. I show this comparison in a stacked graph.

Stacked Graph for VBM Turnout

plot1vbm <- ggplot(count_A_and_not_A_percentages2021, aes(x = 1, y = percentage, fill = category)) +
  geom_col(position = "stack", width = 0.5) +
  geom_text(aes(label = sprintf("%.2f%%", percentage),
                y = ifelse(category == "Other Method", percentage * 1.2, percentage / 2)), 
            position = position_stack(vjust = 1.5), 
            color = "black", size = 3) +
  labs(
    title = "Voted by Mail versus Other Methods (2021)",
    x = "Method",
    y = "Percentage of Voted Ballots"
  ) +
  scale_y_continuous(labels = scales::percent_format(scale = 1)) +
  scale_fill_manual(values = c("VBM" = "lightcoral", "Other Method" = "skyblue")) +
  theme(axis.text.x = element_blank(), axis.ticks.x = element_blank())


plot2vbm <- ggplot(count_A_and_not_A_percentages2023, aes(x = 1, y = percentage, fill = category)) +
  geom_col(position = "stack", width = 0.5) +
  geom_text(aes(label = sprintf("%.2f%%", percentage), y = percentage / 2), 
            position = position_stack(vjust = 1.5), 
            color = "black", size = 3) +
  labs(
    title = "Voted by Mail versus Other Methods (2023)",
    x = "Method",
    y = "Percentage of Voted Ballots"
  ) +
  scale_y_continuous(labels = scales::percent_format(scale = 1)) +
  scale_fill_manual(values = c("VBM" = "lightcoral", "Other Method" = "skyblue")) +
  theme(axis.text.x = element_blank(), axis.ticks.x = element_blank())

# Combine the two plots to show 2021 and 2023 next to each other #
VBMcombined_plot <- plot1vbm + plot2vbm + plot_layout(ncol = 2)

######## Display the combined plot ########
print(VBMcombined_plot)

We see a 15.23 percentage point decrease in Vote by Mail usage among those who utilized a voting method.

Breakdown of Voting Method 2023

In this section, I am looking at the breakdown of each voting method for 2021 and 2023, comparing how each method was used in each year.

Combining Voter Method Turnouts 2021 and 2023 Code

plot_2021VoteTurnout <- ggplot(results2021_ALL_counts_df, aes(x = Vote2021, y = Count)) +
  geom_bar(stat = "identity", fill = "skyblue") +
  geom_text(aes(label = Count), vjust = -0.5, size = 3, color = "black") +
  labs(
    title = "2021 Voting Method",
    x = "Voting Method",
    y = "Count"
  ) +
  coord_cartesian(ylim = c(0, 20000))+ 
  scale_x_discrete(labels = c("A" = "Vote by Mail", "B" = "Rejected", "Y" = "In-Person", "P" = "Provisional"))

plot_2023VoteTurnout <- ggplot(results2023_ALL_counts_df, aes(x = Vote2023, y = Count)) +
  geom_bar(stat = "identity", fill = "skyblue") +
  geom_text(aes(label = Count), vjust = -0.5, size = 3, color = "black") +
  labs(
    title = "2023 Voting Method",
    x = "Voting Method",
    y = "Count"
  )  +
  coord_cartesian(ylim = c(0, 20000))+ 
  scale_x_discrete(labels = c("A" = "Vote by Mail", "B" = "Rejected", "Y" = "In-Person", "P" = "Provisional"))

# Combine the two plots vertically
combined_plotsVoteTurnout <- plot_2021VoteTurnout + plot_2023VoteTurnout

Combined Voting Method Turnout for 2021 and 2023

print(combined_plotsVoteTurnout)

Analysis of Vote Method Turnout

Compared to the respective 2021 municipal elections, turnout decreased among these 9 municipalities combined by about 3%, or by 10,394 votes.

Between 2021 and 2023, in-person voting decreased by 579 votes.

Between 2021 and 2023, Vote by Mail voting decreased by 9,767 votes.

Following 2021 Voters’ Behavior into 2023: Vote by Mail

In this section, I looked at voters who voted by mail and followed their voting behavior in 2023.

Step 1: Filter VBM voters in specific municipalities

filtered_dataA <- FLVF_PAL_hist %>%
  filter(Vote2021March09 == "A" & ResidenceCity %in% municipalities_to_include)

Step 2: Create a new column for the categories in 2023

filtered_dataA <- filtered_dataA %>%
  mutate(Category = ifelse(is.na(vote2023March14), "NA", as.character(vote2023March14)))

Step 3: Summarize the counts for each category

category_countsA <- filtered_dataA %>%
  count(Category, sort = TRUE)

      ## add percentages ##
category_countsA <- category_countsA %>%
  mutate(Percentage = n / sum(n) * 100)

Step 4: Visualize the results

ggplot(category_countsA, aes(x = reorder(Category, -n), y = n, fill = Category)) +
  geom_bar(stat = "identity") +
  geom_text(aes(label = n), vjust = -0.5, size = 3, color = "black") +
  geom_text(aes(label = sprintf("%.1f%%", Percentage), y = n), vjust = 1.2, size = 3, color = "black") +
  labs(
    title = "Individual Voting Behavior in 2023 for VBM Voters in 2021",
    x = "Voting Behavior in 2023",
    y = "Count"
  ) +
  coord_cartesian(ylim = c(0, 10750)) +
  scale_x_discrete(labels = c("A" = "Vote by Mail", "B" = "Rejected VBM", "Y" = "In-Person", "P" = "Provisional", "NA" = "Did Not Vote")) +
  scale_fill_manual(values = c("A" = "#66c2a5", "B" = "#fc8d62", "Y" = "#8da0cb", "P" = "#e78ac3", "NA" = "grey"), name = "Voting Behavior") +
   theme(legend.position = "none")

Analysis for VBM

54.1% of voters who voted by mail in 2021 did not vote in 2023 (10,462 voters). 35.2% of voters who voted by mail in 2021 voted by mail in 2023 (6798 voters). 10.0% of voters who voted by mail in 2021 voted in person in 2023 (1934 voters). 0.7% of voters who voted by mail in 2021 voted by mail in 2023, but their ballot was rejected (138 voters).

Following 2021 Voters’ Behavior in 2023: In-Person Voting

In this section, I looked at voters who voted in person in 2021, following their voter behavior in 2023.

Step 1: Filter VBM voters in specific municipalities

count_2021_Y <- FLVF_PAL_hist %>%
  filter(Vote2021March09 == "Y" & ResidenceCity %in% municipalities_to_include) %>%
  count(Vote2021March09)

count_2023_Y <- FLVF_PAL_hist |>
  filter(vote2023March14 == "Y" & ResidenceCity %in% municipalities_to_include) |>
  count(vote2023March14)

Step 2: Create a new column for the categories in 2023

filtered_dataY <- FLVF_PAL_hist %>%
  filter(Vote2021March09 == "Y" & ResidenceCity %in% municipalities_to_include)

filtered_dataY <- filtered_dataY %>%
  mutate(Category = ifelse(is.na(vote2023March14), "NA", as.character(vote2023March14)))

Step 3: Summarize the counts for each category

category_countsY <- filtered_dataY %>%
  count(Category, sort = TRUE)

## add percentages
category_countsY <- category_countsY %>%
  mutate(Percentage = n / sum(n) * 100)

Step 4: Visualize the results

ggplot(category_countsY, aes(x = reorder(Category, -n), y = n, fill = Category)) +
  geom_bar(stat = "identity", aes(fill = Category))+
  geom_text(aes(label = n), vjust = -0.5, size = 3, color = "black") +
  geom_text(aes(label = sprintf("%.1f%%", Percentage), y = n), vjust = 1.2, size = 3, color = "black") +
  labs(
    title = "Individual Voting Behavior in 2023 for In-Person Voters in 2021",
    x = "Voting Behavior in 2023",
    y = "Count"
  ) +
  coord_cartesian(ylim = c(0, 10750))+
  scale_x_discrete(labels = c("A" = "Vote by Mail", "B" = "Rejected VBM", "Y" = "In-Person", "P" = "Provisional", "NA" = "Did Not Vote")) +
  scale_fill_manual(values = c("A" = "#66c2a5", "B" = "#fc8d62", "Y" = "#8da0cb", "P" = "#e78ac3"), name = "Voting Behavior") +
  theme(legend.position = "none")

Analysis for In-Person

53.2% of voters who voted in-person in 2021 did not vote in 2023.

41.9% of voters who voted in-person in 2021 voted in person in 2023.

4.7% of voters who voted in-person in 2021 voted by mail in 2023.

Overall Analysis

Overall turnout in these 9 municipalities decreased by 10,394 votes.

Vote by mail turnout decreased by 9,812 votes.

In-person turnout decreased by 579 votes.

Of the 19,333 voters who voted by mail in 2021, only 6,798 voters voted by mail in 2023 (35%).

Of the 19,333 voters who voted by mail in 2021, 10,462 of them did not vote in 2023 (54%).

Future Projects

In the future, I plan to look at how this turnout affects certain demographics, such as race and party. Below are some graphs with such statistics, but further analysis will need to be done in order to draw conclusions from them.

Race of All Voters in 2021 and 2023

Party of All Voters in 2021 and 2023

print(Party2123)