spatialrisk
Spatial Concentration and Radius-Based Risk Calculations
Description
Provides methods for spatial concentration and radius-based risk calculations. The package focuses on efficient determination of the sum of observations within a given radius, identifying areas of high local concentration, and aggregating point data to polygon geometries. These methods are useful for applications such as insurance, urban analytics, environmental exposure analysis, and other spatial point pattern workflows. The underlying maximum covering problem is described by Church (1974) <doi:10.1007/BF01942293>.
Downloads
866
Last 30 days
3931st
2.1K
Last 90 days
9.9K
Last year
Trend: +71.2% (30d vs prior 30d)
55
Last 30 days
275
Last 90 days
780
Last year
Trend: -32.9% (30d vs prior 30d)
6
Last 7 days
20
Last 30 days
0
All-time
autoCRAN-only: this name is served only by autoCRAN, so the count is exact.
CRAN Check Status
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check History
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
examples
Running examples in ‘spatialrisk-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: choropleth
> ### Title: Create choropleth map
> ### Aliases: choropleth
>
> ### ** Examples
>
>
...[truncated]...
t <- summarise_points_by_polygon(nl_provincie, insurance, "amount")
109 points are outside any polygon.
> choropleth(test, value = "amount_sum")
Error: tmap is needed for this function to work. Install it via install.packages("tmap")
Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 10, 2026
ERROR 10 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 18, 2026
whether package can be installed
Installation failed. See 'd:/Rcompile/CRANpkg/local/4.6/spatialrisk.Rcheck/00install.out' for details.
installed package size
installed size is 6.0Mb
sub-directories of 1Mb or more:
data 2.6Mb
help 1.4Mb
libs 1.9Mb
installed package size
installed size is 5.9Mb
sub-directories of 1Mb or more:
data 2.6Mb
help 1.4Mb
libs 1.7Mb
installed package size
installed size is 5.1Mb
sub-directories of 1Mb or more:
data 2.5Mb
help 1.4Mb
libs 1.0Mb
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 10, 2026
installed package size
installed size is 6.0Mb
sub-directories of 1Mb or more:
data 2.6Mb
help 1.4Mb
libs 1.9Mb
installed package size
installed size is 5.9Mb
sub-directories of 1Mb or more:
data 2.6Mb
help 1.4Mb
libs 1.7Mb
installed package size
installed size is 5.1Mb
sub-directories of 1Mb or more:
data 2.5Mb
help 1.4Mb
libs 1.0Mb
ERROR 10 OK · 3 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 9, 2026
whether package can be installed
Installation failed. See ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/spatialrisk.Rcheck/00install.out’ for details.
installed package size
installed size is 6.0Mb
sub-directories of 1Mb or more:
data 2.6Mb
help 1.4Mb
libs 1.9Mb
installed package size
installed size is 5.9Mb
sub-directories of 1Mb or more:
data 2.6Mb
help 1.4Mb
libs 1.7Mb
installed package size
installed size is 5.1Mb
sub-directories of 1Mb or more:
data 2.5Mb
help 1.4Mb
libs 1.0Mb
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
installed package size
installed size is 6.0Mb
sub-directories of 1Mb or more:
data 2.6Mb
help 1.4Mb
libs 1.9Mb
installed package size
installed size is 5.9Mb
sub-directories of 1Mb or more:
data 2.6Mb
help 1.4Mb
libs 1.7Mb
installed package size
installed size is 5.1Mb
sub-directories of 1Mb or more:
data 2.5Mb
help 1.4Mb
libs 1.0Mb
Code & tests
Open call graph →Code intelligence has not been computed for this package yet.
Code
Structure
Lines of code
10,140
Files
114
Compiled share
20.8%
Has compiled src
Yes
Language breakdown
API
Exported functions
21
Internal functions
94
Recent export changes
Testing & CI
Has tests
Yes
Test-to-code ratio
0.26
testthat edition
–
CI present
No
CI type
[]
PR gated
No
Docs
Return-value doc rate
100%
\dontrun example ratio
40%
Roxygen coverage
100%
Has pkgdown
No
NEWS present
Yes
Health & Security signals
Informational signals; not verdicts.
on.exit coverage
100%
Unsafe pattern score
0
Dep constraint coverage
0%
Secret pattern count
0
Bundled 3rd-party code
2 items
Portability & License
Min R version
4.1.0
System requirements
–
C++ standard
–
License
GPL (>= 2)
License flags
SPDX valid, OSI approved
History
Versions
20
First release
2018-09-03
Latest release
2026-06-16
Avg cadence
81 days
Cold removal rate
100%
Dep drift
50
LOC over versions
Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.