Closed tbuckl closed 6 years ago
closing until tests pass
hey @mpadge i ran tests on this locally and they all passed.
i'm reopening this because this works now:
library (bikedata)
store_bikedata (city = 'sf', bikedb = 'bikedb')
tm <- bike_tripmat (bikedb = 'bikedb', city='sf')
dim (tm); format (sum (tm), big.mark = ',')
bike_summary_stats (bikedb = 'bikedb')
daily_trips_sf <- bike_daily_trips (bikedb = 'bikedb', city = 'sf')
library(ggplot2)
qplot(x=date, y=numtrips,
data=daily_trips_sf, na.rm=TRUE,
main="Daily trips for SF Bikeshare (2017-2018)",
xlab="Date", ylab="Number of Trips")+geom_line()
and that use seems useful/consistent enough with the docs. but what do you think?
it could be that dl_bikedata just shouldn't be exported?
That looks great - i'll have time tomorrow to go through it and merge. Thanks a load in advance for the great work!
hey @mpadge this seems like a solution/addition for sf with a potential bug introduction. totally understand that you'll want to understand the bug below more before merge.
Solution
You can do the following now:
and you get stations and trips for la.
you can also then load other cities e.g. boston:
Bug
unfortunately, i did notice that if you do this:
Then store bikedata starts to try to load 11 CSV files. There are only 4 for 'sf' so far.
Then the R session crashes. It seems that store_bikedata looks for all CSV files.
I guess there are a few options here:
1) fix the way that store_bikedata works on CSV's? 2) tell people specifically not to download a bunch of csv's for 2 providers and then just process 1?
probably (1) is ideal. i'll look into it a bit.