Distances on Directed Graphs in R
at main 60 lines 1.9 kB view raw
1% Generated by roxygen2: do not edit by hand 2% Please edit documentation in R/flowmap.R 3\name{dodgr_flowmap} 4\alias{dodgr_flowmap} 5\title{Create a map of \code{dodgr} flows.} 6\usage{ 7dodgr_flowmap(net, bbox = NULL, linescale = 1) 8} 9\arguments{ 10\item{net}{A street network with a \code{flow} column obtained from 11\link{dodgr_flows_aggregate} or \link{dodgr_flows_disperse}} 12 13\item{bbox}{If given, scale the map to this bbox, otherwise use entire extend 14of \code{net}} 15 16\item{linescale}{Maximal thickness of plotted lines} 17} 18\value{ 19Nothing; called for side-effect of producing plot. 20} 21\description{ 22Create a map of the output of \link{dodgr_flows_aggregate} or 23\link{dodgr_flows_disperse} 24} 25\note{ 26\code{net} should be first passed through \code{merge_directed_graph} 27prior to plotting, otherwise lines for different directions will be overlaid. 28} 29\examples{ 30graph <- weight_streetnet (hampi) 31from <- sample (graph$from_id, size = 10) 32to <- sample (graph$to_id, size = 5) 33to <- to [!to \%in\% from] 34flows <- matrix ( 35 10 * runif (length (from) * length (to)), 36 nrow = length (from) 37) 38graph <- dodgr_flows_aggregate (graph, from = from, to = to, flows = flows) 39# graph then has an additonal 'flows` column of aggregate flows along all 40# edges. These flows are directed, and can be aggregated to equivalent 41# undirected flows on an equivalent undirected graph with: 42graph_undir <- merge_directed_graph (graph) 43\dontrun{ 44dodgr_flowmap (graph_undir) 45} 46} 47\seealso{ 48Other misc: 49\code{\link{compare_heaps}()}, 50\code{\link{dodgr_full_cycles}()}, 51\code{\link{dodgr_fundamental_cycles}()}, 52\code{\link{dodgr_insert_vertex}()}, 53\code{\link{dodgr_sample}()}, 54\code{\link{dodgr_sflines_to_poly}()}, 55\code{\link{dodgr_vertices}()}, 56\code{\link{merge_directed_graph}()}, 57\code{\link{summary.dodgr_dists_categorical}()}, 58\code{\link{write_dodgr_wt_profile}()} 59} 60\concept{misc}