View source: R/to_flownetwork.R
to_flownetwork | R Documentation |
converts an hy
object into a flownetwork with "id", "toid",
"upmain" and "downmain attributes.
to_flownetwork(x, warn_dendritic = TRUE)
x |
data.frame network compatible with hydroloom_names. |
warn_dendritic |
logical if TRUE and a dendritic |
Required attributes:
id
and toid
or fromnode
and tonode
divergence
an attribute containing 0, 1, or 2 where 0 indicates there is only one
downstream connection, 1 is the main connection downstream
of a diversion and 2 is secondary connection downstream of a diversion.
levelpath
,
integer attribute which will have one and only one matching value upstream
at a confluence.
data.frame "id", "toid", "upmain" and "downmain attributes. A check is run to ensure upmain and downmain are valid with one and only one upmain and one and only one downmain from any given network element.
f <- sf::read_sf(system.file("extdata/new_hope.gpkg", package = "hydroloom"))
to_flownetwork(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.