Description Usage Arguments Details Value See Also Examples
Generates Spatial Sparklines as Simple Feature Collection (sfc)
1 |
coords |
Points coordinates |
my_stats |
Values associated to points as a column-wise (long) format. For instance, one column = one date |
width |
Total width of the line |
height |
Total height of the line |
direction |
Direction of lines, upward (north), downward (south), left (west) or right (east). For instance, "ne" will generate upward right lines, "sw" will generated downward left lines. |
mode |
Normal or Log transformation mode |
This function calculates sparklines, based on statistical data, for instance Time-Series
You can choose width, height of the line, but also direction of the lines.
The Log transformation helps having smoother lines when having an exponential evolution.
You can pilot the rendering of individual lines with finer details, with singleGeospark
returns a geometry collection (sfc)
returns a geometry collection (sfc)
geosparklines::singleGeospark()
, browseVignettes("geosparklines")
1 2 3 4 5 6 | library(readr)
library(sf)
f <- read_csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv")
geosparks <- geospark(f[, c('Long', 'Lat')], f[, 5:ncol(f)], width=20, height=20, mode = 'log')
plot(geosparks)
st_geometry(f) <- geosparks
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.