Skip to content

Household Travel Survey App

Suzanne Childress edited this page Jan 28, 2021 · 11 revisions

The Household Travel Survey App is a web application for exploring and visualizing summarized data related to travel behavior, and household and respondent characteristics.

What time period does the data cover?

The app includes data from the 2017 and 2019 household travel surveys, in a combined way.

What can you see in the app?

The app contains two tools, one that generates a 'Simple Table' and another called the 'Crosstab Generator'. The later allows users to select two variables that exist in the data to produce a cross-tabulated summary.

Not all variables in the household travel survey are available for selection. We've curated a list of ones that we believe users are most interested in and ones that are most requested for narratives.

Either table type produces the following types of summaries:

  • shares (%),
  • total (weighted estimates),
  • margin of error for shares (%),
  • margin of error for totals (weighted estimates),
  • and the sample count of responses.

What does the app run on?

RStudio's Shiny library.

How do I run this app locally?

The app is currently in beta and being tested on our internal server; however, one can still run the app on their local machine. Simply set up the following:

  1. Download and install the latest version of R code
  2. Download and install the RStudio IDE (RStudio Desktop)
  3. Install the following packages via the RStudio IDE console: install.packages(c("shiny", "shinythemes", "data.table", "tidyverse", "DT", "openxlsx", "plotly", "shinyjs", "htmltools"))
  4. For PSRC Staff: Copy the files listed below from J:\Projects\Surveys\HHTravel\Survey2017\Data\travel_crosstab\for_shiny_app into the travel-study-stories/data 'master' branch part of the repo
  5. For Non-PSRC Staff: obtain the following files and place into travel-study-stories/data 'master' branch part of the repo
  • person.csv
  • trip.csv
  • variables.csv (our curated list, which includes their alias, subject category, detailed info, and the data file that they are associated with)
  • variables_values.csv (variables containing categorical values that should be displayed in a specific order that is not alphabetical)
  • readme.xlsx
  • about_page.md
  1. In global.R comment out lines 17 and 18 containing the objects wrkdir and data.dir. Uncomment lines 13 and 14 and replace existing paths with a customized path to where the shiny and data sub-directories of your repo are located.

I'm an Author and/or Maintainer, how do I load/update the app on our internal shiny server?

These details will be posted on the wiki page of our Microsoft Teams: Household Travel Survey, channel: Shiny app UI and data. See the admins for access to the Team.