Spatial Tessellation, Modeling, and Cross-Validation Toolkit


[Up] [Top]

Documentation for package ‘spatialkit’ version 2.0.0

Help Pages

area_of_applicability Area of applicability of a spatial prediction model
assign_features_to_polygons Assign features to polygons and attach a polygon ID
build_tessellation Build a tessellation (Voronoi, Delaunay triangles, hex grid, or square grid)
clear_fitted_cache Clear cached fitted values for a Bayesian spatial model
clear_grid_cache Clear the in-session grid cache
clip_target_for Build a polygonal clip target from points and/or a boundary
coef.bayesian_fit Extract Bayesian model fixed-effect summaries
coef.gwr_fit Extract GWR local coefficients
coef.rf_fit Coefficients are undefined for a random forest
coerce_to_points Coerce arbitrary geometries to representative points
compare_models Side-by-side comparison of fitted spatial models
compare_models_cv Cross-validated comparison of spatial models
create_grid_polygons Create square or hexagonal grid polygons over a boundary
create_grid_polygons_cached Create and cache grid polygons over a boundary
create_voronoi_polygons Create Voronoi polygons from points with robust CRS and optional clipping
cv_bayes K-fold cross-validation for the Bayesian spatial model
cv_gwr K-fold cross-validation for GWR
cv_rf Cross-validate a random forest with spatial folds
cv_spatial Model-agnostic spatial cross-validation
determine_optimal_levels Determine an optimal number of spatial levels via an elbow heuristic
ensure_projected Ensure an object has a projected CRS (with sensible defaults)
ensure_stable_poly_id Create deterministic, stable polygon IDs based on spatial sort keys
estimate_sac_range Estimate the spatial autocorrelation range from data
evaluate_insample Compute in-sample (or out-of-sample) metrics for fitted spatial models
fitted.bayesian_fit In-sample fitted values from a Bayesian spatial GP fit
fitted.gwr_fit In-sample fitted values from a GWR fit
fitted.rf_fit Out-of-bag predictions from a random forest fit
fit_bayesian_spatial_model Fit a Bayesian spatial regression with a 2D Gaussian Process (via brms)
fit_gwr_model Fit a Geographically Weighted Regression (GWR) via GWmodel
fit_rf_model Fit a random forest via ranger
get_voronoi_seeds Generate seed points for Voronoi tessellation
gp_lengthscale_bounds Heuristic length-scale bounds for a squared-exponential GP
gwr_model_selection Forward model selection for geographically weighted regression
harmonize_crs Harmonize CRS between two spatial objects
make_folds Create spatial cross-validation folds
model_metrics Compute goodness-of-fit metrics for a spatial model
model_metrics.spatial_fit Compute goodness-of-fit metrics for a spatial model
new_spatial_fit Build a spatial_fit S3 object
plot.spatial_fit Plot a fitted spatial model
plot_folds Map a cross-validation fold scheme
plot_tessellation_map Plot a tessellation map with optional boundary, seeds, and features
predict.bayesian_fit Predict from a Bayesian spatial GP model
predict.gwr_fit Predict from a GWR spatial model
predict.rf_fit Predict from a random forest fit
predict_surface Predict a fitted spatial model onto a regular grid
prep_model_data Prepare and sanitize an sf dataset for spatial modeling
print.aoa Print an area-of-applicability result
print.gwr_model_selection Print a GWR model selection result
print.rf_fit Print a random forest fit
print.sac_range Print a spatial autocorrelation range
print.spatial_fit Print a fitted spatial model
residuals.bayesian_fit In-sample residuals from a Bayesian spatial GP fit
residuals.gwr_fit In-sample residuals from a GWR fit
residuals.rf_fit Out-of-bag residuals from a random forest fit
residual_morans_i Compute Moran's I on the residuals of a fitted spatial model
select_features_forward Greedy forward feature selection with spatially blocked inner folds
spatialkit_quiet Quieten (or restore) spatialkit's console log
summarize_by_cell Summarize features by polygon/cell ID
summary.spatial_fit Summarise a fitted spatial model
voronoi_seeds_kmeans K-means seed generation from point coordinates
voronoi_seeds_random Random seed generation within a polygonal boundary