g <- sf::read_sf(system.file("extdata/new_hope.gpkg", package = "hydroloom"))
test_flowline <- add_toids(g)
# use NHDPlus attributes directly
add_levelpaths(test_flowline,
name_attribute = "GNIS_ID",
weight_attribute = "ArbolateSu")
# use hy attributes where they can be mapped
add_levelpaths(hy(test_flowline),
name_attribute = "GNIS_ID",
weight_attribute = "arbolate_sum")
Run the code above in your browser using DataLab