bike_daily_trips: Extract daily trip counts for all stations

Description Usage Arguments Value Examples

Description

Extract daily trip counts for all stations

Usage

1
bike_daily_trips(bikedb, city, station)

Arguments

bikedb

A string containing the path to the SQLite3 database. If no directory specified, it is presumed to be in tempdir().

city

City for which trips are to be counted - mandatory if database contains data for more than one city

station

Optional argument specifying bike station for which trips are to be counted

Value

A data.frame containing daily dates and total numbers of trips

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data_dir <- tempdir ()
bike_write_test_data (data_dir = data_dir)
# dl_bikedata (city = 'la', data_dir = '.') # or download some real data!
bikedb <- file.path (data_dir, 'testdb')
store_bikedata (data_dir = data_dir, bikedb = bikedb)
bike_daily_trips (bikedb = 'testdb', city = 'ny')

bike_rm_test_data (data_dir = data_dir)
bike_rm_db (bikedb)
# don't forget to remove real data!
# file.remove (list.files ('.', pattern = '.zip'))

mpadge/sqlite3-test documentation built on May 23, 2019, 6:24 a.m.