Description Usage Arguments Value
Create a Google Earth KML file (points and multitrack) from lat/long coordinates
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ExportKMLPoints(
df,
id = "id",
lat = "lat",
long = "long",
alt = NULL,
alt_mode = "clampToGround",
icon_href = file.path("http://maps.google.com", "mapfiles/kml//paddle/wht-blank.png"),
icon_scale = 0.7,
point_col_var = NULL,
point_color = NULL,
point_metadata = NULL,
point_pal = NULL,
point_r_pal = NULL,
point_b_pal = "Set1",
extrude = FALSE,
labelscale = 0,
file = NULL,
output_dir = NULL
)
|
df |
input dataframe, must have id, lat, long, and datetime |
id |
column name of unique identifier, data is split into unique paths and separate folders based on this parameter |
lat |
column name of latitude coordinates (WGS84, dec. degree) |
long |
column name of longitude coordinates (WGS84, dec. degree) |
alt |
input dataframe column name for altitude(m). Optional. |
alt_mode |
based on KML code: "absolute","clampedToGround", "relativeToGround" (see KML documentation for description). Default is "clampedToGround". |
icon_href |
HTML address of the icon used for points. Default: "http://maps.google.com/mapfiles/kml/paddle/wht-blank.png" |
icon_scale |
numeric, scale for icon. Default is 0.7. |
point_col_var |
column name that determines the color for each point, may be same as 'id' parameter, but may also be sex, behavior, season, etc. Default is 'id' parameter |
point_color |
R color name (e.g. "yellow3") for the color of all the points |
point_metadata |
location of metadata .csv file. Metadata file must have a column that matches name of 'point_col_var' parameter and "icon_color" column with hexadecimal colors. |
point_pal |
name of color palette funtions (e.g., rainbow, heat.colors, terrain.colors, topo.colors, cm.colors used to create colors. This parameter has priority over the other point color palette parameters. Default is NULL. |
point_r_pal |
Specifc number of 'R_pal' color palette from the 'PlotKML' Package (e.g., 1 = R_pal[[1]]). This parameter has priority over the 'b_pal' parameter for setting the colors. Default is NULL. |
point_b_pal |
color palette name from RColorBrewer package, default is "Set1". Automatically adjusts number of colors to match the unique number of factors in the 'point_col_var' column of the input dataframe. |
extrude |
logical, either FALSE (default) for no line, or TRUE which extends a line from the point to the ground. |
labelscale |
adjusts the size of the Google Earth location point labels. Default is 0, which hides the labels. To show labels, change to a value between 0.7-1. |
file |
filename of output KML file, default is name of input dataframe |
output_dir |
output folder location, default is getwd() |
KML of points
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.