
Utility function that takes the output from 'find_braids(nested = TRUE)' and unpacks/unnests braid_id column
unpack_braids.Rd
Unnests the comma separated braid_id column into individual rows for each braid ID/crosswalk_id pairing. This function will unnest the nested braid_ids column that is the output of calling 'find_braids()' with 'nested = TRUE', essentially giving the output of running 'nested = FALSE'.
Examples
if (FALSE) { # \dontrun{
# get a NHDPlus flowlines network
net <- nhdplusTools::navigate_network(start = 101, mode = "UT", distance_km = 100)
# Drop some columns for clarity
net <- dplyr::select(net, comid, divergence, fromnode, tonode)
# locate braids in the network and specify nested braid_id return
braids <- find_braids(net, add = TRUE, nested = TRUE)
# unnest the nested braid_id column (explode the list column into individual rows)
unpacked <- unpack_braids(braids)
} # }