My final project will be on the Maryland Primary 2022, my general hypothesis is what are the figures on Trump backed Gubernatorial Nominee Dan Cox. Is there a outlier of Republican voters who only voted for govenor and not other primary elections? Comparing the number of voters in the Maryland Republican gubernatorial primary and compare it to the number of Republican votes cast in the state Attorney General election, the U.S. Senate primary, and the comptroller primary since there was no opposing candidate. I will be using data from The Maryland State Board Of Elections website on the Unofficial 2022 and updating the information as it comes in with each part of the project.
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4
## ✔ tibble 3.1.8 ✔ dplyr 1.0.9
## ✔ tidyr 1.2.0 ✔ stringr 1.4.0
## ✔ readr 2.1.2 ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Candidate Election Party Vote
## Length:792 Length:792 Length:792 Min. : 6.0
## Class :character Class :character Class :character 1st Qu.: 297.0
## Mode :character Mode :character Mode :character Median : 932.5
## Mean : 4606.7
## 3rd Qu.: 3101.2
## Max. :127534.0
## County
## Length:792
## Class :character
## Mode :character
##
##
##
## `summarise()` has grouped output by 'Party', 'Election'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'Party'. You can override using the
## `.groups` argument.
## `summarise()` has grouped output by 'Party'. You can override using the
## `.groups` argument.
## `summarise()` has grouped output by 'Party', 'Election'. You can override using
## the `.groups` argument.
## # A tibble: 4 × 4
## # Groups: Party [1]
## Party Election Vote Party_Vote
## <chr> <chr> <int> <dbl>
## 1 Republican Attorney General 247191 0.838
## 2 Republican Comptroller 232414 0.788
## 3 Republican Governor 295068 1
## 4 Republican Senator 243138 0.824
## # A tibble: 4 × 5
## # Groups: Party, Election [1]
## Party Election Candidate Vote Party_Vote
## <chr> <chr> <chr> <int> <dbl>
## 1 Republican Governor Cox 153423 0.520
## 2 Republican Governor Ficker 8268 0.0280
## 3 Republican Governor Schulz 128302 0.435
## 4 Republican Governor Werner 5075 0.0172
## Joining, by = c("Party", "Election", "Vote", "Percent_Vote", "Party_Vote")
## Joining, by = c("Party", "Election", "Candidate", "Vote", "Percent_Vote",
## "Party_Vote")
## # A tibble: 8 × 4
## Party Election Candidate Vote
## <chr> <chr> <chr> <int>
## 1 Democrat Senator Van Hollen 535014
## 2 Democrat Comptroller Lierman 422815
## 3 Democrat Attorney General Brown 362882
## 4 Republican Comptroller Glassman 232414
## 5 Democrat Governor Moore 217524
## 6 Republican Governor Cox 153423
## 7 Republican Attorney General Peroutka 135915
## 8 Republican Senator Chaffee 50514
## # A tibble: 6 × 4
## # Groups: Party, Election [6]
## Party Election Candidate Vote
## <chr> <chr> <chr> <int>
## 1 Democrat Senator Van Hollen 535014
## 2 Democrat Comptroller Lierman 422815
## 3 Democrat Attorney General Brown 362882
## 4 Republican Comptroller Glassman 232414
## 5 Democrat Governor Moore 217524
## 6 Republican Governor Cox 153423
## # A tibble: 8 × 3
## Party Election Vote
## <chr> <chr> <int>
## 1 Democrat Senator 662103
## 2 Republican Senator 243138
## 3 Democrat Governor 671160
## 4 Republican Governor 295068
## 5 Democrat Comptroller 638379
## 6 Republican Comptroller 232414
## 7 Democrat Attorney General 659065
## 8 Republican Attorney General 247191
Based on the total votes cast more republicans voted for governor than for any other statewide office. Same is true of democrats but not by as wide of a margin.
## # A tibble: 10 × 4
## # Groups: Party, Election [1]
## Party Election Candidate Vote
## <chr> <chr> <chr> <int>
## 1 Republican Senator Chaffee 50514
## 2 Republican Senator Friend 35714
## 3 Republican Senator Thormann 33290
## 4 Republican Senator J. Perez 26359
## 5 Republican Senator Davis 21095
## 6 Republican Senator Tarantin 20514
## 7 Republican Senator Hawkins 18057
## 8 Republican Senator McGreevey 14128
## 9 Republican Senator Puglisi 13550
## 10 Republican Senator Eze 9917
## # A tibble: 10 × 4
## Party Election Candidate Vote
## <chr> <chr> <chr> <int>
## 1 Republican Senator Eze 9917
## 2 Republican Senator Puglisi 13550
## 3 Republican Senator McGreevey 14128
## 4 Republican Senator Hawkins 18057
## 5 Republican Senator Tarantin 20514
## 6 Republican Senator Davis 21095
## 7 Republican Senator J. Perez 26359
## 8 Republican Senator Thormann 33290
## 9 Republican Senator Friend 35714
## 10 Republican Senator Chaffee 50514
## grouped_df [8 × 4] (S3: grouped_df/tbl_df/tbl/data.frame)
## $ Party : chr [1:8] "Democrat" "Democrat" "Democrat" "Republican" ...
## $ Election : chr [1:8] "Senator" "Comptroller" "Attorney General" "Comptroller" ...
## $ Candidate: chr [1:8] "Van Hollen" "Lierman" "Brown" "Glassman" ...
## $ Vote : int [1:8] 535014 422815 362882 232414 217524 153423 135915 50514
## - attr(*, "groups")= tibble [8 × 3] (S3: tbl_df/tbl/data.frame)
## ..$ Party : chr [1:8] "Democrat" "Democrat" "Democrat" "Democrat" ...
## ..$ Election: chr [1:8] "Attorney General" "Comptroller" "Governor" "Senator" ...
## ..$ .rows : list<int> [1:8]
## .. ..$ : int 3
## .. ..$ : int 2
## .. ..$ : int 5
## .. ..$ : int 1
## .. ..$ : int 7
## .. ..$ : int 4
## .. ..$ : int 6
## .. ..$ : int 8
## .. ..@ ptype: int(0)
## ..- attr(*, ".drop")= logi TRUE
Conclusion Dan Cox was an Trump endorsed candidate I believe influenced majority of Republicans to vote for him instead of filling out their ballots.
## # A tibble: 4 × 4
## # Groups: Party, Election [4]
## Party Election Candidate Vote
## <chr> <chr> <chr> <int>
## 1 Republican Comptroller Glassman 232414
## 2 Republican Governor Cox 153423
## 3 Republican Attorney General Peroutka 135915
## 4 Republican Senator Chaffee 50514