Description Usage Arguments Value Examples
#' Function providing a shorthand for converting a data frame with an X and Y column to a simple feature with a specified coordinate reference system. This will default to latitude and longitude if the X and Y columns are not specified, selecting the columns with "lon" and "lat" in any case for the x_colname and y_colname respectively, and setting the CRS to 4326. If multiple columns contain these strings, the column names but be specified.
1 |
data |
a dataframe or tibble containing a geojson column |
x_colname |
a string containing the column name of the x coordinate column |
y_colname |
a string containing the column name of the y coordinate column |
crs |
a string or numeric vector representing the coordinate reference system code |
A simple feature data frame or tibble.
1 2 | make_sf(data=data.frame("Longitude"=c(1,2,3),"Latitude"=c(51,52,53)),x_colname="Longitude",y_colname="Latitude",crs=4326)
make_sf(data=data.frame("Longitude"=c(1,2,3),"Latitude"=c(51,52,53)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.