An open API service indexing awesome lists of open source software.

https://github.com/benmarwick/bayesinfmatcultphylo

Research compendium for our paper "Bayesian inference of material culture phylogenies using continuous traits from the archaeological record: A birth–death model for Late Neolithic/Early Bronze Age arrowheads from Northwestern Europe"
https://github.com/benmarwick/bayesinfmatcultphylo

archaeology phylogenetics research-compendium

Last synced: 7 months ago
JSON representation

Research compendium for our paper "Bayesian inference of material culture phylogenies using continuous traits from the archaeological record: A birth–death model for Late Neolithic/Early Bronze Age arrowheads from Northwestern Europe"

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
# Please put your title here to include it in the file below.
Title <- "Bayesian inference of material culture phylogenies using continuous traits from the archaeological record"
```

# Bayesian inference of material culture phylogenies using continuous traits: A birth–death model for Late Neolithic/Early Bronze Age arrowheads from Northwestern Europe

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/benmarwick/bayesinfmatcultphylo/master?urlpath=rstudio)

This repository contains the data and code for our paper:

> Ben Marwick [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0001-7879-4531 ), David N. Matzig [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0001-7349-5401) , Felix Riede [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-4879-7157), (2023). _`r Title`_.

Our pre-print is online here:

> Ben Marwick [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0001-7879-4531 ), David N. Matzig [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0001-7349-5401) , Felix Riede [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-4879-7157), (2023). _`r Title`_. SocArXiv, Accessed `r format(Sys.Date(), "%d %b %Y")`. Online at

### How to cite

Please cite this compendium as:

> Ben Marwick [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0001-7879-4531 ), David N. Matzig [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0001-7349-5401) , Felix Riede [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-4879-7157), (`r format(Sys.Date(), "%Y")`). _Compendium of R code and data for `r Title`_. Accessed `r format(Sys.Date(), "%d %b %Y")`. Online at

## Contents

The **analysis** directory contains:

- [:file\_folder: paper](/analysis/paper): Quarto source document
for manuscript. Includes code to reproduce the figures and tables
generated by the analysis. It also has a rendered version,
`paper.docx`, suitable for reading (the code is replaced by figures
and tables in this file)
- [:file\_folder: data](/analysis/data): Data used in the analysis.
- [:file\_folder: figures](/analysis/figures): Plots and other
illustrations

## How to run in your browser or download and run locally

This research compendium has been developed using the statistical programming
language R. To work with the compendium, you will need
installed on your computer the [R software](https://cloud.r-project.org/)
itself and optionally [RStudio Desktop](https://rstudio.com/products/rstudio/download/).

You can download the compendium as a zip from from this URL:
[master.zip](https://github.com/benmarwick/bayesinfmatcultphylo/archive/master.zip). After unzipping:
- open the `.Rproj` file in RStudio.
- run `renv::restore` to ensure you have the packages this analysis depends on (also listed in the [DESCRIPTION](/DESCRIPTION) file).
- to re-run the code that performs the data analysis and creates the visualisations, look in the `scripts` folder and run the R and Rev script files in order. The file names contain numbers that indicate the correct order (eg. 001, 002, etc.). You will need to install [RevBayes](https://revbayes.github.io/) to run some of these files.
- The data analysis took about 10 hours on my Macbook Pro 2.3 GHz Core i7 with 16 Gb RAM. The full output files were too large to commit to GitHub, and so are stored on [OSF](https://osf.io/rbqa5/). If you want to skip running the entire analysis, especially the time-consuming MCMC runs, you can find the analysis output at https://osf.io/rbqa5/ in a folder called `revbayes-output`, and use that to run some of the later steps
- finally, open `analysis/paper/paper.qmd` and render to produce the `paper.docx`, or run `quarto::quarto_render("analysis/paper/paper.qmd")` in the R console. Note that this file does not run any analysis code, it only combines the previously generated figures with the text of the manuscript to generate the manuscript.

### Licenses

**Text and figures :** [CC-BY-4.0](http://creativecommons.org/licenses/by/4.0/)

**Code :** See the [DESCRIPTION](DESCRIPTION) file

**Data :** [CC-0](http://creativecommons.org/publicdomain/zero/1.0/) attribution requested in reuse

### Contributions

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