2 Data

The polling data were obtained on February 20, 2020 from the City of Sachse TX government website (https://www.cityofsachse.com/365/Election-Results) (See Figure 1 below).

Sachse, TX January 2020 Special Election Results (Pre-runoff)

2.1 Importing the Data

The polling results are copied to a comma-separated values (CSV) file named sachse2020.csv and imported via the read_csv() function, presenting the results with the kable() function to produce a formatted table.

2.1.1 R Code: Importing the Dataset and Presenting the Results in a Tabular Format

data <- read_csv('sachse2020.csv')

data %>%
  arrange(desc(votes_total_pct)) %>%
  set_names(c('Candidate', 'Early Voting', 'Election Day', 
              'Total Votes', 'Total Votes %')) %>%
  kable(booktabs = TRUE, caption = 'Special Election Results (Pre-runoff)', linesep = '') %>%
  kable_styling(latex_options = "hold_position") %>%
  footnote(general_title = 'Source:',
           general = 'https://www.cityofsachse.com/365/Election-Results',
           footnote_as_chunk = TRUE)
Table 2.1: Special Election Results (Pre-runoff)
Candidate Early Voting Election Day Total Votes Total Votes %
Chance Lindsey 179 88 267 44.13
Drew Shubzda 108 98 206 34.05
Patrick Cook 26 9 35 5.79
Melvin M. Randle Jr.  16 14 30 4.96
Debbie Stout 18 12 30 4.96
Bob Yarborough 8 10 18 2.98
George “Butch” Kemper 12 3 15 2.48
Kirk Wood 2 2 4 0.66
Source: https://www.cityofsachse.com/365/Election-Results