Package: eeSDM
eeSDM: Google Earth Engine-based SDMeeSDMis a Python package designed for conducting species distribution modeling(SDM) using Google Earth Engine. This package provides researchers in ecology, environmental science, and data science with an efficient toolset to explore and predict the relationship between species distribution and environmental factors.FeaturesPreprocessing of GBIF Occurrence Data (e.g., heatmap plotting, duplicate removal)Multicollinearity Removal for Environmental Variables (VIF)Generation of Pseudo-Absence Data (Full extent, spatial constraints, and environmental profiling)Spatial Grid GenerationSDM SDM fitting and predictionCompute Variable Importance scores and visualizationAccuracy assessment (e.g., EUC-ROC, EUC-PR, Sensitivity, Specificity) and Curve PlottingPotential Distribution Plotting using Optimal ThresholdsInstallationTo install theeeSDMpackage, you can use the following pip command:pipinstalleeSDMUsageHere's a simple example of how to use the geokakao package:importeeSDM# Plot Yearly & Monthly data distributioneeSDM.plot_data_distribution(gdf)# Plot heatmapeeSDM.plot_heatmap(gdf)# Apply the function to the raw data with the specified GrainSizeData=eeSDM.remove_duplicates(data_raw,GrainSize)# Perform filtering using VIF (Variance Inflation Factor)# Apply the function to remove variables with high multicollinearity# Obtain the list of remaining column names after VIF-based filteringfiltered_PixelVals_df,bands=eeSDM.filter_variables_by_vif(PixelVals_df)# Plot correlation heatmapeeSDM.plot_correlation_heatmap(filtered_PixelVals_df,h_size=6)# Generate Random Pseudo-Absence Data in the Entire Area of InterestAreaForPA=eeSDM.generate_pa_full_area(Data,GrainSize,AOI)# Generate Spatially Constrained Pseudo-Absence Data (Presence Buffer)AreaForPA=eeSDM.generate_pa_spatial_constraint(Data,GrainSize,AOI)# Generate Environmental Pseudo-Absence Data (Environmental Profiling)AreaForPA=eeSDM.generate_pa_environmental_profiling(Data,GrainSize,AOI,predictors)# Create a grid of polygons over a specified geometryGrid=eeSDM.createGrid(AOI,scale=50000)# Fit SDMresults=eeSDM.batchSDM(Grid,Data,AreaForPA,GrainSize,bands,predictors,numiter,split=0.7,seed=None)# Plot Average Variable ImportanceeeSDM.plot_avg_variable_importance(results,numiter)# Calculate AUC-ROC and AUC-PReeSDM.calculate_and_print_auc_metrics(images,TestingDatasets,GrainSize,numiter)# Calculate Sensitivity and SpecificityeeSDM.calculate_and_print_ss_metrics(images,TestingDatasets,GrainSize,numiter)# Plot ROC and PR curveseeSDM.plot_roc_pr_curves(images,TestingDatasets,GrainSize,numiter)# Potential Distribution Map using the optimal thresholdDistributionMap2=eeSDM.create_DistributionMap2(images,TestingDatasets,GrainSize,numiter,ModelAverage)Case Study 1: Habitat Suitability and Potential Distribution Modeling of Fairy Pitta (Pitta nympha) Using Presence-Only DataReferencesThe content of this packges presents a conversion and enhancement of JavaScript source code provided by researchers from the Smithsonian Conservation Biology Institute. The original JavaScript code has been translated and refined into Python to achieve the same objectives.Crego, R. D., Stabach, J. A., & Connette, G. (2022). Implementation of species distribution models in Google Earth Engine.Diversity and Distributions, 28, 904–916.DOISmithsonian SDMinGEE GitHub Repository