Description Usage Arguments Value Examples
This function allows you to change the origins and destination of flows stored into a dataframe to simulate a finger-plan urban model. Cities containing railroad station are designed as candidate and flows (origins and destinations) are moved from non-candidate cities to the nearest candidate cities (using osm network)
1 | finger_plan(pol, idpol, cand, tabflows, idori, iddes, idflow)
|
pol |
An sf object of the cities |
idpol |
A character string of the column containing the id of the pol object |
cand |
A character string of the column containing binary (1, 0) candidate value of the pol object (1 must be equal to city containing a railroad station) |
tabflows |
A data.frame of flows between origins and destinations (long format matrix containing, at least, origins, destinations, flows) |
idori |
A character string giving the origin field name in tabflows |
iddes |
A character string giving the destination field name in tabflows |
idflow |
A character string giving the flow field name in tabflows |
A data.frame of flows as tabflows with origins and destinations changed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Import data
idpol <- "idpol"
cand <- "cand"
data(polL93)
data(tabflows)
idori <- "ORI"
iddes <- "DES"
idflow <- "FLOW"
polL93$cand <- sample(0:1, size = nrow(polL93), replace = TRUE)
fg_flows <- finger_plan(
pol = polL93,
idpol = idpol,
cand = cand,
tabflows = tabflows,
idori = idori,
iddes = iddes,
idflow = idflow)
fg_flows[1:10,]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.