This implements the label propagation algorithm described in our upcoming paper.
catchment(
supplyShape,
supplyIdVar = "code",
supplyVar,
supplyOutputVars = supplyShape %>% dplyr::groups(),
demandShape,
demandIdVar = "code",
demandVar,
growthConstant = 1.2,
bridges = arear::ukconnections,
outputMap = TRUE,
...
)
- a sf object containing a list of the locations of supply points, with a column containing supply capacity, for example NHS hospital sites, with a bed
- the variable name of the identifier of the supplier or group of suppliers. For example this could be an NHS trust (multiple sites)
- the column name of the supply parameter. This could be number of beds in a hospital.
- (optional - defaults to grouping) the columns from the input that are to be retained in the output
- the sf object with the geographical map of the demand surface. For example the geographical distribution of the population served,
- the column name of the unique identifier of the areas,
- the column name of the demand parameter. This could be the population in each region
- a growth parameter which defines how quickly each label propagates
- a named list containing extra linkages beyond those inferred by the demandShape topology. These are used to add in bridges
- should we export a shapefile or just the mapping file
- cache control parameters
a dataframe containing the grouping columns, the outputIdVar and the interpolated value of interpolateVar