df2geojson {SMITIDvisu} | R Documentation |
df2geojson
Description
Transform a data frame into a string formatted in GeoJSON
Usage
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
library(SMITIDvisu)
data(transmissiontree)
geojson <- df2geojson(tt.events, multipleValuesByTime = c('infectedby', 'probabilities'))
[Package SMITIDvisu version 0.0.9 Index]