View source: R/graph-and-ergm-fcns.R
From a origin-destination data.frame representing safegraph data, turn it into a
tidygraph object. Assumes origin
, dest
, and n
columns. Also attaches
geometry and calculates "normalized connectedness," which will be different if
it's made undirected or left directed.
1 |
sfg |
OD dataframe |
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.) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.