This implements the label propagation algorithm described in our paper: R. J. Challen, G. J. Griffith, L. Lacasa, and K. Tsaneva-Atanasova, ‘Algorithmic hospital catchment area estimation using label propagation’, BMC Health Services Research, vol. 22, no. 1, p. 828, June 2022, doi: 10.1186/s12913-022-08127-7.
Usage
createCatchment(
supplyShape,
supplyIdVar = "code",
supplyVar,
supplyOutputVars = supplyShape %>% dplyr::groups(),
demandShape,
demandIdVar = "code",
demandVar,
growthConstant = 1.2,
bridges = arear::ukconnections,
outputMap = TRUE
)
Arguments
- supplyShape
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 capacity count
- supplyIdVar
the variable name of the identifier of the supplier or group of suppliers. For example this could be an NHS trust (multiple sites)
- supplyVar
the column name of the supply parameter. This could be number of beds in a hospital.
- supplyOutputVars
(optional - defaults to grouping) the columns from the input that are to be retained in the output
- demandShape
the sf object with the geographical map of the demand surface. For example the geographical distribution of the population served,
- demandIdVar
the column name of the unique identifier of the areas,
- demandVar
the column name of the demand parameter. This could be the population in each region
- growthConstant
a growth parameter which defines how quickly each label propagates
- bridges
a named list containing extra linkages beyond those inferred by the demandShape topology. These are used to add in bridges
- outputMap
should we export a shape file or just the mapping file