{
  "_id": "6acb826afe5cc25786e91043",
  "Package": "spatialcvR",
  "Title": "Spatial Cross-Validation for Machine Learning",
  "Version": "0.1.0",
  "Authors@R": "person(given = \"Mamadou\",\nfamily = \"SOW\",\nrole = c(\"aut\", \"cre\"),\nemail = \"sowsalim01@gmail.com\")",
  "Description": "Spatial cross-validation and model evaluation for\ngeospatial machine learning applications. Addresses spatial\ndependence in observations by implementing spatial block,\nbuffered, and clustering cross-validation methods. Includes\nspatial leakage detection, model performance metrics, and\nspatial residual diagnostics for assessing model generalization\nacross geographic space. Methods based on Brenning (2012)\n<doi:10.1016/j.cageo.2012.02.001>, Pohjankukka et al. (2017)\n<doi:10.1016/j.isprsjprs.2017.07.001>, and Roberts et al.\n(2017) <doi:10.1111/ecog.02881>.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "VignetteBuilder": "knitr",
  "URL": "https://sowsalim01.github.io/spatialcvR/,\nhttps://github.com/sowsalim01/spatialcvR",
  "BugReports": "https://github.com/sowsalim01/spatialcvR/issues",
  "Config/roxygen2/version": "8.1.0",
  "Config/pak/sysreqs": "libabsl-dev cmake libgdal-dev gdal-bin libgeos-dev\nlibssl-dev libproj-dev libsqlite3-dev libudunits2-dev",
  "Repository": "https://sowsalim01.r-universe.dev",
  "Date/Publication": "2026-09-26 16:48:50 UTC",
  "RemoteUrl": "https://github.com/sowsalim01/spatialcvr",
  "RemoteRef": "HEAD",
  "RemoteSha": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-10-11 12:31:44 UTC",
    "User": "root"
  },
  "Author": "Mamadou SOW [aut, cre]",
  "Maintainer": "Mamadou SOW <sowsalim01@gmail.com>",
  "_user": "sowsalim01",
  "_type": "src",
  "_file": "spatialcvR_0.1.0.tar.gz",
  "_fileid": "https://r2.ropensci.org/54ddbf92e15890fdbf34cb8014a81441daa57f7333bb99c4f78fffafa56b985f",
  "_filesize": 422857,
  "_sha256": "54ddbf92e15890fdbf34cb8014a81441daa57f7333bb99c4f78fffafa56b985f",
  "_expires": "2027-01-19T12:34:48.000Z",
  "_created": "2026-10-11T12:31:44.000Z",
  "_published": "2026-10-11T12:34:50.666Z",
  "_buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 114470637476,
      "time": 126,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11701219759"
    },
    {
      "job": 114470637460,
      "time": 136,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11702304352"
    },
    {
      "job": 114470637527,
      "time": 83,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11702204712"
    },
    {
      "job": 114470637516,
      "time": 114,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11702386202"
    },
    {
      "job": 114469920577,
      "time": 221,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11701723671"
    },
    {
      "job": 114470637428,
      "time": 125,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11702174807"
    },
    {
      "job": 114470637454,
      "time": 88,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11702775282"
    },
    {
      "job": 114470637465,
      "time": 91,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11701334538"
    },
    {
      "job": 114470637559,
      "time": 89,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11702430887"
    }
  ],
  "_upstream": "https://github.com/sowsalim01/spatialcvr",
  "_commit": {
    "id": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
    "author": "sowsalim01 <sowsalim01@gmail.com>",
    "committer": "sowsalim01 <sowsalim01@gmail.com>",
    "message": "desc\n",
    "time": 1790441330
  },
  "_maintainer": {
    "name": "Mamadou SOW",
    "email": "sowsalim01@gmail.com",
    "login": "sowsalim01",
    "description": "Data Scientist & AI Engineer |Machine & Deep Learning (PyTorch) |Data & Big Data |GIS & Geomatics | Remote Sensing & Photogrammetry |Web & Mobile Dev |Map |IoT",
    "uuid": 141906429
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "sf",
      "version": ">= 1.0-0",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "version": ">= 1.0.0",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "version": ">= 3.4.0",
      "role": "Suggests"
    },
    {
      "package": "tidymodels",
      "version": ">= 1.0.0",
      "role": "Suggests"
    },
    {
      "package": "rsample",
      "version": ">= 1.0.0",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "version": ">= 1.40",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "version": ">= 2.14",
      "role": "Suggests"
    },
    {
      "package": "terra",
      "version": ">= 1.5.0",
      "role": "Suggests"
    }
  ],
  "_owner": "sowsalim01",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-37",
      "n": 2
    },
    {
      "week": "2026-38",
      "n": 4
    },
    {
      "week": "2026-39",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 1,
  "_contributors": [
    {
      "user": "sowsalim01",
      "count": 7,
      "uuid": 141906429
    }
  ],
  "_userbio": {
    "uuid": 141906429,
    "type": "user",
    "name": "Mamadou SOW",
    "followers": 1,
    "description": "Data Scientist & AI Engineer |Machine & Deep Learning (PyTorch) |Data & Big Data |GIS & Geomatics | Remote Sensing & Photogrammetry |Web & Mobile Dev |Map |IoT"
  },
  "_downloads": {
    "count": 64,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/spatialcvR"
  },
  "_devurl": "https://github.com/sowsalim01/spatialcvr",
  "_pkgdown": "https://sowsalim01.github.io/spatialcvR/",
  "_searchresults": 0,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/spatialcvR.html",
    "LICENSE"
  ],
  "_homeurl": "https://github.com/sowsalim01/spatialcvr",
  "_realowner": "sowsalim01",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2026-10-07"
    }
  ],
  "_exports": [
    "compare_cv",
    "detect_spatial_leakage",
    "plot_spatial_folds",
    "plot_spatial_residuals",
    "spatial_block_folds",
    "spatial_buffer_folds",
    "spatial_cluster_folds",
    "spatial_distance",
    "spatial_folds",
    "spatial_metrics",
    "spatial_residuals",
    "spatial_split"
  ],
  "_datasets": [
    {
      "name": "sample_spatial_data",
      "title": "Sample Spatial Data for Demonstration",
      "object": "sample_spatial_data",
      "class": [
        "data.frame"
      ],
      "fields": [
        "id",
        "longitude",
        "latitude",
        "variable1",
        "variable2",
        "target"
      ],
      "rows": 200,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "compare_cv",
      "title": "Compare Cross-Validation Methods",
      "concept": [
        "model evaluation functions"
      ],
      "topics": [
        "compare_cv"
      ]
    },
    {
      "page": "detect_spatial_leakage",
      "title": "Detect Spatial Leakage in Cross-Validation Folds",
      "concept": [
        "spatial analysis functions"
      ],
      "topics": [
        "detect_spatial_leakage"
      ]
    },
    {
      "page": "plot_spatial_folds",
      "title": "Plot Spatial Cross-Validation Folds",
      "concept": [
        "visualization functions"
      ],
      "topics": [
        "plot_spatial_folds"
      ]
    },
    {
      "page": "plot_spatial_residuals",
      "title": "Plot Spatial Residuals",
      "concept": [
        "visualization functions"
      ],
      "topics": [
        "plot_spatial_residuals"
      ]
    },
    {
      "page": "print.cv_comparison",
      "title": "Print method for cv_comparison objects",
      "topics": [
        "print.cv_comparison"
      ]
    },
    {
      "page": "print.spatial_distance",
      "title": "Print method for spatial_distance objects",
      "topics": [
        "print.spatial_distance"
      ]
    },
    {
      "page": "print.spatial_folds",
      "title": "Print method for spatial_folds objects",
      "topics": [
        "print.spatial_folds"
      ]
    },
    {
      "page": "print.spatial_leakage_result",
      "title": "Print method for spatial_leakage_result objects",
      "topics": [
        "print.spatial_leakage_result"
      ]
    },
    {
      "page": "print.spatial_metrics",
      "title": "Print method for spatial_metrics objects",
      "topics": [
        "print.spatial_metrics"
      ]
    },
    {
      "page": "print.spatial_residuals",
      "title": "Print method for spatial_residuals objects",
      "topics": [
        "print.spatial_residuals"
      ]
    },
    {
      "page": "sample_spatial_data",
      "title": "Sample Spatial Data for Demonstration",
      "topics": [
        "sample_spatial_data"
      ]
    },
    {
      "page": "spatial_block_folds",
      "title": "Spatial Block Cross-Validation",
      "concept": [
        "spatial cross-validation functions"
      ],
      "topics": [
        "spatial_block_folds"
      ]
    },
    {
      "page": "spatial_buffer_folds",
      "title": "Spatial Buffered Cross-Validation",
      "concept": [
        "spatial cross-validation functions"
      ],
      "topics": [
        "spatial_buffer_folds"
      ]
    },
    {
      "page": "spatial_cluster_folds",
      "title": "Spatial Clustering Cross-Validation",
      "concept": [
        "spatial cross-validation functions"
      ],
      "topics": [
        "spatial_cluster_folds"
      ]
    },
    {
      "page": "spatial_distance",
      "title": "Calculate Spatial Distances Between Train and Test Observations",
      "concept": [
        "spatial analysis functions"
      ],
      "topics": [
        "spatial_distance"
      ]
    },
    {
      "page": "spatial_folds",
      "title": "Create Spatial Cross-Validation Folds",
      "concept": [
        "spatial cross-validation functions"
      ],
      "topics": [
        "spatial_folds"
      ]
    },
    {
      "page": "spatial_metrics",
      "title": "Spatial Model Evaluation Metrics",
      "concept": [
        "model evaluation functions"
      ],
      "topics": [
        "spatial_metrics"
      ]
    },
    {
      "page": "spatial_residuals",
      "title": "Spatial Residual Diagnostics",
      "concept": [
        "spatial diagnostics functions"
      ],
      "topics": [
        "spatial_residuals"
      ]
    },
    {
      "page": "spatial_split",
      "title": "Random Spatial Split",
      "concept": [
        "spatial cross-validation functions"
      ],
      "topics": [
        "spatial_split"
      ]
    }
  ],
  "_readme": "https://github.com/sowsalim01/spatialcvr/raw/HEAD/README.md",
  "_rundeps": [
    "class",
    "classInt",
    "DBI",
    "e1071",
    "KernSmooth",
    "proxy",
    "Rcpp",
    "s2",
    "sf",
    "units",
    "wk"
  ],
  "_vignettes": [
    {
      "source": "introduction.Rmd",
      "filename": "introduction.html",
      "title": "Introduction to Spatial Cross-Validation",
      "author": "Mamadou SOW",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "The Spatial Dependence Problem",
        "Tobler's First Law of Geography",
        "Why Traditional Cross-Validation Fails",
        "Consequences of Spatial Leakage",
        "The Solution: Spatial Cross-Validation",
        "When to Use Spatial Cross-Validation",
        "Common Applications",
        "What spatialcvR Provides",
        "Quick Example",
        "Next Steps",
        "References",
        "Key Takeaways"
      ],
      "created": "2026-09-13 21:50:27",
      "modified": "2026-09-13 21:56:14",
      "commits": 2
    },
    {
      "source": "model-evaluation.Rmd",
      "filename": "model-evaluation.html",
      "title": "Model Evaluation and Comparison",
      "author": "Mamadou SOW",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Model Evaluation Metrics",
        "Available Metrics",
        "Calculating Metrics",
        "Understanding the Metrics",
        "Spatial Cross-Validation Workflow",
        "Step 1: Create Folds",
        "Step 2: Train and Evaluate Models",
        "Step 3: Aggregate Results",
        "Comparing CV Methods",
        "Using compare_cv",
        "Interpreting the Comparison",
        "Spatial Residual Diagnostics",
        "Calculating Spatial Residuals",
        "Visualizing Residuals",
        "Interpreting Residual Patterns",
        "Practical Example: Complete Workflow",
        "Scenario: Predicting Crop Yield",
        "Advanced Topics",
        "Cross-Method Comparison",
        "Performance vs. Spatial Separation Trade-off",
        "Best Practices",
        "1. Always Compare with Random CV",
        "2. Check for Spatial Leakage",
        "3. Analyze Residuals Spatially",
        "4. Consider the Prediction Context",
        "5. Document Your Approach",
        "Common Pitfalls",
        "Pitfall 1: Ignoring Spatial Dependence",
        "Pitfall 2: Overfitting to Spatial Structure",
        "Pitfall 3: Inappropriate CRS",
        "Pitfall 4: Small Sample Sizes",
        "Next Steps",
        "Key Takeaways"
      ],
      "created": "2026-09-13 21:50:27",
      "modified": "2026-09-26 16:48:50",
      "commits": 3
    },
    {
      "source": "spatial-cross-validation.Rmd",
      "filename": "spatial-cross-validation.html",
      "title": "Spatial Cross-Validation Methods",
      "author": "Mamadou SOW",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Available Methods",
        "Setup",
        "Spatial Block Cross-Validation",
        "Concept",
        "When to Use",
        "Basic Usage",
        "Controlling Block Size",
        "Assignment Strategies",
        "Buffered Cross-Validation",
        "Important Notes",
        "Spatial Clustering Cross-Validation",
        "Understanding Cluster Assignment",
        "Random Spatial Split (Baseline)",
        "Choosing the Right Method",
        "Decision Flowchart",
        "Method Comparison",
        "Visualizing Folds",
        "Practical Tips",
        "Start Simple",
        "Adjust Based on Data Characteristics",
        "Always Compare with Random CV",
        "Common Issues and Solutions",
        "Issue: Too few observations per fold",
        "Issue: Uneven fold sizes",
        "Issue: Geographic gaps in training data",
        "Next Steps",
        "Key Takeaways"
      ],
      "created": "2026-09-13 21:50:27",
      "modified": "2026-09-13 21:50:27",
      "commits": 1
    },
    {
      "source": "spatial-leakage.Rmd",
      "filename": "spatial-leakage.html",
      "title": "Spatial Leakage Detection",
      "author": "Mamadou SOW",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Understanding Spatial Leakage",
        "What is Spatial Leakage?",
        "Definition",
        "Consequences",
        "Detecting Spatial Leakage",
        "Basic Usage",
        "Understanding the Output",
        "Analyzing Spatial Distances",
        "Calculating Distances",
        "Distance Statistics Explained",
        "Interpreting Distance Values",
        "Customizing Leakage Detection",
        "Setting Custom Thresholds",
        "Custom Risk Levels",
        "Comparing Different CV Methods",
        "Spatial vs Random CV",
        "Expected Differences",
        "Case Studies",
        "Case 1: High Spatial Leakage",
        "Case 2: Low Spatial Leakage",
        "Addressing Spatial Leakage",
        "Recommendations by Risk Level",
        "Low Risk",
        "Moderate Risk",
        "High Risk",
        "Practical Solutions",
        "Integration with Model Evaluation",
        "Full Workflow Example",
        "Important Considerations",
        "Coordinate Reference Systems",
        "Threshold Selection",
        "Multiple Metrics",
        "Next Steps",
        "Key Takeaways"
      ],
      "created": "2026-09-13 21:50:27",
      "modified": "2026-09-13 21:50:27",
      "commits": 1
    }
  ],
  "_score": 4.778151250383644,
  "_indexed": true,
  "_nocasepkg": "spatialcvr",
  "_universes": [
    "sowsalim01"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-10-11T12:34:06.000Z",
      "distro": "resolute",
      "commit": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
      "fileid": "https://r2.ropensci.org/e00b2557206c0b9ce4a0e13130f3af950abefa524888c946eb4378a7ba396fd7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-10-11T12:34:15.000Z",
      "distro": "resolute",
      "commit": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
      "fileid": "https://r2.ropensci.org/9ed2118041326e8e75b7cfcae4cb51ae6c46ce6fcab25322526c06ec3090ef9b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-10-11T12:33:29.000Z",
      "commit": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
      "fileid": "https://r2.ropensci.org/f7148e48ee75ce117b4f9c646264ddebdee517d3cd512b43716b89f046792737",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-10-11T12:33:56.000Z",
      "commit": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
      "fileid": "https://r2.ropensci.org/f52e9a80ce709e2b8272b37da27dd22a910af51546010087ae13825047222df1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-10-11T12:34:17.000Z",
      "commit": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
      "fileid": "https://r2.ropensci.org/b9db355b1fa73622529bcdafeec54e574556ce6b789bcecd6ac71c73ed881638",
      "status": "success",
      "buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-11T12:33:17.000Z",
      "commit": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
      "fileid": "https://r2.ropensci.org/e79896886eb095be6b8721e9604775fa314dd72298d9cc6ab44632c8a678ed71",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-11T12:33:30.000Z",
      "commit": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
      "fileid": "https://r2.ropensci.org/d4e0a58839911fe7b3caa8dc0ec1c308b41c962670cfe982cc53b7972896b24e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-11T12:33:16.000Z",
      "commit": "eab19c88a0c5f65156923b388f6fcc2dc4851664",
      "fileid": "https://r2.ropensci.org/58bb62d9b958a34735bb7a39ae346af43ef28b61289b9822f2deb7f68babcf7e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/sowsalim01/actions/runs/38139369470"
    }
  ]
}