apply.flow.filters: apply.flow.filters

Description Usage Arguments

View source: R/graph-and-ergm-fcns.R

Description

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.

Usage

 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"),
  ...
)

Arguments

gh

a graph, as setup by sfg2gh

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 sf object to crop to and use CRS from. Nodes outside the bbox of this area will be trimmed. Defaults to Lambert conformal conic projection if left null. (Why do I have all this complexity instead of just using coord_sf when mappi ng? Think I need to revise.. I think b/c i felt it allowed for more controlled trimming but..)

min.tie.str

If not null, floor for tie strength

min.flows

minimum flows


kmcd39/divflow documentation built on Dec. 21, 2021, 7:38 a.m.