Note
Not much HTML code produced, on purpose. Execute the R code chunks interactively inside the R console. This will create lots of PDF files.

XRF Data

Dead Sea Deep Drilling Project (DSDDP) - Sites

Offshore Sites 1, Holes A-E, and Site 3, Hole 3C are close together. Site 2 is at the shore.

ICDP Poject from 2012. Data from Source: https://data.icdp-online.org/sites/deadsea/internal/5017_DSDDP-ALL.xlsx

For some more visual analysis, see deadsea-xrfdata–load-from-RData–plot–histograms.Rmd in this directory.

Preprocessing

  • Import some helper functions.

  • Read in infile (precalculated by another script)

  • Import .RData file /home/knb/code/svn/eclipse43_jee/R_xrfdata/data/deadsea-dsdp--xrf-data-icdp.20171213.RData containing the data, but only if necessary. May take a few minutes.

  • Extract common features of all plots in this file into this function.

Smoothing

  • Smoothen the lines by applying a window function with this width: 20.

The smoothing happens in the big for-loop below, in the roll_mean() call.

Element Classification after V.M. Goldschmidt

  • Get list of elements measured, assign classification label
Element Class Elements in Dataset
Atmophile Ar-Br-Cl
Chalcophile As-Cd-Cu-Pb-Pd-S-Sb-Sn-Zn
Lithophile Al-Ba-Ca-Mg-Rb-Si-Sr-Ta-Th-Ti-U-V-Zr
Siderophile Co-Fe-K-Mn-Ni-P

All Sites, Borehole Depths and Number of Sections

SITE HOLE from to num_sections
1 A 2.1 m 456.7 m 309
1 B 2.1 m 15.5 m 3
1 C 0 m 32.7 m 14
1 D 4.3 m 4.6 m 1
1 E 0.2 m 23.9 m 15
1 H 0 m 39.9 m 32
2 A 12.4 m 23.6 m 6
3 A 5.6 m 5.7 m 1
3 B 23.5 m 29.7 m 2
3 C 49.6 m 344.2 m 95

Generate PDF plots for Sites 1, 2 and 3

A big loop extracts all data from the big xrf_elem_kcps dataframe, and generates a lot of lineplots. It saves the lineplots to pdf files in the data subdirectory.

  • Write RGB values out to files. (Code not shown)

(Unfinished business, see related file deadsea-xrfdata-RGB-load-from-Rdsfile.Rmd in this project)