View source: R/function_PlotSubbasinRouting.R
PlotSubbasinRouting | R Documentation |
Plot routing of subbasins for a HYPE model on an interactive map.
PlotSubbasinRouting(
map,
map.subid.column = 1,
gd = NULL,
bd = NULL,
plot.scale = TRUE,
plot.searchbar = FALSE,
weight = 0.5,
opacity = 1,
fillColor = "#4d4d4d",
fillOpacity = 0.25,
line.weight = 5,
line.opacity = 1,
seed = NULL,
darken = 0,
font.size = 10,
file = "",
vwidth = 1424,
vheight = 1000,
html.name = ""
)
map |
Path to file containing subbasin polygon GIS data (e.g. shapefile or geopackage) or a |
map.subid.column |
Integer, column index in the |
gd |
Path to model GeoData.txt or a GeoData object from |
bd |
Path to model BranchData.txt or a BranchData object from |
plot.scale |
Logical, include a scale bar on the map. |
plot.searchbar |
Logical, if |
weight |
Numeric, weight of subbasin boundary lines. See |
opacity |
Numeric, opacity of subbasin boundary lines. See |
fillColor |
String, color of subbasin polygons. See |
fillOpacity |
Numeric, opacity of subbasin polygons. See |
line.weight |
Numeric, weight of routing lines. See |
line.opacity |
Numeric, opacity of routing lines. See |
seed |
Integer, seed number to to produce repeatable color palette. |
darken |
Numeric specifying the amount of darkening applied to the random color palette. Negative values will lighten the palette. See |
font.size |
Numeric, font size (px) for map subbasin labels. |
file |
Save map to an image file by specifying the path to the desired output file using this argument. File extension must be specified.
See |
vwidth |
Numeric, width of the exported map image in pixels. See |
vheight |
Numeric, height of the exported map image in pixels. See |
html.name |
Save map to an interactive HTML file by specifying the path to the desired output file using this argument. File extension must be specified.
See |
PlotSubbasinRouting
generates an interactive Leaflet map with lines indicating the routing of flow between subbasins. GeoData information only needs
to be provided if the map
GIS data does not include SUBID and/or MAINDOWN fields. BranchData information only needs to be provided if model has a
BranchData.txt file. Subbasin routing lines are randomly assigned a color using distinctColorPalette
.
Returns an interactive Leaflet map.
## Not run:
PlotSubbasinRouting(
map = system.file("demo_model",
"gis", "Nytorp_map.gpkg",
package = "HYPEtools"
),
gd = system.file("demo_model", "GeoData.txt", package = "HYPEtools"),
map.subid.column = 25
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.