This package is in its early versions of development, it aims at providing a set of fast, efficient functions to perform Gravity models in the context of spatial interaction modelling. Currently, the doubly constrained model is implemented and future versions will aim to implement origin and destination constraints as well. It was developed in the context of studying commuter flows by active travel (cycling & walking ) in Great Britain as part of a project at CASA, UCL.
Installation
Not yet on CRAN, so please install the development version of cppSim
with:
# install.packages("devtools")
devtools::install_github("ischlo/cppSim")
Built in data sets
The package comes with sample data sets that allow to test the functions right away as well as see the type of input that is recommended.
- flows_test : using the official census data in England from 2011, it’s a 983x983 matrix representing the flows of cyclists and pedestrians from each to each MSOA in London.
- distance_test : the distances between centroids of MSOAs. Computed with the London road network from OpenStreetMap and using the
cppRouting
package.