class: center, middle, inverse, title-slide # VETravelDemandMM Package Overview ## for VisionEval Contribution Review ### Liming Wang ### September 13, 2017 --- <style> @page { size: 1210px 681px; margin: 0; } @media print { .remark-slide-scaler { width: 100% !important; height: 100% !important; transform: scale(1) !important; top: 0 !important; left: 0 !important; } } </style> # Outline - Movitations and Objectives - Methods and Model Structure - Implementation and Documentation - Code Repository and Automated Tests --- # Motivations and Objectives - Better representation of multi-modal travel of households - Updating models with the latest and best data available - modeling Annual Average Daily VMT instead of Daily VMT by taking advantage of annual VMT in NHTS2009 - Rigorous selection and benchmark of different model structures; - Taking advantage of R infrastructure and new packages --- # Methods and Model Structure - GreenSTEP/RSPM Daily VMT (DVMT) Models: 2-step models 1. binomial logit ZeroDVMT 2. power-transformed linear regression of DVMT (for DVMT > 0) - GreenSTEP/RSPM Trips by alternative modes: hurdle models - Annual Average Daily VMT (AADVMT) Model: two alternative structures - power-transformed linear regression of AADVMT - Trip-frequncy-length by (non-driving) modes: 2-step models 1. hurdle model of trip Frequncies by modes (transit, walk, and bike) 2. power-transformed linear regression of average trip length - Daily person mile traveled (DPMT) by (non-driving) modes models - hurdle models of DPMT by modes (transit, walk, and bike) --- # Implementation - Utilizes the `tidyverse` suite of packages for efficiency, concision and readability; uses functional programming with the `purrr` package when feasible - Uses the `predict` method dispatch of R model objects for prediction, [simplifying code complexity](https://github.com/cities-lab/VETravelDemandMM/blob/master/R/PredictAADVMT.R) - Conforms to the recommendations in [Section 8 Module](https://github.com/gregorbj/VisionEval/blob/master/api/model_system_design.md#8-modules), in term of both required elements and the directories and files layout - Closely sticks to [VisionEval's R style guide](https://github.com/gregorbj/VisionEval/blob/master/api/Coding_Guidelines.md) --- # Documentation The module is documented in various format: 1. Manual for each R function in the module with Roxgen2 document strings; 1. Vignettes (including this document) that provide a long form document of the package; 1. Code and comments for estimation scripts; 1. Project reports and a manuscript under review of publication --- # Code Repository - Code as a R package available on github: https://github.com/cities-lab/VETravelDemandMM - Size: currently at < 30Mb, - 25.3Mb data, with the model objects for 9 models take up most of the space - ~2Mb external data, ~~PlaceType.Rda taking up most~~ --- # Automated Tests Automated tests of the package including: - package check with `devtools::check()`, - package build and installation with `R CMD INSTALL`, and - test of module runs with `visioneval::testModule()` in `tests/scripts/test.R` (with the Rogue Valley data). - `checkModuleOutputs` provided by `testModule` checks outputs against specification of each model in automated tests of the package. Automated tests are handled by [Travis-CI](https://travis-ci.org/) and the current status of automated tests for the package is [![Travis-CI Build Status](https://travis-ci.org/cities-lab/VETravelDemandMM.svg)](https://travis-ci.org/cities-lab/VETravelDemandMM). --- # Additional Documents - [Introduction vignette](https://cities-lab.github.io/VETravelDemandMM/Intro.html) - [Responses to VisionEval Contribution Review Criteria](https://cities-lab.github.io/VETravelDemandMM/Review.html) - [SPR 788 Project Report for Task 2 Model Design and Estimation Report](https://cities-lab.github.io/SPR788/Task2_Report.html) - [SPR 788 Project Report for Task 3 VETravelDemand (VisionEval Travel Demand) Implementation](https://cities-lab.github.io/SPR788/Task3_Report.html) - [SPR 788 Project Report for Task 4 Model Testing](https://cities-lab.github.io/SPR788/Task4_Report.html) - [Development of a Multi-modal Travel Demand Module for the Regional Strategic Planning Model (manuscript under review)](https://www.dropbox.com/s/y594fz44achoqkq/jtlu_rspm.pdf?dl=0)