Bivariate Mapping of Rainfall, Groundwater Level, and Landcover
Description
Bivariate Mapping of Rainfall, Groundwater Level, and Landcover: This dataset contains a complete, reproducible workflow for spatial, bivariate analysis of rainfall, groundwater level, and landcover at the regional scale. All source code (R scripts) is organized for clarity, rigour, and cross-platform use following open science best practices. Raster datasets (GeoTIFFs), output maps, and derived tables are included, along with a README.md, LICENSE, and package-locked environment via renv for transparency. Key features: 1. Bivariate mapping of rainfall and groundwater using the biscale approach. 2. Landcover–groundwater relationships, including custom categorical–continuous legends. 3. All R code is well-commented, modular, and ready for use in teaching or derivative studies. 4. Scripted workflow ensures figures are fully reproducible from raw inputs. 5. Includes helper functions and robust error-handling for flexible adaptation. 6. Supplemented with detailed README and session information for review and provenance. Typical applications: Hydrological assessment, aquifer mapping, GIS education, reproducible environmental research.
Files
Steps to reproduce
Step 1. Download the full dataset (including folders, code, and data files). Step 2. Install R (version 4.3 or newer recommended). Step 3. Install the renv package in R: r install.packages("renv") Step 4. In R, set your working directory to the root of the downloaded project and run: r renv::restore() This will install all required packages as used in the analysis. Step 5. To reproduce the analysis, in R, run: r source("R/01_setup_environment.R") All output figures and summary tables will be written to the /outputs/ directory. Root folder Structure: bivariate-groundwater/ │ ├── data/ # GeoTIFFs and any external rasters │ ├── rainfall_resampled.tif │ ├── groundwater_level_resampled.tif │ └── landcover_resampled.tif │ ├── R/ # All R code │ ├── 01_setup_environment.R │ ├── 02_raster_alignment.R │ ├── 03_bivariate_rain_gw.R │ ├── 04_landcover_gw.R │ └── _helpers.R │ ├── renv.lock # Auto-generated by renv::snapshot() ├── README.md # Human-readable methods, variables, and licences ├── outputs/ │ ├── groundwater_rain_bivariate_map.png │ ├── bivariate_summary_table_gt.png │ ├── landcover_groundwater_bivariate_map.png │ └── landcover_groundwater_summary_table_gt.png ├── LICENSE.txt # CC-BY or similar, matching Mendeley Data terms[30] └── sessionInfo.txt # Written automatically at the end of each run Key Details for Each Script and File 01_setup_environment.R: Activates renv, loads/checks all required R packages, sets up file paths using variables, initiates logging to log.txt, and sources other scripts. 02_raster_alignment.R: Checks input presence, loads all rasters, aligns projections (bilinear for continuous, nearest-neighbour for categorical), and saves aligned_rasters.RData for later scripts. 03_bivariate_rain_gw.R: Performs bivariate quantile classification (using biscale), generates PNG map and two summary tables (gt and gridExtra), with file outputs to outputs/. 04_landcover_gw.R: Performs categorical-continuous mapping between landcover and groundwater, generates PNG map and PNG tables in outputs/. Handles float-value landcover or integer categories robustly. _helpers.R: Reusable R functions for safe raster loading, relabeling, and timestamped plot saving. Call with source("R/_helpers.R") as needed. README.md: Explains the objective, file structure, reproduction steps, expected outputs, licensing, citation, and contributor details. renv.lock: Ensures computational reproducibility of package versions. Generated/updated by renv::snapshot() after successful script runs. LICENSE.txt: MIT license for code and CC-BY-4.0 for data. See README.md for further explanation of variables, file structure, and extension or adaptation options.
Institutions
- Loyola College
- University of Madras