View source: R/highest_concentration_terra.R
find_highest_concentration | R Documentation |
Identifies the central coordinates of a circle with a fixed radius that maximizes the coverage of demand points.
find_highest_concentration(
df,
value,
top_n = 1,
radius = 200,
cell_size = 100,
grid_precision = 1,
lon = "lon",
lat = "lat",
crs_metric = 3035,
print_progress = TRUE
)
df |
A data.frame containing demand points. Must include at least columns for longitude, latitude, and the value of interest. |
value |
Column name in |
top_n |
Positive integer greater or equal to 1 (default is 1).
Specifies how many highest concentration circles are returned.
If |
radius |
Numeric. Radius of the circle in meters (default = 200). |
cell_size |
Numeric. Size of the grid cell in meters (default is 100).
Defines the resolution of the initial raster grid. The choice of cell
size depends on the size of the study area. For example, for a country
the size of the Netherlands, cells of 100 × 100 meters are typically
sufficient. For larger areas such as Germany, a cell size of 200 × 200
meters may be more appropriate. The choice of |
grid_precision |
Numeric. Precision of the search grid in meters
(default is 1). Determines the spacing of sub-points within each raster
cell. For example, with |
lon |
Column name in |
lat |
Column name in |
crs_metric |
Numeric. Metric Coordinate Reference System (CRS) used in background calculations. For Europe use EPSG:3035 (default). For the United States use EPSG:6317. For Asia-Pacific use EPSG:8859. |
print_progress |
Logical. Whether to print progress messages
( |
A recent regulation by the European Commission mandates insurers to report the maximum insured value of fire risk policies for all buildings partly or fully within a circle of radius 200 meters (see Article 132 - fire risk sub-module - of the Delegated Regulation). This captures the risk of catastrophic fire or explosion, including terrorist attacks.
The problem resembles a Maximal Covering Location Problem (MCLP) with a fixed radius, a classic facility location problem. The goal is to select the best locations to maximize coverage of demand points, ensuring each demand point lies within the radius of at least one selected facility.
A list with two elements:
A data.frame with the top_n
highest concentrations.
A data.frame with the subset of df
corresponding to those
concentrations.
Martin Haringa
Commission Delegated Regulation (EU) (2015). Solvency II Delegated Act 2015/35. Official Journal of the European Union, 58:124.
# Find single highest concentration
x <- find_highest_concentration(Groningen, value = "amount")
plot(x)
# Find top 2 concentrations with smaller grid cells
y <- find_highest_concentration(Groningen, "amount",
top_n = 2, cell_size = 50)
plot(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.