Learn R Programming

rice (version 2.2.0)

map.dates: A map of 180k archaeological C-14 dates

Description

Produce an interactive, browseable map of the c. 180k (!) archaeological radiocarbon dates provided by the p3k14c R package.

Usage

map.dates(
  S = 48,
  W = -15,
  N = 62,
  E = 5,
  download = FALSE,
  rainbow = FALSE,
  mincol = "yellow",
  maxcol = "red",
  size = 1.5,
  legend.loc = "topright"
)

Value

An interactive, browseable map returning all radiocarbon dates (age and Lab ID) in the p3k14c database.

Arguments

S

The southern limit of the initial map.

W

The western limit of the initial map.

N

The northern limit of the initial map.

E

The eastern limit of initial map.

download

Whether or not to try to download the p13k14c data. If set to FALSE (default option) and if the p3k14c package is not installed, instructions to do so are provided. If TRUE and p3k14c is not installed, the relevant file will be downloaded from `www.p3k14c.org`. Note: it weighs around 26 MB (c. 4 MB zipped).

rainbow

Whether or not to use a rainbow scale to plot the variable.

mincol

Colour for minimum values. Defaults to 'yellow'.

maxcol

Colour for maximum values. Defaults to 'red'.

size

Size of the symbols. Defaults to 1.5.

legend.loc

Location of the legend. Defaults to the top right. ## Not run: alldates <- map.dates()

Details

The p3k14c R package is not on CRAN but is available on github ("people3k/p3k14c"). See 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. https://doi.org/10.5281/zenodo.6633635. The p3k14c data has been provided under a CC-0 license. 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 You are recommended to have a look at the github instructions for the p3k14c package. The `map.dates` function is provided here for an initial visual analysis of the data; p3k14c provides functions to get much more out of the data. Plotting requires the 'leaflet' R package to be installed. An error will occur if it isn't. If your version of R is below 4.0.0 (released back in April 2020), you're prompted to install a more recent version.