Description Arguments Author(s) Examples
Plot the OSM summary dataset with mapview.
sumry |
The output of summaryOSM |
mergeby |
Should the values be assigned per continent or per country. Default is 'country' |
unit |
Which unit should be taken. Default is 'mb' |
... |
Arguments passed on to mapview. See Mapview |
Sebastian Gatscha
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Get a summary dataset and plot it
con_df <- summaryOSM()
mapviewOSM(con_df, mergeby = "country", unit = "gb")
## With Custom col.regions
YlOrBr <- c("#FFFFD4", "#FED98E", "#FE9929", "#D95F0E", "#993404")
colfunc = colorRampPalette(YlOrBr, space = "Lab")
mapviewOSM(con_df, mergeby = "country", col.regions = colfunc)
## With custon col.regions and breaks
jet.colors <- colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan",
"#7FFF7F", "yellow", "#FF7F00", "red", "#7F0000"))
mapviewOSM(con_df, mergeby = "country", unit = "gb", burst=F,
col.regions = jet.colors, at = 0:3)
## With custom popups
mapviewOSM(con_df, mergeby = "country",
popup = mapview::popupTable(con_df, zcol = c("subregions", "kilobyte"),
feature.id = F))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.