Skip to content

people3k/p3k14c

Repository files navigation

Official R package for p3k14c

Binder

This is the official R package for the p3k14c global archaeological radiocarbon database! This package streamlines accessing the data in R, and allows easy reproduction of the quality analysis and data validation from the Scientific Data publication.

Run in your browser

The simplest way to use this package to explore p3k14c and supporting code is to click on binder to open an instance of RStudio in your browser, which will have the compendium files all ready to work with!

Binder uses rocker-project.org Docker images to ensure a consistent and reproducible computational environment. These Docker images can also be used locally.

Installation

Via GitHub (recommended)

You can install the most recent release of p3k14c (version 2022.06) from Github with:

# install.packages("remotes")
remotes::install_github("people3k/p3k14c@2022.06")

Manually

You can download the compendium as a zip from from this URL: main.zip. After unzipping, open the Proj file in RStudio, and run devtools::install() to ensure you have the packages this analysis depends on (also listed in the DESCRIPTION file). Then open p3k14c.Rmd and knit to produce the paper in PDF format.

Accessing the p3k14c dataset

Once the p3k14c package is installed, you can access the data via R:

library(p3k14c)
p3k14c::p3k14c_data

Repository contents

The 📁 vignettes/articles directory contains:

  • 📄 p3k14c: R Markdown source document for the manuscript. Includes code to reproduce the figures and tables generated by the analysis. It also has a rendered version, p3k14c.html, suitable for reading (the code is replaced by figures and tables in this file).
  • 📁 figures: Plots and other illustrations
  • 📁 tables: Tables included in the paper

Executable research compendium

To reproduce the quality analysis and data validation from the Scientific Data publication, you are required to have a copy of the raw p3k14c dataset, available through tDAR at https://doi.org/10.48512/XCV8459173. Clone this repository, then place the p3k14c_raw.csv at ../p3k14c-data/p3k14c_raw.csv, relative to the working director of the cloned repository.

You can do so thus:

git clone https://github.com/people3k/p3k14c
cd p3k14c

You can compile the research compendium through the terminal:

R -e "rmarkdown::render('vignettes/articles/p3k14c.Rmd', output_dir = 'vignettes/articles')"

or, within R itself:

rmarkdown::render('vignettes/articles/p3k14c.Rmd', output_dir = 'vignettes/articles')

How to cite

If you use this compendium in your work, please cite both the package as well as the p3k14c publication:

Bocinsky, R. Kyle, Darcy Bird, Lux Miranda, and Jacob Freeman, (2022.6). Compendium of R code and data for p3k14c: A synthetic global database of archaeological radiocarbon dates. Accessed [TODAY'S DATE]. https://doi.org/10.5281/zenodo.6633635

Bird, D., Miranda, L., Vander Linden, M. et al. p3k14c, a synthetic global database of archaeological radiocarbon dates. Sci Data 9, 27 (2022). https://doi.org/10.1038/s41597-022-01118-7

Licenses

Text and figures : CC-BY-4.0

Code : GNU GPLv3

Data : CC-0 attribution requested in reuse

Contributions

We welcome contributions from everyone. Before you get started, please see our contributor guidelines. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Acknowledgements

This compendium was created using the rrtools package by Ben Marwick, which is ✨ pure magic ✨ for doing reproducible research.

Code of Conduct

Please note that the p3k14c project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.