← Back to all sparks
W

waywiser

ANALYTICS
Velocity0.0

Ergonomic tooling to assess models of spatial data

Spatial model assessment that spent the last year on cross-platform arithmetic and CRAN rules.

spatial-statisticsmodel-assessmenttidymodelscran-compliancer-package
Current state
waywiser provides spatial model assessment metrics in a tidymodels idiom — spatial autocorrelation measures, area of applicability, and multi-scale assessment of predictions. The substantive work landed in 0.3.0 through 0.5.0, and the recent releases are consolidation: 0.6.0 made metric functions return NA everywhere they previously returned NaN, because macOS disagreed with every other platform, and taught ww_multi_scale() to handle classification and class probability metrics correctly when given rasters. The three releases since are entirely CRAN policy compliance — no internet downloads during checks, no writing to directories, no syntax that would raise the R version floor.
Where it's heading
The package has reached the point where the interesting bugs are cross-platform and cross-package rather than statistical. Its main function, ww_multi_scale(), has been the focus of nearly every release since 0.4.0, working through units handling, aggregation ordering, raster inputs and metric-type dispatch. The dependency on vip and the tidymodels metric machinery means a share of releases exist only to track breaking changes elsewhere.
Prediction
Expect the next substantive release to continue on ww_multi_scale() edge cases, given that it has absorbed most of the fixes in this window. The recent run of CRAN-compliance patches suggests no feature work is currently in flight.

Recent moves

  1. 1y ago

    Stops downloading data during CRAN checks

    Removes network access from the CRAN check path. The third consecutive release spent on check-environment policy rather than the package's own behaviour.

    View source ↗
  2. 1y ago

    Vignettes no longer write to CRAN directories

    Sets sf_proj_search_paths() in vignettes so builds do not write outside permitted locations. Packaging hygiene with no user-visible effect.

    View source ↗
  3. 1y ago

    Keeps the R version floor below 4.1

    Drops the shorthand lambda syntax so the package still installs on R before 4.1, and updates tests for new dependency versions. Compatibility maintenance only.

    View source ↗
  4. 2y ago

    NaN results become NA; raster metrics dispatch correctly

    Metric functions now return NA wherever they previously returned NaN, resolving a genuine cross-platform inconsistency where macOS results differed from everywhere else. ww_multi_scale() also converts truth and estimate to factors for classification metrics and errors rather than guessing when class and probability metrics are mixed.

    View source ↗
  5. 2y ago

    Guards against ignored grid arguments; faster on sf data

    Adds warnings and errors for two cases where user arguments were silently ignored — a crs passed through to st_make_grid(), and extra arguments supplied alongside an explicit grid list — and speeds up the sf path. Turning silent no-ops into errors is the right trade for an assessment tool where a wrong grid means wrong numbers.

    View source ↗
  6. 2y ago

    Fixes wrong observation counts and ignored grid units

    Two real correctness bugs: truth and estimate counts always came back as 1 for sf data because they were computed after aggregation, and grid cellsizes carrying units were ignored. Both produced plausible-looking output that was wrong, which is the worst failure mode for a metrics package.

    View source ↗