Sovereign 8s.is mirror of standardgalactic/global_mapping_pH_and_alkalinity
  • R 91.6%
  • JavaScript 8.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-12 10:54:01 +01:00
.Rhistory Final version of the files 2025-11-14 10:17:39 +01:00
Alkalinity-pH_upscaling_RFmodels_code.R update 2025-12-09 14:52:13 +01:00
GlobalSurfaceWater_sub-basins_GEE_code.js initial files 2025-09-29 11:03:14 +02:00
KNNDistances_Envi_and_Geo_function.R update 2025-12-09 14:52:13 +01:00
README.md Update publication in README.md 2026-03-12 10:54:01 +01:00

Global basin-scale mapping of pH and alkalinity in inland waters

Description

This repository contains the scripts used to generate the pH and alkalinity upscaling published in [Batalla et al., 2026].

Includes a data extraction using Google Earth Engine (GEE) and subsequent R analyses and processing for generating the pH and alkalinity models.

To run the code you must download the files provided in Zenodo (https://doi.org/10.5281/zenodo.15591825) and the Global BasinATLAS level 12 from HydroATLAS v1 (https://www.hydrosheds.org/hydroatlas)

Folder contents

  • Alkalinity-pH_upscaling_RFmodels_code.R – Main script to generate the basin-scale random forest models for predicting pH and alkalinity in inland waters
  • KNNDistances_Envi_and_Geo_function.R – Function that calculates environmental differentiation and, optionally, their corresponding geographical distances, to the training dataset. It is sourced and used within the main script. The script must be saved in the working directory or provide the full file path when using source().
  • GlobalSurfaceWater_sub-basins_GEE_code.js – Google Earth Engine script to intersect HydroBASINS v1 sub-basin level 12 with the maximum extent layer from the Global Surface Water (GSW) dataset. It generates the information provided in the 'worldwide_predicted_pH_and_alkalinity_at_HydroBasins_HYBASID.csv' file regarding the presence or absence of surface water in the basins. When basins are located above 78ºN, information from the Global Lakes and Wetlands Database in the BasinATLAS is used.

References

  • [Batalla M, Martínez-Artero J, Catalan J. (2026). Global basin-scale mapping of pH and alkalinity in inland waters. Scientific Data. https://doi.org/10.1038/s41597-026-07028-2 ]

  • Data available to run the model: [Catalan, J., Batalla, M., & Martínez-Artero, J. (2025). PHALK - A global dataset of estimated pH and alkalinity in inland waters at basin-scale (version 1.0.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.15591825]

Contact