This project explores the “Biographies of the Enslaved Era” dataset, which includes detailed records on individuals who were enslaved. The dataset, sourced from Enslaved.org and harvard dataverse, comprises both quantitative and categorical variables.
Variables: - Gender: The gender of the individual (e.g., Male, Female). - Occupation: The occupation of the individual (e.g., field laborer, house servant). - birthYear: The age of the individual. - deathYear: The year the individual died.
The goal of this analysis is to understand the relationships between these variables and to visualize the data meaningfully.
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
New names:
• `Death Place Country` -> `Death Place Country...53`
• `Death Place Country` -> `Death Place Country...57`
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
dat <- vroom(...)
problems(dat)
Rows: 1304 Columns: 65
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (55): oldID, Headword, forename, surname, gender, Free Born in North Ame...
dbl (10): ID, birthDay, birthYear, altBirthDay, altBirthMonth, altBirthYear,...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(project1dataset)
# A tibble: 6 × 65
ID oldID Headword forename surname gender Free Born in North A…¹
<dbl> <chr> <chr> <chr> <chr> <chr> <chr>
1 36020 /opr/t0001/e1839 aaron Aaron <NA> M <NA>
2 34829 /opr/t0001/e0641 abraham Abraham <NA> M <NA>
3 35438 /opr/t0001/e1253 aliceof… Alice o… <NA> F <NA>
4 35032 /opr/t0001/e0845 billy Billy <NA> M <NA>
5 39700 /opr/t0001/e5936 blackca… Black C… <NA> M <NA>
6 36215 /opr/t0001/e2034 blindbo… Blind B… <NA> M Freeborn
# ℹ abbreviated name: ¹`Free Born in North America`
# ℹ 58 more variables: `Free before 13th Amendment` <chr>,
# `Ever Enslaved` <chr>, `How was freedom attained` <chr>,
# `Other/Uncertain Status` <chr>, `African born` <chr>,
# `Parent information. Free, Enslaved, Unknown` <chr>,
# `Runaways and rebels` <chr>, `Education/literacy` <chr>, Religion <chr>,
# `Slave Narrative or memoir AUTHOR` <chr>, Notes <chr>, images <chr>, …
ID oldID Headword forename
Min. :34197 Length:1304 Length:1304 Length:1304
1st Qu.:35346 Class :character Class :character Class :character
Median :36559 Mode :character Mode :character Mode :character
Mean :37616
3rd Qu.:38091
Max. :78226
NA's :5
surname gender Free Born in North America
Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character
Mode :character Mode :character Mode :character
Free before 13th Amendment Ever Enslaved How was freedom attained
Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character
Mode :character Mode :character Mode :character
Other/Uncertain Status African born
Length:1304 Length:1304
Class :character Class :character
Mode :character Mode :character
Parent information. Free, Enslaved, Unknown Runaways and rebels
Length:1304 Length:1304
Class :character Class :character
Mode :character Mode :character
Education/literacy Religion Slave Narrative or memoir AUTHOR
Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character
Mode :character Mode :character Mode :character
Notes images Suffix simpleName
Length:1304 Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
altNames birthDay birthMonth birthYear
Length:1304 Min. : 0.00 Length:1304 Min. :1500
Class :character 1st Qu.: 7.00 Class :character 1st Qu.:1808
Mode :character Median :15.00 Mode :character Median :1833
Mean :14.28 Mean :1822
3rd Qu.:22.00 3rd Qu.:1850
Max. :31.00 Max. :1865
NA's :791 NA's :48
birthAttribute Birth Date unknown altBirthDay altBirthMonth
Length:1304 Length:1304 Min. : 6 Min. : 3.000
Class :character Class :character 1st Qu.:12 1st Qu.: 4.000
Mode :character Mode :character Median :14 Median : 5.000
Mean :18 Mean : 6.333
3rd Qu.:27 3rd Qu.: 9.000
Max. :28 Max. :11.000
NA's :1297 NA's :1295
altBirthYear deathDay deathMonth deathYear
Min. :1711 Min. : 1.00 Min. : 1.000 Length:1304
1st Qu.:1768 1st Qu.: 8.00 1st Qu.: 3.000 Class :character
Median :1810 Median :15.00 Median : 6.000 Mode :character
Mean :1802 Mean :15.22 Mean : 6.485
3rd Qu.:1829 3rd Qu.:22.00 3rd Qu.:10.000
Max. :1865 Max. :31.00 Max. :12.000
NA's :1266 NA's :530 NA's :484
deathAttribute altDeathDay altDeathMonth altDeathYear
Length:1304 Length:1304 Min. : 2.000 Min. :1775
Class :character Class :character 1st Qu.: 8.500 1st Qu.:1835
Mode :character Mode :character Median :10.000 Median :1849
Mean : 8.714 Mean :1856
3rd Qu.:10.000 3rd Qu.:1884
Max. :12.000 Max. :1933
NA's :1297 NA's :1291
birthPlaceDescription birthPlaceParish birthPlaceCity birthPlaceCounty
Length:1304 Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
birthPlaceState birthPlaceCountry birthPlaceInstitution altBirthPlaceCity
Length:1304 Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
altBirthPlaceState altBirthPlaceCountry deathPlaceDescription
Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character
Mode :character Mode :character Mode :character
deathPlaceParish deathPlaceCity deathPlaceCounty deathPlaceState
Length:1304 Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Death Place Country...53 deathPlaceInstitution altDeathPlaceCity
Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character
Mode :character Mode :character Mode :character
altDeathPlaceState Death Place Country...57 Occupation #1
Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character
Mode :character Mode :character Mode :character
Occupation #2 Occupation #3 Occupation #4 Occupation #5
Length:1304 Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character Class :character
Mode :character Mode :character Mode :character Mode :character
Occupation #6 Occupation #7 Occupation #8
Length:1304 Length:1304 Length:1304
Class :character Class :character Class :character
Mode :character Mode :character Mode :character
Histogram of Ages
ggplot(project1dataset, aes(x = birthYear)) +geom_histogram(binwidth =5, fill ="blue", color ="black") +labs(title ="Age Distribution of Enslaved Individuals",x ="birthYear",y ="Frequency",caption ="Source: Enslaved.org") +theme_minimal()
Warning: Removed 48 rows containing non-finite outside the scale range
(`stat_bin()`).
Bar Graph of Occupations by Gender
ggplot(reduced_dataset, aes(x =`Occupation #1`, fill = gender)) +geom_bar(position ="dodge") +scale_fill_manual(values =c("purple", "orange")) +labs(title ="Occupation #1 by gender", x ="Occupation #1", y ="Count", caption ="Source: Enslaved.org") +theme_minimal() +theme(axis.text.x =element_text(angle =45, hjust =1))
Scatterplot of birthYear vs. deathYear
ggplot(reduced_dataset, aes(x = birthYear, y = deathYear, color = gender)) +geom_point() +labs(title ="birthYear vs. deathYear", x ="birthYear", y ="deathYear", caption ="Source: Enslaved.org") +scale_color_manual(values =c("lightblue", "red")) +theme_minimal()
Warning: Removed 4 rows containing missing values or values outside the scale range
(`geom_point()`).
Conclusion
This analysis provided insights into the dataset by exploring relationships between variables and visualizing the data. Here are the key steps and findings:
Visualizations: - birthyear Distribution: The histogram shows the distribution of ages among the enslaved individuals. - Occupation Categories by Gender: The bar graph illustrates the distribution of occupation categories across genders. - birthYear vs. DeathYear: The scatterplot reveals the relationship between an individual’s age and their death year.
Observations: - There is a varied age distribution among the individuals. - Certain occupation categories were predominantly held by one gender. - There is a noticeable pattern in the number of transactions relative to age.
Further analysis could include more advanced statistical analyses and additional visualizations to uncover deeper insights into the dataset.