Writes very small test files to disk that can be used to test the package.
The entire package works by reading zip-compressed data files provided by the
various hire bicycle systems. This function generates some equivalent data
that can be read into an SQLite database by the
store_bikedata() function, so that all other package functionality can
then be tested from the resultant database. This function is also used in the
examples of all other functions.
bike_write_test_data(data_dir = tempdir())
| data_dir | Directory in which data are to be extracted. Defaults to
|
|---|
bike_write_test_data () list.files (tempdir ())#> [1] "bikedata.Rcheck" #> [2] "file1a414dc88179.error" #> [3] "libloc_169_8f48fc7d1db1bb3e.rds" #> [4] "libloc_174_173b0d0583319ed2.rds" #> [5] "libloc_180_a38f7d5813344af9.rds" #> [6] "libloc_197_5b8cfcef8f46583c.rds" #> [7] "repos_https%3A%2F%2Fcran.wu.ac.at%2Fsrc%2Fcontrib.rds" #> [8] "Rprofile-devtools" #> [9] "sample-cabi-dc-trips-history-data.zip" #> [10] "sample-citibike-tripdata.zip" #> [11] "sample-divvy-trips.zip" #> [12] "sample-hubway-trip-data.zip" #> [13] "sample-JourneyDataExtract-london.csv.zip" #> [14] "sample-la-metro.zip" #> [15] "temp_libpath1a416ef835e2"#> [1] 6bike_write_test_data (data_dir = '.') list.files ()#> [1] "bike_daily_trips.html" #> [2] "bikedata.html" #> [3] "bike_datelimits.html" #> [4] "bike_db_totals.html" #> [5] "bike_demographic_data.html" #> [6] "bike_latest_files.html" #> [7] "bike_rm_db.html" #> [8] "bike_rm_test_data.html" #> [9] "bike_stations.html" #> [10] "bike_summary_stats.html" #> [11] "bike_test_data.html" #> [12] "bike_tripmat.html" #> [13] "bike_write_test_data.html" #> [14] "dl_bikedata.html" #> [15] "index.html" #> [16] "sample-cabi-dc-trips-history-data.zip" #> [17] "sample-citibike-tripdata.zip" #> [18] "sample-divvy-trips.zip" #> [19] "sample-hubway-trip-data.zip" #> [20] "sample-JourneyDataExtract-london.csv.zip" #> [21] "sample-la-metro.zip" #> [22] "store_bikedata.html"#> [1] 6