geojson_map_path | R Documentation |
Create distribution map and elevation profile of HP linked together by paths, for example, caravanserails.
geojson_map_path( map.name = "map_path", geojson.path = paste0(system.file(package = "eamenaR"), "/extdata/caravanserail.geojson"), csv.path = paste0(system.file(package = "eamenaR"), "/extdata/caravanserail_paths.csv"), export.type = c("map"), by = "route", selected.category = NA, symbology = paste0(system.file(package = "eamenaR"), "/extdata/symbology.xlsx"), interactive = FALSE, stamen.zoom = NA, export.plot = F, dirOut = paste0(system.file(package = "eamenaR"), "/results/"), fig.width = 8, fig.height = 8, color.set = "Set1", verbose = TRUE )
map.name |
name of output map and name of saved file (if export.plot is TRUE). Default "map_path". |
geojson.path |
path of GeoJSON file. Default 'caravanserail.geojson'. |
csv.path |
path to CSV where edges between two HPs are recorded. Default 'caravanserail_paths.csv'. |
export.type |
type of output: map ('map') or profile ('profile'). For latter Z should be calculated with the 'geojson_addZ()' function. |
selected.category |
limit study to some categories. For example to some particular routes for caravanserais. Default NA, no limitation. |
symbology |
path to XLSX recording symbology for different values, default 'symbology.xlsx'. |
interactive |
if TRUE will plot VisNetwork. Default FALSE. |
stamen.zoom |
zoom of Stamen basemap, between 0 (world, unprecise) to 21 (building, very precise). By default NA, zoom level will be calculated automatically. |
export.plot |
if TRUE, export plot, if FALSE will only display it. |
dirOut |
folder where outputs will be saved. Default: '/results'. If it doesn't exist, will be created. Only useful if export plot is TRUE. |
fig.width, fig.height |
size of output map. |
color.set |
RBrewer color set. Default "Set1". |
verbose |
if TRUE (by default), print messages. |
name |
of category column. Default "route" for caravanserais. |
PNG map and HMTL map of HPs linked together by paths
library(dplyr) # plot general map of HPs geojson_map_path(map.name = "caravanserail_paths", export.plot = F) # plot and export geojson_map_path(map.name = "caravanserail_paths", export.plot = T, fig.width = 11) # create an interactive map of each route geojson_map_path(geojson.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserailZ.geojson", csv.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserail_paths.csv", selected.category = c(0, 1, 2, 3, 4), interactive = T) # create interactive map of each route and export geojson_map_path(geojson.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserailZ.geojson", csv.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserail_paths.csv", selected.category = c(0, 1, 2, 3, 4), interactive = T, export.plot = T, dirOut = "C:/Rprojects/eamenaR/results/") # create profile of each route df <- geojson_addZ(geojson.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserail.geojson", dirOut = "C:/Rprojects/eamenaR/inst/extdata/") geojson_map_path(geojson.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserailZ.geojson", csv.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserail_paths.csv", selected.category = c(0, 1, 2, 3, 4), export.type = "profile") # create profile of each route and export geojson_map_path(geojson.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserailZ.geojson", csv.path = "C:/Rprojects/eamenaR/inst/extdata/caravanserail_paths.csv", selected.category = c(0, 1, 2, 3, 4), export.type = "profile", export.plot = T, fig.height = 11, fig.width = 18, dirOut = "C:/Rprojects/eamenaR/results/")