Giter VIP home page Giter VIP logo

demand's Introduction

MATSim population for Melbourne

masterpassing? devpassing?

This script generates a sample population for Melbourne based on the ABS 2016 census and using VISTA-like activities and trips.

Setup R

The population generation code (in the ./R directory) is written in R and a working knowledge of R is assumed here.

We use renv to manage the R package dependencies for this project. To install the required R packages locally inside this repository, do:

install.packages("renv")
renv::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.

How to get the Melbourne Data

Download the required data files for generating the population and place them into ./data. For download instructions see ./data/README.md.

How to build a sample Melbourne population

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.

How to build a sample population for inner Melbourne:

Here is an example of how to build a small sample population (0.1%) for inner Melbourne with census-like persons and VISTA-like activities and trips, for weekdays:

Rscript -e 'setwd("R"); source("makeExamplePopulation.R"); runexample(samplePercent=0.1,outputDir="example_inner_melbourne",sa1Subset="../data/smallRegion.csv,allDestinations=FALSE,do.steps=c(T,T,T,T,T,T,T,T))'

Troubleshooting Windows installations

RTools is required in order to compile some libraries.

Udunits2 may be required to get the sf library to work:

install.packages("udunits2")

If there are still issues with the sf package, try installing the development version:

install.packages("remotes")
library(remotes)
install_github("r-spatial/sf")

demand's People

Contributors

dhixsingh avatar alanboth avatar jafshin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.