GitHunt
DK

dkondor/hs_analysis

hs_analysis

Scripts and data for the preprint article:

Peter Turchin, Jennifer Larson, Harvey Whitehouse, Kathryn Bard, Jenny Reddish, Matilda Peruzzo, James S. Bennett, Dániel Kondor, Daniel Hoyer, Pieter François (2025):

The Rise and Fall of Human Sacrifice: A Quantitative Analysis of Evidence from World History

OSF preprint, available at: https://osf.io/ve26m

Data and requirements

The scripts are written in R and use the following libraries:

ggplot2 (3.4.4)
ggpubr (0.6.0)
tidyverse (2.0.0)
readxl (1.4.3)

The analysis was run under R version 4.3.3 with the versions of packages given in parentheses; however, it is expected to run and produce the same results on any reasonable recent version of R and the required packages.

It is recommended to run the scripts in an interactive environment (e.g. RStudio) where results can be inspected.

The following datasets were used:

  • Seshat Equinox 2020 data release. Available at https://seshat-db.com/downloads_page/ and included here as Equinox2020.05.2023.xlsx
  • Human sacrifice dataset. Available as the SI of the preprint and included here as human_sacrifice 30 May 2024.csv
  • Variable descriptions, created manually from the Equinox release, and included here as preprocessing_updated/variables.csv

All data is available under the Creative Commons Attribution Non-Commercial Share-Alike (CC BY-NC-SA) license, see: https://creativecommons.org/licenses/by-nc-sa/4.0/

If using the data, please cite the above preprint and the following previous publications by the Seshat team:

Benam, M. et al. (2022). Seshat Data: Equinox Packaged Data (1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.6642229

Turchin P. et al. 2015. Seshat: The Global History Databank. Cliodynamics 6(1):77–107. https://doi.org/10.21237/C7clio6127917

Turchin P. et al. 2017. Quantitative historical analysis uncovers a single dimension of complexity that structures global variation in human social organization. PNAS. http://www.pnas.org/content/early/2017/12/20/1708800115.full

Running the scripts

The preprocessing_updated folder contains three scripts that perform necessary preprocessing on the Equinox dataset before the main analysis. The output of this is already included in this repository, so it is not necessary to rerun them, however, they are included for completeness and reproducibility. The three scripts should be run in the order indicated by the numeric index in their file names. The scripts should be run with the working directory set to the preprocessing_updated subfolder (the setwd() call at the beginning of the scripts should be adjusted accordingly. These scripts will generate the following files:

preprocessing_updated/polity_duration.csv
preprocessing_updated/TSDat123.csv
TableData.Rdata

The main analysis is in the HS_analysis_new_uniq.R, which should be run from the repository's main directory as its working directory (adjust the setwd() call accordingly at the beginning). This will produce AggrDat_20250814.Rdata with the results of some intermediate processing (included here as well) and the figures included in our preprint under the paper_figs_20250814/ folder. Regression results are displayed inline.

Languages

R100.0%

Contributors

Created December 6, 2025
Updated December 12, 2025
dkondor/hs_analysis | GitHunt