BACONQUAKE

Run a Bacon age–depth model on radiocarbon dates, then overlay seismites, candidate earthquakes and a lake-level curve — runs entirely in your browser.

About this tool The age–depth model is computed by the unmodified rbacon R package (Blaauw & Christen, 2011), run in your browser through webR (R compiled to WebAssembly). The earthquake overlay is the BACONQUAKE plotting script by Jefferson Williams. The first run in a tab downloads R and the rbacon package, which takes a little while (about 15 seconds in testing, depending on your connection); later runs in the same tab skip this step. Runs fully client-side — no data leaves your browser.

Seismite intensity method

1. Load input files

InputLoaded fileContents

2. Bacon settings

3. Run

Re-plot redraws the BACONQUAKE figure from the age–depth model already computed in this tab, using the current overlay files (quakes, seismites, picks, lake levels, plot control). Use it after editing picks or plot settings — it does not need a new Bacon run.
How it works

Bacon divides a sediment sequence into sections of equal thickness and estimates an accumulation rate for each one, with a gamma prior on the rates and a beta prior on the memory (how similar the rate of one section is to the next). Radiocarbon dates are calibrated within the model, and the resulting Markov chain Monte Carlo run gives a distribution of age–depth curves rather than a single line (Blaauw and Christen, 2011).

This page runs the same rbacon package used on the desktop, unchanged, via webR. The rbacon build for the browser comes from the package author's own R-universe repository. Bacon is run with BCAD=FALSE (cal BP); the BACONQUAKE figure then redraws the model in BC/AD with agedepth(BCAD=TRUE).

The BACONQUAKE overlay adds the candidate earthquakes as vertical lines whose colour, line type and width follow the estimated local intensity; the age–depth pick for each seismite (open circles, with red points for picks assigned to a named earthquake); a sediment column showing seismite depths and types; and a lake-level curve in a lower panel.

Changes from the desktop script: files are read from the page rather than from a fixed folder; minor axis ticks are drawn with base R instead of the Hmisc package; and the agedepth() call adds rev.age and rev.d (rbacon 4 orients rotated axes the opposite way to earlier versions), turns off raster drawing of the grey model shading, and hides the rbacon version note, so that the figure keeps its original layout.

MCMC runs differ slightly from run to run unless a random seed is set, so a browser run will not reproduce a desktop figure pixel for pixel.

Input file format guide

All files are comma-separated text. Column order matters for every file except the dates file, which follows Bacon's own format.

Radiocarbon dates (Bacon core file)
Columns: lab ID, 14C age, error, depth (cm), and optionally a calibration curve number. Bacon reads the first line as column headings, so start the file with a header line such as labID,age,error,depth. If the first line holds a date instead, Bacon will not use that date.
All possible quakes
Columns: Date (BC/AD, negative = BC), Label (text shown above the line), Intensity (5–12, estimated local intensity; controls colour, line type and width).
Seismite depths
Columns: SeismiteTops (cm), Thicknesses (cm), SeismiteType (0 grey, 1 light blue, 2 green, 3 orange, 4 red).
Picks
Columns: SeismiteTops (cm), AgeBCAD (picked age), QuakeLabels. Rows with a label are drawn in red and labelled beside the sediment column; rows with an empty label are drawn as open circles only. Each row must have exactly three fields.
Lake-level curve
Columns: AgeBCAD, Elevation (m below sea level).
Plot control file
Columns: Label, Value, Description, with thirteen rows read by position: Margin, LeftX (youngest age, left edge), RightX (oldest age, right edge), ElevBuffer, TopZ, BotZ, FigSizeTop, FigSizeBot, W_plot, H_plot, SedColumnLeftX (where the sediment column starts, in age units), CexSizePickLabel, CexSizePossQuake.