Show code
# Load data from Stevenson and Williams (2018) Table 1
ohd_data_raw <- read_csv("stevenson-and-williams-data.csv", show_col_types = FALSE)
# Clean and prepare the data
ohd_data <- ohd_data_raw %>%
filter(!is.na(`Rim (µm)`)) %>% # Remove empty rows
mutate(
sample_id = `Laboratory number`,
site = `Site number`,
hydration_rim = `Rim (µm)`,
rim_sd = `SD 2-sigma`,
percent_oh = `%OH`,
date_ad = `Date AD`,
date_sd = SD,
context = ifelse(Provenience == "Surface", "Surface", "Buried"),
break_type = `Break attribute`,
artifact_type = case_when(
str_detect(Identification, "Blade") ~ "Blade fragment",
str_detect(Identification, "Stem") ~ "Stem fragment",
str_detect(Identification, "Complete") ~ "Complete mata'a",
TRUE ~ "Other"
),
# Convert AD dates to BP (1950 reference)
age_bp = 1950 - date_ad,
# Add spatial coordinates (approximate for different sites)
latitude = case_when(
str_detect(site, "^7-") ~ -27.12 + rnorm(n(), 0, 0.01),
str_detect(site, "^11-") ~ -27.15 + rnorm(n(), 0, 0.01),
str_detect(site, "^12-") ~ -27.10 + rnorm(n(), 0, 0.01),
str_detect(site, "^18-") ~ -27.08 + rnorm(n(), 0, 0.01),
str_detect(site, "Vaihu") ~ -27.13,
TRUE ~ -27.11 + rnorm(n(), 0, 0.01)
),
longitude = case_when(
str_detect(site, "^7-") ~ -109.42 + rnorm(n(), 0, 0.01),
str_detect(site, "^11-") ~ -109.38 + rnorm(n(), 0, 0.01),
str_detect(site, "^12-") ~ -109.35 + rnorm(n(), 0, 0.01),
str_detect(site, "^18-") ~ -109.40 + rnorm(n(), 0, 0.01),
str_detect(site, "Vaihu") ~ -109.37,
TRUE ~ -109.39 + rnorm(n(), 0, 0.01)
),
# Assign to source (all from same source in this dataset)
source = "Orito"
)
# Display data summary
cat("Total samples:", nrow(ohd_data), "\n")Total samples: 64
Show code
cat("Date range:", min(ohd_data$date_ad), "-", max(ohd_data$date_ad), "AD\n")Date range: 1196 - 1856 AD
Show code
cat("Rim thickness range:", min(ohd_data$hydration_rim), "-", max(ohd_data$hydration_rim), "µm\n\n")Rim thickness range: 0.75 - 1.91 µm
Show code
# Summary statistics by context
summary_stats <- ohd_data %>%
group_by(context) %>%
summarise(
n = n(),
mean_rim = mean(hydration_rim),
sd_rim = sd(hydration_rim),
mean_date = mean(date_ad),
sd_date = sd(date_ad),
.groups = "drop"
)
kable(summary_stats,
caption = "Summary statistics by archaeological context",
digits = 2) %>%
kable_styling(bootstrap_options = c("striped", "hover"))| context | n | mean_rim | sd_rim | mean_date | sd_date |
|---|---|---|---|---|---|
| Buried | 25 | 1.47 | 0.29 | 1527.68 | 171.62 |
| Surface | 39 | 1.45 | 0.28 | 1525.54 | 158.43 |