-
Notifications
You must be signed in to change notification settings - Fork 20
/
ND.Rmd
94 lines (73 loc) · 2.96 KB
/
ND.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
title: "North Dakota Early Voting Statistics"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(knitr)
library(kableExtra)
library(scales)
library(DT)
library(highcharter)
state_stats <- read_csv("D:/DropBox/Dropbox/Mail_Ballots_2020/markdown/2020G_Early_Vote.csv")
# Setup
party_shell <- data.frame(Party=character(),
Count=integer(),
Percent=double(),
stringsAsFactors=FALSE)
party_shell[1,1] <- "Democrats"
party_shell[2,1] <- "Republicans"
party_shell[3,1] <- "Minor"
party_shell[4,1] <- "No Party Affiliation"
party_shell[5,1] <- "TOTAL"
race_shell <- data.frame(Race=character(),
Count=integer(),
Percent=double(),
stringsAsFactors=FALSE)
race_shell[1,1] <- "Non-Hispanic White"
race_shell[2,1] <- "Non-Hispanic Black"
race_shell[3,1] <- "Hispanic"
race_shell[4,1] <- "Non-Hispanic Asian American"
race_shell[5,1] <- "Non-Hispanic Native American"
race_shell[6,1] <- "Other/Multiple/Unknown"
race_shell[7,1] <- "TOTAL"
gender_shell <- data.frame(Gender=character(),
Count=integer(),
Percent=double(),
stringsAsFactors=FALSE)
gender_shell[1,1] <- "Female"
gender_shell[2,1] <- "Male"
gender_shell[3,1] <- "Unknown"
gender_shell[4,1] <- "TOTAL"
age_shell <- data.frame(Age=character(),
Count=integer(),
Percent=double(),
stringsAsFactors=FALSE)
age_shell[1,1] <- "18 to 24"
age_shell[2,1] <- "25 to 34"
age_shell[3,1] <- "35 to 44"
age_shell[4,1] <- "45 to 54"
age_shell[5,1] <- "55 to 64"
age_shell[6,1] <- "65 and up"
age_shell[7,1] <- "TOTAL"
# North Dakota
ND_req_send_tot <- data.frame(Total=character(),
Count=integer(),
Percent=double(),
stringsAsFactors=FALSE)
ND_req_send_tot[1,1] <- "TOTAL"
ND_req_send_tot[1,2] <- sum(state_stats[27,5])
ND_req_send_tot$Percent <- 100.0
```
## {.tabset}
Last Report: `r state_stats[35,9]`
Source: `r state_stats[35,2]`
North Dakota's reporting system updates in real-time as election officials process ballots. I only periodically scrape data from the state's website.
### Total Early Vote
North Dakota voters have cast **`r format(as.numeric(state_stats[35,8]), big.mark =",")`** ballots.
### In-Person Early Vote
North Dakota voters have cast **`r format(as.numeric(state_stats[35,7]), big.mark =",")`** in-person early ballots.
### Returned Mail Ballots
North Dakota voters have cast **`r format(as.numeric(state_stats[35,6]), big.mark =",")`** mail ballots.
### Mail Ballot Requests
North Dakota voters have requested **`r format(as.numeric(state_stats[35,5]), big.mark =",")`** mail ballots.