Code package for:
A spatially validated ensemble species distribution modelling framework for multi-species medicinal plant suitability assessment in Malaysia

Overview
This folder contains the core code used in the study. The workflow includes data collection, preprocessing, feature engineering, presence–background construction, spatial block cross-validation, model fitting, performance-weighted ensembling, and SHAP-based interpretation.

Files
1. 01_data_collection.py
   Collects occurrence records and matches environmental variables.

2. 02_data_cleaning_feature_engineering.py
   Performs data cleaning, preprocessing, filtering, and feature engineering.

3. 03_sdm_pipeline.py
   Implements presence–background construction, spatial block cross-validation, model fitting, model evaluation, ensemble prediction, and SHAP analysis.

4. requirements.txt
   Lists the main Python packages used in the analysis.

5. data_description.txt
   Describes the input data used in the workflow.

6. output_description.txt
   Describes the main outputs generated by the code.

Notes
These scripts are provided as the core code package used for the study. Some file paths may need to be adjusted depending on the local environment. The cleaned occurrence–environment dataset used in the study is archived separately in Zenodo.
