Code for geochemical index calculation and data visualisation for the article "The kaolinite shuttle links the Great Oxidation and Lomagundi events" by Weiduo Hao, Kaarel Mänd, Yuhao Li, Daniel S. Alessi, Peeter Somelar, Mathieu Moussavou, Alexander E. Romashkin, Aivo Lepland, Kalle Kirsimäe, Noah J. Planavsky, and Kurt O. Konhauser, published in Nature Communications.
This is used to generate Figures 1 in the main manuscript and Figures S1, S4, S5, and S6 in the Supplementary Information file.
Further data analysis and visualisation (not in this repository) involved Microsoft Excel and Inkscape software suites.
The data is read in from the Microsoft Excel spreadsheet input_data/input_paleosols.xlsx
, which contains paleosol data separated on different sheets per source reference, but using a semi-unified table structure.
The ipython notebook paleosol_unify.ipynb
then applies pandas, pyrolite, and mendeleev to stitch the data into a single table with homogenised units, saved as the spreadsheet unified_paleosols.xlsx
.
For chemical indices, instead of saving only the calculated number, the cells are filled with Excel formulae referencing the stitched data to enable vetting by non-python-users.
This is done with the openpyxl package.
Data visualisation happens in the paleosol_visualise.ipybn
notebook, referencing the unified_paleosols.xlsx
spreadsheet.
Importantly, prior to running the paleosol_visualise.ipybn
notebook, the .xlsx file will need to be opened and saved once in Microsoft Excel or Libreoffice Calc, in order that the formulae be evaluated and the results accessible to pandas.
Visualisation employs the matplotlib, seaborn, and python-ternary packages and the figures are saved as 350-dpi .png files in the figures
folder.
Shale mineralogical data is collected from spreadsheets input_data/franceville_xrd.csv
and input_data/onega_xrd.xlsx
with pandas, then visualised using matplotlib in the lithosection_visualise.ipynb
notebook.
Both lithological columns and legend are present in the franceville_litho.png
, onega_litho.png
, and litho_legend.png
files, respectively.
Visualisation of kaolinite titration data in the titration_visualise.ipynb
notebook works off of the titration_ca-cb.csv
and titration_logK.csv
files in the input_data
folder with the help of pandas and matplotlib.