Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser for databases hosted on IntChron platform via rintchron #147

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Suggests:
plyr,
readxl,
rgeos,
rintchron,
rmarkdown,
rnaturalearth,
rworldmap,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export(get_db_version)
export(get_emedyd)
export(get_eubar)
export(get_euroevol)
export(get_intchron)
export(get_irdd)
export(get_jomon)
export(get_katsianis)
Expand Down
4 changes: 3 additions & 1 deletion R/get_c14data.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ get_all_parser_functions <- function() {
"katsianis" = c14bazAAR::get_katsianis,
"nerd" = c14bazAAR::get_nerd,
"bda" = c14bazAAR::get_bda,
"rxpand" = c14bazAAR::get_rxpand
"rxpand" = c14bazAAR::get_rxpand,
"sadb" = c14bazAAR::get_intchron,
"egyptdb" = c14bazAAR::get_intchron
))
}

Expand Down
44 changes: 44 additions & 0 deletions R/get_intchron.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#' @rdname db_getter_backend
#' @export

#library(rintchron)

get_intchron <- function(db_name){

# DATABASES:
# sadb: works
# - also has: subperiod
# egyptdb: works
# - also has: dynasty, reign
# intimate: errors
# nrcf: errors
# oxa: errors
#
# sadb <- rintchron::intchron("sadb")
# egyptdb <- rintchron::intchron("egyptdb")
# setdiff(names(egyptdb), names(sadb))

intchron <- rintchron::intchron(c(db_name)) %>%
dplyr::transmute(
method =,
labnr = .data[["labcode"]],
c14age = .data[["r_date"]],
c14std = .data[["r_date_sigma"]],
c13val = .data[["d13C"]],
site = .data[["site"]],
feature = .data[["context"]],
period = .data[["period"]],
#culture = .data[["subperiod"]],
material = .data[["material"]],
species = .data[["species"]],
region = .data[["region"]],
country = .data[["country"]],
lat = .data[["latitude"]],
lon = .data[["longitude"]],
shortref = .data[["refs"]]
) %>%
as.c14_date_list()

return(intchron)
}

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ To suggest other archives to be queried you can join the discussion [here](https
* [`get_c14data("calpal")`](R/get_calpal.R) [**calpal**](https://uni-koeln.academia.edu/BernhardWeninger/CalPal): Radiocarbon Database of the CalPal software package by Bernhard Weninger. See [nevrome/CalPal-Database](https://github.com/nevrome/CalPal-Database) for an interface.
* [`get_c14data("caribbean")`](R/get_caribbean.R) [**caribbean**](https://github.com/philriris/caribbean-14C/): A compilation of 2147 anthropogenic radiocarbon (14C) dates for the Caribbean region from 504 sites across 57 islands by **Phil Riris** (2021).
* [`get_c14data("context")`](R/get_context.R) [**context**](http://context-database.uni-koeln.de/): Collection of radiocarbon dates from sites in the Near East and neighboring regions (20.000 - 5.000 calBC) by Utz Böhner and Daniel Schyle.
* [`get_c14data("egyptdb")`](R/get_intchron.R) [**egyptdb**](https://github.com/jgregoriods/rxpand): Egyptian Radiocarbon Database hosted by ORAU.
* [`get_c14data("eubar")`](R/get_eubar.R) [**eubar**](https://telearchaeology.org/eubar-c14-database/): A database of 14C measurements for the European Bronze Age by [Gacomo Capuzzo](https://telearchaeology.org/EUBAR/).
* [`get_c14data("euroevol")`](R/get_euroevol.R) [**euroevol**](https://discovery.ucl.ac.uk/1469811/): Cultural Evolution of Neolithic Europe Dataset by [Katie Manning, Sue Colledge, Enrico Crema, Stephen Shennan and Adrian Timpson](https://openarchaeologydata.metajnl.com/articles/10.5334/joad.40/).
* [`get_c14data("irdd")`](R/get_irdd.R) [**irdd**](https://sites.google.com/site/chapplearchaeology/irish-radiocarbon-dendrochronological-dates): [Robert M Chapple](https://doi.org/10.5281/zenodo.3367518)'s Catalogue of Radiocarbon Determinations & Dendrochronology Dates is a free-to-download resource for Irish archaeology.
Expand All @@ -173,6 +174,7 @@ To suggest other archives to be queried you can join the discussion [here](https
* [`get_c14data("radon")`](R/get_radon.R) [**radon**](https://radon.ufg.uni-kiel.de/): Central European and Scandinavian database of 14C dates for the Neolithic and Early Bronze Age by [Dirk Raetzel-Fabian, Martin Furholt, Martin Hinz, Johannes Müller, Christoph Rinne, Karl-Göran Sjögren und Hans-Peter Wotzka](https://www.jna.uni-kiel.de/index.php/jna/article/view/65).
* [`get_c14data("radonb")`](R/get_radonb.R) [**radonb**](https://radon-b.ufg.uni-kiel.de/): Database for European 14C dates for the Bronze and Early Iron Age by Jutta Kneisel, Martin Hinz, Christoph Rinne.
* [`get_c14data("rxpand")`](R/get_rxpand.R) [**rxpand**](https://github.com/jgregoriods/rxpand): Radiocarbon dates for the spread of farming and ceramics in tropical South America by **Jonas Gregorio de Souza**.
* [`get_c14data("sadb")`](R/get_intchron.R) [**sadb**](https://github.com/jgregoriods/rxpand): An archaeological radiocarbon database for southern Africa by [Emma Loftus, Peter J. Mitchell & Christopher Bronk Ramsey](https://www.cambridge.org/core/journals/antiquity/article/abs/an-archaeological-radiocarbon-database-for-southern-africa/26FE99E995C4507015704D552CB0C196) and hosted by ORAU.

### Contributing

Expand Down
2 changes: 2 additions & 0 deletions data-raw/db_info_table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ rxpand,2020-10-20,1,https://raw.githubusercontent.com/jgregoriods/rxpand/master/
agrichange,2021-05-21,1,https://zenodo.org/record/4541470/files/AgriChange_14Cdatabase.xlsx
caribbean,2021-05-21,1,https://raw.githubusercontent.com/philriris/caribbean-14C/main/data/caribbean_14C.csv
aida,today,1,https://raw.githubusercontent.com/apalmisano82/AIDA/main/dates.csv
sadb,2021-09-06,1,sadb
egyptdb,2021-09-06,1,egyptdb
Binary file modified data/db_info_table.rda
Binary file not shown.
7 changes: 5 additions & 2 deletions man/db_getter_backend.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.