add_locations | R Documentation |
This function adds location data to the rows of a SAFE data worksheet,
converting it into a sf
spatial features object. Rows
are matched to values in a location_field: if there is only one location
field, it will be used automatically; otherwise, the specific field must
be provided.
add_locations( obj, location_field = NULL, location_table = NULL, gazetteer_info = FALSE )
obj |
An existing object of class |
location_field |
The name of a location field in a
|
location_table |
An existing location table for a dataset,
as generated by |
gazetteer_info |
Should all the gazetteer fields be included in
the returned |
A modified safedata
object including geometry data.
get_locations
, load_gazetteer
,
load_location_aliases
set_example_safe_dir() beetle_abund <- load_safe_data(1400562, "Ant-Psel") beetle_abund <- add_locations(beetle_abund) unset_example_safe_dir()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.