to_geojson | R Documentation |
Exports a dataframe to a GeoJSON file where latitude/longitude data is available.
to_geojson( dataframe, filename, overwrite = FALSE, pretty = FALSE, lat = "latitude", lon = "longitude" )
dataframe |
An input dataframe to convert |
filename |
The exported filename, relative to the current working directory. If the file already exists and overwrite is not set to TRUE, an error will be thrown |
overwrite |
Indicates if an existing file in the current directory should be overwritten by the new file. Defaults to FALSE. |
pretty |
Indicates if file is formatted with whitespace as newlines, indentations and spaces to make the JSON data more readable. Defaults to FALSE. |
lat |
The name of the column with latitude data. Defaults to "latitude". |
lon |
The name of the column with longitude data. Defaults to "longitude". |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.