This is a program for generating a report that visualizes the statistical significance of specified National Household Travel Survey estimates across years. The proof of concept available here can be previewed online and rendered yourself using the instructions below.
The report computes interval estimates at a 95% confidence level and visualizes significant changes from 2001 to 2017 using a crosstab table visualization with nested line charts. Separately, interactive bar charts for each year's estimates are available for review and magnification. Learn more about the background and methodology for this report by reviewing a poster created for the 2018 National Household Travel Survey Workshop.
You can use the provided text configuration file, estimates.csv, to specify your own statistics. Before tinkering with configuring estimates, we recommend you follow these steps to reproduce this demo report on your own computer:
library(summarizeNHTS)
download_nhts_data(dataset="2001", exdir="C:/NHTS")
download_nhts_data(dataset="2009", exdir="C:/NHTS")
download_nhts_data(dataset="2017", exdir="C:/NHTS")
Copy the files in this directory to a local directory on your computer (for example, "C:/NHTS/multi_year_report_generator")
Copy each derived variable file from the "derived variable files" directory to its respective year csv data directories (for example, "C:/NHTS/csv/2017" for 2017 if the download_nhts_data() directory specified was "C:/NHTS")
Now generate the report using either option:
rmarkdown::render(
input = "C:/NHTS/multi_year_report_generator/report.Rmd",
params = list(
csv_file_location = "C:/NHTS"
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.