x— title: “Setup for Divvy data analysis” author: “Peter Carbonetto” output: html_document —

Last updated: 2018-03-12

Code version: 34aee10

To reproduce the results on your own computer, please follow these setup instructions.

Setup instructions

Download or clone the git repository on your computer.

Download the Divvy data files and copy the files to the “data” directory. I have provided a script code/retrieve_divvy_data.sh that will automatically retrieve the data files and move them to the expected location. Alternatively, you can view this script and follow the steps by hand. After completing this step, these files should be in the data directory:

Divvy_Stations_2016_Q1Q2.csv
Divvy_Stations_2016_Q3.csv
Divvy_Stations_2016_Q4.csv
Divvy_Trips_2016_04.csv
Divvy_Trips_2016_05.csv
Divvy_Trips_2016_06.csv
Divvy_Trips_2016_Q1.csv
Divvy_Trips_2016_Q3.csv
Divvy_Trips_2016_Q4.csv

Install R and/or Rstudio.

Install the R packages used for the analyses:

install.packages(c("data.table","ggplot2"))

Once you have completed these steps, you may run the R code. When running the code, make sure your working directory is set to the “analysis” directory, e.g.,

getwd()
# [1] "/Users/pcarbo/git/wflow-divvy/analysis"

Session information

This is the version of R and the packages that were used to generate the results from the R Markdown documents.

sessionInfo()
# R version 3.4.3 (2017-11-30)
# Platform: x86_64-apple-darwin15.6.0 (64-bit)
# Running under: macOS High Sierra 10.13.3
# 
# Matrix products: default
# BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
# LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
# 
# locale:
# [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
# 
# attached base packages:
# [1] stats     graphics  grDevices utils     datasets  methods   base     
# 
# loaded via a namespace (and not attached):
#  [1] compiler_3.4.3  backports_1.1.2 magrittr_1.5    rprojroot_1.3-2
#  [5] tools_3.4.3     htmltools_0.3.6 yaml_2.1.18     Rcpp_0.12.15   
#  [9] stringi_1.1.6   rmarkdown_1.9   knitr_1.20      git2r_0.21.0   
# [13] stringr_1.3.0   digest_0.6.15   evaluate_0.10.1

This R Markdown site was created with workflowr 0.10.1.