I created a dataset using the election data available on the City of Boston website. I included municipal elections from November 2005 to November 2017. I excluded special municipal elections and preliminary municipal elections. I did not include data from the November 2019 municipal election because, as of right now, I only have access to unofficial election data. However, I do compare my findings with the 2019 unofficial results (see the Recommendations section at the end of this document).
The dataset contains 5 variables/columns (ward, precinct, election date, number of registered voters, number of votes cast, number of residents). I calculate a 6th (turnout, defined as number of votes divided by number of registered voters as a percentage).
# Reading in and processing the data
data = read_xlsx("elections_data.xlsx") %>%
mutate(election = as.character(election),
num_registered = as.numeric(num_registered),
num_voters = as.numeric(num_voters),
num_residents = as.numeric(num_residents),
turnout = round(num_voters/num_registered*100,2))
# A preview of the data
head(data)
## # A tibble: 6 x 7
## ward precinct election num_registered num_voters num_residents turnout
## <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 1 1 2017-11-07 1413 495 1871 35.0
## 2 1 2 2017-11-07 1053 298 2006 28.3
## 3 1 3 2017-11-07 2389 711 3391 29.8
## 4 1 4 2017-11-07 816 230 2099 28.2
## 5 1 5 2017-11-07 1263 355 2681 28.1
## 6 1 6 2017-11-07 1184 313 2576 26.4
# Calculating the lowest turnout wards/precincts from 2005-2017, excluding Ward 1 Precinct 15
lowest_turnout = data %>%
filter(!(ward == 1 & precinct == 15)) %>%
group_by(election) %>%
top_n(-10, turnout) %>%
arrange(election, turnout)
# Creating a frequency table for lowest turnout wards/precincts (wards on left, precincts on top)
ftable(lowest_turnout$ward, lowest_turnout$precinct)
## 1 2 3 4 5 7 8 9 10 14 15
##
## 4 0 0 0 0 0 0 0 6 7 0 0
## 5 0 0 0 0 0 0 0 1 3 0 0
## 21 5 7 7 7 7 3 7 3 0 3 4
The following wards/precincts were among the ten wards/precincts with the lowest voter turnout rates in all 7 municipal elections from 2017-2005:
# Calculating the highest turnout wards/precincts from 2017-2005, excluding Ward 1 Precinct 15
highest_turnout = data %>%
filter(!(ward == 1 & precinct == 15)) %>%
group_by(election) %>%
top_n(10, turnout) %>%
arrange(election, turnout)
# Creating a frequency table for lowest turnout wards/precincts (wards on left, precincts on top)
ftable(highest_turnout$ward, highest_turnout$precinct)
## 1 2 3 4 6 7 8 9 10 11 12 13 14 16 17 18 19 20
##
## 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
## 6 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
## 7 4 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## 13 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0
## 16 0 0 0 0 0 3 2 6 1 1 7 0 0 0 0 0 0 0
## 17 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0
## 18 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 2
## 19 0 2 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0
## 20 0 0 0 1 1 0 0 0 0 3 4 1 7 1 2 2 4 0
## 21 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
The following wards/precincts were among the ten wards/precincts with the highest voter turnout rates in all 7 municipal elections from 2017-2005:
Our key target areas should be Ward 4 Precinct 10, Ward 21 Precinct 2, and Ward 21 Precinct 3 for the low turnout areas & Ward 16 Precinct 12 and Ward 20 Precinct 14 for the high turnout areas.
NOTE: I compared the findings above with the unofficial election results from the November 2019 municipal election. My recommended target areas are consistent with the unofficial turnout numbers: the recommended low turnout areas are among the 5 lowest turnout wards/precincts in 2019 and likewise for the recommended high turnout areas.