Learn R Programming

rgbif (version 0.7.0)

stylegeojson: Style a data.frame prior to converting to geojson.

Description

This function is deprecated. See the package spocc for similar functionality.

Usage

stylegeojson(input, var = NULL, var_col = NULL, var_sym = NULL,
  var_size = NULL, color = NULL, symbol = NULL, size = NULL)

Arguments

input
A data.frame
var
A single variable to map colors, symbols, and/or sizes to.
var_col
The variable to map colors to.
var_sym
The variable to map symbols to.
var_size
The variable to map size to.
color
Valid RGB hex color
symbol
An icon ID from the Maki project http://www.mapbox.com/maki/ or a single alphanumeric character (a-z or 0-9).
size
One of "small", "medium", or "large"

See Also

togeojson

Examples

Run this code
# Get data and save map data
splist <- c('Accipiter erythronemius', 'Junco hyemalis', 'Aix sponsa')
out <- occ_search(scientificName = splist, hasCoordinate = TRUE, limit = 50)
library("plyr")
dat <- ldply(out, "[[", "data")
names(dat)[names(dat) %in% c("decimalLatitude","decimalLongitude")] <- c("latitude","longitude")
dat2 <- stylegeojson(input=dat, var="name", color=c("#976AAE","#6B944D","#BD5945"),
   size=c("small","medium","large"))
head(dat2)

Run the code above in your browser using DataLab