This script generates a sample population for Melbourne based on the ABS 2016 census and using VISTA-like activities and trips.
The population generation code (in the ./R
directory) is written in R and a working knowledge of R is assumed here.
We use packrat
to manage the R package dependencies for this project. To install the required R packages locally inside this repository, do:
install.packages("packrat")
packrat::restore()
Ensure that your setup is working by running some quick tests:
testthat::test_dir("tests/testthat")
If all tests pass, you are all set to produce a sample Melbourne population using the steps below.
Download the required data files for generating the population and place them into ./data
. For download instructions see ./data/README.md
.
Here is an example of how to build a small sample population (0.1%) for Melbourne with census-like persons and VISTA-like activities and trips, for weekdays:
Rscript -e 'setwd("R"); source("makeExamplePopulation.R"); runexample()'
The script is quite verbose and takes a few minutes to run. If all went well you should get the MATSim population in ./output/8.xml/plan.xml
.