getContainedIn | R Documentation |
This assumes an id column in input and output shapes and
getContainedIn(
inputShape,
outputShape,
inputVars = inputShape %>% dplyr::groups(),
outputVars = outputShape %>% dplyr::groups(),
suffix = c(".x", ".y")
)
inputShape |
- a sf containing points of interest (or shapes) |
outputShape |
- a sf containing polygons to locate the input in |
inputVars |
- defines the columns of the input that you want to retain (as a dplyr::vars(...) list). This grouping should uniquely identify the row. If not present will use the current grouping of inputShape. |
outputVars |
- defines the columns of the output that you want to retain (as a dplyr::vars(...) list). This grouping should uniquely identify the row. If not present will use the current grouping of outputShape. |
suffix |
- the suffix of any duplicated columns as per dplyr::inner_join() |
- a mapping as a dataframe relating the input id column and output id columns
# find the hospitals in a given area.
mapping = getContainedIn(
inputShape = arear::surgecapacity,
outputShape = arear::ukcovidmap(),
inputVars = dplyr::vars(hospitalId),
outputVars = dplyr::vars(code)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.