Skip to contents

Reference

spatialrisk is organised around fixed-radius aggregation, hotspot detection, polygon-based spatial reporting, and supporting spatial data. Most users can start with the core functions below, while lower-level workflow functions are available for more advanced use.

Core functions

Main entry points for common fixed-radius concentration and reporting workflows.

concentration_hotspot()
Find fixed-radius concentration hotspots
radius_sum()
Sum values within a radius around target coordinates
points_within_radius()
Find points within radius around one or more centre coordinates
summarise_points_by_polygon()
Summarise point exposures by reporting polygon

Fixed-radius aggregation

Evaluate point-level values and observations within a fixed radius.

points_within_radius()
Find points within radius around one or more centre coordinates
radius_sum()
Sum values within a radius around target coordinates

Concentration and hotspot detection

Find maximum fixed-radius concentrations and inspect the search workflow.

Main API

concentration_hotspot()
Find fixed-radius concentration hotspots

Advanced hotspot workflow

Lower-level functions underlying concentration_hotspot() for inspecting or running the search steps separately.

prepare_spatialrisk() select_candidates() optimize_hotspot() plot(<spatialrisk_hotspot_workflow>)
Prepare fixed-radius concentration hotspot analysis
plot(<hotspot>)
Plot concentration hotspot results

Polygon summaries and visualisation

Aggregate point exposures to reporting polygons and visualise spatial values.

summarise_points_by_polygon()
Summarise point exposures by reporting polygon
choropleth()
Create a choropleth map of polygon-level values
map_points()
Create interactive point map

Data

Example portfolios, administrative boundaries, and weather data used in package examples and workflows.

Example datasets

Groningen
Example addresses in Groningen
insurance
Example insurance portfolio

Administrative and spatial boundaries

nl_gemeente
Municipalities in the Netherlands
nl_provincie
Provinces in the Netherlands
nl_corop
COROP regions in the Netherlands
nl_postcode2
Two-digit postcode regions in the Netherlands
nl_postcode3
Three-digit postcode regions in the Netherlands
nl_postcode4
Four-digit postcode regions in the Netherlands

Weather datasets

knmi_historic_data()
Retrieve historic weather data for the Netherlands
knmi_stations
KNMI weather stations

Spatial utilities

General coordinate conversion, distance, and simple spatial display helpers.

haversine()
Haversine great-circle distance
convert_crs_df()
Convert Coordinate Reference System (CRS)

Deprecated

Deprecated functions retained for backward compatibility.

concentration()
Deprecated alias for radius_sum()
points_in_circle()
Deprecated alias for points_within_radius()
find_highest_concentration()
Deprecated alias for concentration_hotspot()
highest_concentration()
Deprecated geohash hotspot search
neighborhood_gh_search()
Deprecated geohash neighbourhood refinement
plot_points()
Deprecated alias for map_points()
points_to_polygon()
Deprecated alias for summarise_points_by_polygon()
choropleth_ggplot2()
Choropleth map of an sf object with ggplot2
interpolate_spline()
Interpolate values using spherical splines
plot(<conc>)
Plot deprecated geohash hotspot results
plot(<neighborhood>)
Plot deprecated geohash neighbourhood results