Get names of files read into database

bike_stored_files(bikedb, city)

Arguments

bikedb

A string containing the path to the SQLite3 database.

city

Optional city for which filenames are to be obtained

Examples

data_dir <- tempdir () bike_write_test_data (data_dir = data_dir) bikedb <- file.path (data_dir, 'testdb') store_bikedata (data_dir = data_dir, bikedb = bikedb)
#> Creating sqlite3 database
#> Unzipping raw data files for bo ...
#> Reading files for bo ...
#> reading file 1/3: /tmp/Rtmp88OwDl/hubway_Trips_2012.csv #> reading file 2/3: /tmp/Rtmp88OwDl/201701-hubway-tripdata.csv #> reading file 3/3: /tmp/Rtmp88OwDl/201801_hubway_tripdata.csv
#> Trips read for bo = 600
#> Unzipping raw data files for ch ...
#> Reading files for ch ...
#> reading file 1/1: /tmp/Rtmp88OwDl/Divvy_Trips_sample.csv
#> Trips read for ch = 200
#> Unzipping raw data files for dc ...
#> Reading files for dc ...
#> reading file 1/1: /tmp/Rtmp88OwDl/2017Q1-capitalbikeshare-tripdata-temp.csv
#> Trips read for dc = 200
#> Unzipping raw data files for la ...
#> Reading files for la ...
#> reading file 1/1: /tmp/Rtmp88OwDl/la_metro_gbfs_trips_Q1_2017.csv
#> Trips read for la = 198
#> Reading files for lo ...
#> getting london stations ...
#> done
#> reading file 1/1: /tmp/Rtmp88OwDl/01aJourneyDataExtract10Jan16-23Jan16.csv
#> Trips read for lo = 200
#> Unzipping raw data files for mn ...
#> Reading files for mn ...
#> reading file 1/1: /tmp/Rtmp88OwDl/Nice_Ride_trip_history_2012_season.csv
#> Trips read for mn = 200
#> Unzipping raw data files for ny ...
#> Reading files for ny ...
#> reading file 1/1: /tmp/Rtmp88OwDl/201612-citibike-tripdata.csv
#> Trips read for ny = 200
#> Total trips read = 1,798
#> [1] 1798
files <- bike_stored_files (bikedb = bikedb) # returns a tibble with names of all stored files bike_rm_test_data (data_dir = data_dir)
#> [1] 13
bike_rm_db (bikedb)
#> [1] TRUE
# don't forget to remove real data! # file.remove (list.files ('.', pattern = '.zip'))