View source: R/graph-and-ergm-fcns.R
Apply flow filters to a graph, as generated from sfg2gh
and spatialized with
spatialize.graph
. Crops to bounds.sf, filters by distance, total trips, and flow
strength based on parameters. Note that cropping to bounds sf is done to retain
edges that start outside of map area but ends within. This is done by cropping by
edges, which also creates a number of unnamed/NA-named nodes, which are artifacts
of nodes outside of cropping area when edges are partially inside.
1 2 3 4 5 6 7 8 9 10 | apply.flow.filters(
gh,
tie.str.drop.deciles = 5,
directed = F,
frame.sf = NULL,
min.tie.str = NULL,
min.flows = 10,
max.dst = units::set_units(10, "miles"),
...
)
|
gh |
a graph, as setup by |
tie.str.drop.deciles |
If not null, number of deciles of tie str to keep after all other trims |
directed |
whether to leave directed or make undirected (which aggregates trips to/from the same tracts, rather than duplicating the O-D pair for each direction.) |
frame.sf |
an |
min.tie.str |
If not null, floor for tie strength |
min.flows |
minimum flows |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.