mapviewOSM: mapviewOSM

Description Arguments Author(s) Examples

View source: R/getOSM.R

Description

Plot the OSM summary dataset with mapview.

Arguments

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

Author(s)

Sebastian Gatscha

Examples

 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))

YsoSirius/getOSM documentation built on May 28, 2019, 8:59 p.m.