Libraries:
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(ggplot2)
library(tidyr)
library(stringr)
library(scales)
Load Datasets
bl_loyal <- read.csv("black_loyalists.csv")
loyal <- read.csv("val_clean.csv",
header = TRUE)
Sex comparison, black vs white loyalists:
ggplot(bl_loyal, aes(x = sex)) +
geom_bar(stat = "count", fill = "purple") +
labs(title = "Sex Ratio of VA Black Loyalists")
ggplot(loyal, aes(x = sex)) +
geom_bar(stat = "count", fill = "purple") +
labs(title = "Sex Ratio of VA White Loyalists")
Black loyalists war county data:
ggplot(bl_loyal, aes(x = war_county)) +
geom_bar(stat = "count", fill ="purple") +
labs(title = "War Counties")
bl_loyal %>% count(war_county)
## # A tibble: 27 × 2
## war_county n
## <fctr> <int>
## 1 Accomac 6
## 2 Buckingham 1
## 3 Cecil 1
## 4 Chesterfield 2
## 5 Cumberland 2
## 6 Essex 1
## 7 Gloucester 4
## 8 Hampton 3
## 9 Isle of Wight 12
## 10 James River 2
## # ... with 17 more rows
Black loyalists war city data:
ggplot(bl_loyal, aes(x = war_city)) +
geom_bar(stat = "count", fill ="purple") +
labs (title = "War Cities")
bl_loyal %>% count(war_city)
## # A tibble: 63 × 2
## war_city n
## <fctr> <int>
## 1 Black River 1
## 2 Blackwater 1
## 3 Carlyne 1
## 4 Caven Court 1
## 5 Charles City 1
## 6 Charlesfield 1
## 7 Cherry Point 2
## 8 Cherrystone 1
## 9 Chester 1
## 10 Chesterfield 1
## # ... with 53 more rows
Where black loyalists are resettled after the war:
ggplot(bl_loyal, aes(x = dest_nation)) +
geom_bar(stat = "count", fill = "purple")+
labs(title = " Black VA Loyalist Exile Nation",
x= "Post War Nation")
ggplot(bl_loyal, aes(x = dest_city)) +
geom_bar(stat = "count", fill = "purple")+
labs(title = " Black VA Loyalist Exile City",
x= "Post War City")
How loyalists obtained freedom:
bl_loyal %>% count(current_status, obtained_freedom)
## Source: local data frame [12 x 3]
## Groups: current_status [?]
##
## current_status obtained_freedom n
## <fctr> <fctr> <int>
## 1 free born free 21
## 2 free brought off 8
## 3 free manumitted 1
## 4 free runaway 382
## 5 free runaway--British Proclamation 4
## 6 free served time 2
## 7 free NA 7
## 8 indentured runaway 1
## 9 slave brought off 1
## 10 slave slave 1
## 11 slave NA 1
## 12 NA NA 4
Legal Status Before the War: Not surprising
ggplot(bl_loyal, aes(x= former_status, fill = sex)) +
geom_bar(width = 1) +
labs(title = "Status Before the War",
x= "Legal Status")
Legal Status After the War:
ggplot(bl_loyal, aes(x= current_status, fill = sex)) +
geom_bar(width = 1) +
labs(title = "Status After the War",
x= "Legal Status")
The Year Enslaved loyalists Ran Away: Note 40 are missing.
bl_loyal %>% count(freedom_year)
## # A tibble: 11 × 2
## freedom_year n
## <int> <int>
## 1 1763 1
## 2 1775 6
## 3 1776 50
## 4 1777 45
## 5 1778 86
## 6 1779 124
## 7 1780 49
## 8 1781 28
## 9 1782 3
## 10 1783 1
## 11 NA 40
ggplot(bl_loyal, aes(freedom_year, fill = sex)) +
geom_bar(width = 1) +
labs(title = "Years Black Loyalists Escaped Slavery",
x= "Years")
## Warning: Removed 40 rows containing non-finite values (stat_count).
Data on Norfolk:
bl_loyal_norfolk <- bl_loyal %>%
filter(war_city =="Norfolk")
ggplot(bl_loyal_norfolk, aes(x= dest_city)) +
geom_bar(fill = "purple")+
labs(title = "Where Black Norfolk Loyalists Moved",
x= "Post War Destination")
bl_loyal_norfolk %>% count(freedom_year, former_status)
## Source: local data frame [9 x 3]
## Groups: freedom_year [?]
##
## freedom_year former_status n
## <int> <fctr> <int>
## 1 1775 slave 2
## 2 1776 slave 20
## 3 1777 slave 6
## 4 1778 slave 22
## 5 1779 slave 22
## 6 1780 slave 6
## 7 1781 slave 2
## 8 NA free 1
## 9 NA slave 6