-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tidy framework and data.table operations #13
Comments
Good question. In my experience OD data processing and modelling, including SIMs, are seldom computationally intensive relative to other parts of transport modelling and analysis workflows including routing and visualisation, so no plans at present. The priority currently is to get it somewhere close to a minimum viable product for a user friendly SIM package, as per #5 but happy to revisit this at some point later down the line. Also, because remotes::install_github("robinlovelace/si")
#> Using github PAT from envvar GITHUB_PAT
#> Skipping install of 'si' from a github remote, the SHA1 (b1e2c250) has not changed since last install.
#> Use `force = TRUE` to force installation
library(si)
# ?si_predict
od = si_to_od(si_zones, si_zones, max_dist = 4000)
#> 1695 OD pairs remaining after removing those with a distance greater than 4000 meters:
#> 15% of all possible OD pairs
m = lm(od$origin_all ~ od$origin_bicycle)
od_updated = si_predict(od, m)
class(od_updated)
#> [1] "sf" "data.frame"
od_dt = data.table::data.table(od)
class(od_dt)
#> [1] "data.table" "data.frame"
od_updated_dt = si_predict(od_dt, m)
class(od_updated_dt)
#> [1] "data.table" "data.frame"
identical(od_updated$interaction, od_updated_dt$interaction)
#> [1] TRUE Created on 2022-04-25 by the reprex package (v2.0.1) Do you have a use case, or ideally a reproducible example, where better support for |
Thanks for the clarification, Robin. I believe |
Agreed, low priority area. If it does come in useful would be more likely in the |
Hi Robin. The package is shaping really nicely and it's aligned with an idea I've been thinking about related to spatial interaction models and accessibility (perhaps a topic for a chat in the future). I just wanted to ask whether package will be exclusively built on top of a tidy framework, or whether it could also use some
data.table
operations under the hood to be more efficient.The text was updated successfully, but these errors were encountered: