Estimate flows of people from snapshots using the method of [Akagi2018].
There are two parts to this package
- a fake data generator
- an estimator
A couple IPython notebooks are included as demonstrations. One of these generates fake data and attempts to recover the underlying parameters. It is most useful for demonstration and testing.
Another is designed to run on real world data. It requires the user to supply additional data: counts of people in New Zealand SA2 regions and properties of those regions. The later information is available from StatsNZ:
We have assumed that the centroid-to-centroid distance separating regions is an appropriate metric. In principle, the user can specify an arbitrary distance measure on the space, allowing distances to be set by actual driving time, non-local travel via airports, or even asymmetry during commutes.
There are still some rough edges and there may be more corner cases to be taken care of.
The package is available on pypi.org.
pip install flowstock
pytest
To run tests during the install process,
pip install --install-option test flowstock
A conda environment specification is included. This environment has been tested on Linux and OS X.
conda env create -f environment.yml
conda activate flowstock
pip install -e .
pytest
[Akagi2018] |
|