df2geojson: df2geojson

Description Usage Arguments Value Examples

View source: R/df2geojson.R

Description

Transform a data frame into a string formatted in GeoJSON

Usage

1
df2geojson(df, multipleValuesByTime = c())

Arguments

df

Data frame to convert in GeoJSON. It must contain at least columns 'id', 'time', 'X' and 'Y'. Additionnal columns will be added as features' properties.

multipleValuesByTime

Vector of strings indicating the df columns names which can contain several values by time.

Value

a geojson string

Examples

1
2
3
library(SMITIDvisu)
data(transmissiontree)
geojson <- df2geojson(tt.events, multipleValuesByTime = c('infectedby', 'probabilities'))

SMITIDvisu documentation built on Feb. 8, 2021, 9:06 a.m.