si_predict | R Documentation |
Predict spatial interaction based on pre-trained model
si_predict(
od,
model,
constraint_production,
constraint_attraction,
constraint_total,
output_col = "interaction",
...
)
od |
A data frame representing origin-destination data, e.g. as created by
|
model |
A model object, e.g. from |
constraint_production |
Character representing column in |
constraint_attraction |
Character representing column in |
constraint_total |
Single number representing the total interaction. This argument, when set, ensures that the sum of the interaction calculated will equal the value given. |
output_col |
Character string containing the name of the new output
column. |
... |
Arguments passed to |
An sf data frame
si_calculate
od = si_to_od(si_zones, si_zones, max_dist = 4000)
m = lm(od$origin_all ~ od$origin_bicycle)
od_updated = si_predict(od, m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.