View source: R/make_location_data_list.R
make_location_data_list | R Documentation |
This function converts data and location into lists of sf objects using
as_sf_list. If location_col, data_col, or col (which sets both to the
same value), are provided the col is passed to as_sf_list to allow the
creation of an sf list from a sf data frame using dplyr::group_nest()
.
make_location_data_list( data = NULL, location = NULL, key = c("location", "data"), ... )
data, location |
A sf object or list of sf objects with data and corresponding locations. |
key |
Names for location and data in the returned list. |
... |
Pass location_col and/or data_col to group and nest the data provided to location and data. Use col to set both to the same value. |
If location and data are the same length are the same length, they are combined into a single list. If either one is length 1 when the other is not, the length 1 object is repeated to match the length of the longer object. Different length objects where neither are length 1 gives a warning.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.