DATA 3210 Slavery Assignment

This assignment analyzes the Trans-Atlantic and Intra-American slave trade datasets using tidyverse.

Part 1: Load Data

col_types_spec <- cols_only(
  id = col_integer(),
  voyage_id = col_integer(),
  voyage_dates__imp_arrival_at_port_of_dis_sparsedate__year = col_double(),
  voyage_slaves_numbers__imp_total_num_slaves_disembarked = col_double(),
  voyage_slaves_numbers__imp_total_num_slaves_embarked = col_double(),
  voyage_outcome__outcome_slaves__name = col_character(),
  voyage_outcome__outcome_owner__name = col_character(),
  voyage_ship__imputed_nationality__name = col_character(),
  voyage_itinerary__imp_principal_region_slave_dis__name = col_character(),
  voyage_itinerary__imp_broad_region_slave_dis__name = col_character(),
  voyage_itinerary__imp_principal_port_slave_dis__name = col_character()
)

trans <- read_csv(
  "https://raw.githubusercontent.com/imowerman-prog/data-3210/refs/heads/main/Data/trans-atlantic.csv",
  col_types = col_types_spec
)

intra <- read_csv(
  "https://raw.githubusercontent.com/imowerman-prog/data-3210/refs/heads/main/Data/intra-american.csv",
  col_types = col_types_spec
)

Rename Columns

trans_clean <- trans %>%
  rename(
    year = voyage_dates__imp_arrival_at_port_of_dis_sparsedate__year,
    slaves_disembarked = voyage_slaves_numbers__imp_total_num_slaves_disembarked,
    slaves_embarked = voyage_slaves_numbers__imp_total_num_slaves_embarked,
    outcome_slaves = voyage_outcome__outcome_slaves__name,
    outcome_owner = voyage_outcome__outcome_owner__name,
    dis_region = voyage_itinerary__imp_principal_region_slave_dis__name,
    dis_broad = voyage_itinerary__imp_broad_region_slave_dis__name,
    dis_port = voyage_itinerary__imp_principal_port_slave_dis__name,
    ship_nationality = voyage_ship__imputed_nationality__name
  )

intra_clean <- intra %>%
  rename(
    year = voyage_dates__imp_arrival_at_port_of_dis_sparsedate__year,
    slaves_disembarked = voyage_slaves_numbers__imp_total_num_slaves_disembarked,
    slaves_embarked = voyage_slaves_numbers__imp_total_num_slaves_embarked,
    outcome_slaves = voyage_outcome__outcome_slaves__name,
    outcome_owner = voyage_outcome__outcome_owner__name,
    dis_region = voyage_itinerary__imp_principal_region_slave_dis__name,
    dis_broad = voyage_itinerary__imp_broad_region_slave_dis__name,
    dis_port = voyage_itinerary__imp_principal_port_slave_dis__name,
    ship_nationality = voyage_ship__imputed_nationality__name
  )

Clean Data

trans_clean <- trans_clean %>%
  mutate(
    year = as.integer(year),
    slaves_embarked = as.numeric(slaves_embarked),
    slaves_disembarked = as.numeric(slaves_disembarked),
    decade = floor(year / 10) * 10,
    estimated_deaths = slaves_embarked - slaves_disembarked,
    is_us = case_when(
      dis_broad == "Mainland North America" ~ TRUE,
      str_detect(dis_port %||% "", regex("new orleans|charleston|savannah|norfolk|baltimore", ignore_case = TRUE)) ~ TRUE,
      TRUE ~ FALSE
    ),
    source_type = "Trans-Atlantic"
  ) %>%
  filter(!is.na(slaves_disembarked), slaves_disembarked > 0)

intra_clean <- intra_clean %>%
  mutate(
    year = as.integer(year),
    slaves_embarked = as.numeric(slaves_embarked),
    slaves_disembarked = as.numeric(slaves_disembarked),
    decade = floor(year / 10) * 10,
    estimated_deaths = slaves_embarked - slaves_disembarked,
    is_us = case_when(
      dis_broad == "Mainland North America" ~ TRUE,
      str_detect(dis_port %||% "", regex("new orleans|charleston|savannah|norfolk|baltimore", ignore_case = TRUE)) ~ TRUE,
      TRUE ~ FALSE
    ),
    source_type = "Intra-American"
  ) %>%
  filter(!is.na(slaves_disembarked), slaves_disembarked > 0)

Combine Datasets

slave_trade <- bind_rows(trans_clean, intra_clean)

Question 1: Total slaves imported to the US

us_total <- slave_trade %>%
  filter(is_us == TRUE) %>%
  summarise(total_us_imported = sum(slaves_disembarked, na.rm = TRUE))

us_total
## # A tibble: 1 × 1
##   total_us_imported
##               <dbl>
## 1            439667

A total of 439,667 enslaved people were imported into the United States in the combined dataset.

Question 2: Proportion of all slaves taken from Africa

total_africa <- trans_clean %>%
  summarise(total_africa_embarked = sum(slaves_embarked, na.rm = TRUE))

us_total_value <- us_total$total_us_imported
africa_total_value <- total_africa$total_africa_embarked

us_proportion <- us_total_value / africa_total_value

us_proportion
## [1] 0.04157307

About 4.16% of enslaved people embarked from Africa ultimately arrived in the United States.

Question 3: Slave imports by decade

us_by_decade <- slave_trade %>%
  filter(is_us == TRUE, !is.na(decade)) %>%
  group_by(decade) %>%
  summarise(total_imported = sum(slaves_disembarked, na.rm = TRUE))
ggplot(us_by_decade, aes(x = factor(decade), y = total_imported)) +
  geom_col() +
  labs(
    title = "Slave Imports to US by Decade",
    x = "Decade",
    y = "Total Imported"
  ) +
  theme_minimal()

The graph shows that slave imports into the US were concentrated heavily in certain decades.

Question 4: Imports by port

us_ports <- slave_trade %>%
  filter(is_us == TRUE) %>%
  group_by(decade, dis_port) %>%
  summarise(total_imported = sum(slaves_disembarked, na.rm = TRUE)) %>%
  arrange(desc(total_imported))

head(us_ports, 10)
## # A tibble: 10 × 3
## # Groups:   decade [10]
##    decade dis_port    total_imported
##     <dbl> <chr>                <dbl>
##  1   1800 Charleston           48923
##  2   1760 Charleston           28240
##  3   1730 Charleston           23306
##  4   1770 Charleston           23086
##  5   1750 Charleston           19345
##  6   1830 New Orleans          18792
##  7   1840 New Orleans          18498
##  8   1820 New Orleans          18265
##  9   1850 Galveston            11409
## 10   1780 Charleston           10061

Charleston and New Orleans appear as the major ports receiving enslaved people.

Question 5: Countries participating in export

countries_by_decade <- trans_clean %>%
  group_by(decade, ship_nationality) %>%
  summarise(total_embarked = sum(slaves_embarked, na.rm = TRUE)) %>%
  arrange(decade, desc(total_embarked))

head(countries_by_decade, 20)
## # A tibble: 20 × 3
## # Groups:   decade [7]
##    decade ship_nationality  total_embarked
##     <dbl> <chr>                      <dbl>
##  1   1510 Portugal / Brazil            624
##  2   1510 0                            223
##  3   1510 Spain / Uruguay              144
##  4   1520 Spain / Uruguay             1043
##  5   1520 0                            597
##  6   1530 0                           1777
##  7   1530 Portugal / Brazil            919
##  8   1530 Spain / Uruguay              224
##  9   1540 0                          19385
## 10   1540 Portugal / Brazil            160
## 11   1550 0                          16949
## 12   1550 Portugal / Brazil            718
## 13   1560 0                          11791
## 14   1560 Great Britain               1749
## 15   1560 Spain                        400
## 16   1560 Spain / Uruguay              295
## 17   1560 Portugal / Brazil            176
## 18   1570 0                          29608
## 19   1570 Portugal / Brazil            856
## 20   1570 France                       104

European countries dominated slave exports from Africa across many decades.

Summary

This assignment shows that slave imports into the United States were concentrated in certain decades and ports, especially Charleston and New Orleans. Although the United States received a significant number of enslaved people, only a relatively small share of the total number embarked from Africa ultimately arrived there. The data also shows that multiple European countries participated in the trans-Atlantic slave trade and that mortality during voyages remained high.