Machine Learning and Mapping for Spatial Epidemiology
Compute Moran's I & LISA, classify clusters
Get RMSE/MAE/R² metrics on training data
Declare known global variables to suppress R CMD check NOTE Global var...
Join spatial and incidence datasets
Load incidence data from Excel
Load shapefile as sf + optionally convert to sp
Examples for model evaluation functions
Arrange Multiple tmap Plots in a Grid
Plot observed vs predicted values with correlation
Build a tmap for a single variable
Train Random Forest model
Train Support Vector Regression (SVR) model
Train XGBoost model
Provides tools for the integration, visualisation, and modelling of spatial epidemiological data using the method described in Azeez, A., & Noel, C. (2025). 'Predictive Modelling and Spatial Distribution of Pancreatic Cancer in Africa Using Machine Learning-Based Spatial Model' <doi:10.5281/zenodo.16529986> and <doi:10.5281/zenodo.16529016>. It facilitates the analysis of geographic health data by combining modern spatial mapping tools with advanced machine learning (ML) algorithms. 'mlspatial' enables users to import and pre-process shapefile and associated demographic or disease incidence data, generate richly annotated thematic maps, and apply predictive models, including Random Forest, 'XGBoost', and Support Vector Regression, to identify spatial patterns and risk factors. It is suited for spatial epidemiologists, public health researchers, and GIS analysts aiming to uncover hidden geographic patterns in health-related outcomes and inform evidence-based interventions.