ropensci / bikedata

:bike: Extract data from public hire bicycle systems
https://docs.ropensci.org/bikedata
81 stars 16 forks source link

Issue downloading 2020 data from london #105

Closed geospatialmik closed 3 years ago

geospatialmik commented 3 years ago

loading the package

library(bikedata)

the database where the trip info will be saved into

bikedb <- file.path (tempdir (), "bikedb") # or whatever

downloads individual trip data from the london system coded as 'lo'

dl_bikedata(city = 'lo', dates = 2020, quiet = TRUE)

Error in curl::curl_fetch_disk(url, x$path, handle = handle) :

Failed writing body (5050 != 16366)

The same process with data from different years works fine, even with 2021 data

mpadge commented 3 years ago

Thanks @geospatialmik, that one was at least pretty easy to fix. London data has some years with 2 digits only, and once 2020 arrived, the 2-digit form of "20" matched every single year. That commit fixes, so you should now see this:

dl_bikedata(city = "lo", dates = 2020, data_dir = data_dir, quiet = FALSE)
#>  [1] "Downloading 195JourneyDataExtract01Jan2020-07Jan2020.csv"
#>  [2] "Downloading 196JourneyDataExtract08Jan2020-14Jan2020.csv"
#>  [3] "Downloading 197JourneyDataExtract15Jan2020-21Jan2020.csv"
#>  [4] "Downloading 198JourneyDataExtract22Jan2020-28Jan2020.csv"
#>  [5] "Downloading 199JourneyDataExtract29Jan2020-04Feb2020.csv"
#>  [6] "Downloading 200JourneyDataExtract05Feb2020-11Feb2020.csv"
#>  [7] "Downloading 201JourneyDataExtract12Feb2020-18Feb2020.csv"
#>  [8] "Downloading 202JourneyDataExtract19Feb2020-25Feb2020.csv"
#>  [9] "Downloading 203JourneyDataExtract26Feb2020-03Mar2020.csv"
#> [10] "Downloading 204JourneyDataExtract04Mar2020-10Mar2020.csv"
#> [11] "Downloading 205JourneyDataExtract11Mar2020-17Mar2020.csv"
#> [12] "Downloading 206JourneyDataExtract18Mar2020-24Mar2020.csv"
#> [13] "Downloading 207JourneyDataExtract25Mar2020-31Mar2020.csv"
#> [14] "Downloading 208JourneyDataExtract01Apr2020-07Apr2020.csv"
#> [15] "Downloading 209JourneyDataExtract08Apr2020-14Apr2020.csv"
#> [16] "Downloading 210JourneyDataExtract15Apr2020-21Apr2020.csv"
#> [17] "Downloading 211JourneyDataExtract22Apr2020-28Apr2020.csv"
#> [18] "Downloading 212JourneyDataExtract29Apr2020-05May2020.csv"
#> [19] "Downloading 213JourneyDataExtract06May2020-12May2020.csv"
#> [20] "Downloading 214JourneyDataExtract13May2020-19May2020.csv"
#> [21] "Downloading 215JourneyDataExtract20May2020-26May2020.csv"
#> [22] "Downloading 216JourneyDataExtract27May2020-02Jun2020.csv"
#> [23] "Downloading 217JourneyDataExtract03Jun2020-09Jun2020.csv"
#> [24] "Downloading 218JourneyDataExtract10Jun2020-16Jun2020.csv"
#> [25] "Downloading 219JourneyDataExtract17Jun2020-23Jun2020.csv"
#> [26] "Downloading 220JourneyDataExtract24Jun2020-30Jun2020.csv"
#> [27] "Downloading 221JourneyDataExtract01Jul2020-07Jul2020.csv"
#> [28] "Downloading 222JourneyDataExtract08Jul2020-14Jul2020.csv"
#> [29] "Downloading 223JourneyDataExtract15Jul2020-21Jul2020.csv"
#> [30] "Downloading 224JourneyDataExtract22Jul2020-28Jul2020.csv"
#> [31] "Downloading 225JourneyDataExtract29Jul2020-04Aug2020.csv"
#> [32] "Downloading 226JourneyDataExtract05Aug2020-11Aug2020.csv"
#> [33] "Downloading 227JourneyDataExtract12Aug2020-18Aug2020.csv"
#> [34] "Downloading 228JourneyDataExtract19Aug2020-25Aug2020.csv"
#> [35] "Downloading 229JourneyDataExtract26Aug2020-01Sep2020.csv"
#> [36] "Downloading 230JourneyDataExtract02Sep2020-08Sep2020.csv"
#> [37] "Downloading 231JourneyDataExtract09Sep2020-15Sep2020.csv"
#> [38] "Downloading 232JourneyDataExtract16Sep2020-22Sep2020.csv"
#> [39] "Downloading 233JourneyDataExtract23Sep2020-29Sep2020.csv"
#> [40] "Downloading 234JourneyDataExtract30Sep2020-06Oct2020.csv"
#> [41] "Downloading 235JourneyDataExtract07Oct2020-13Oct2020.csv"
#> [42] "Downloading 236JourneyDataExtract14Oct2020-20Oct2020.csv"
#> [43] "Downloading 237JourneyDataExtract21Oct2020-27Oct2020.csv"
#> [44] "Downloading 238JourneyDataExtract28Oct2020-03Nov2020.csv"
#> [45] "Downloading 239JourneyDataExtract04Nov2020-10Nov2020.csv"
#> [46] "Downloading 240JourneyDataExtract11Nov2020-17Nov2020.csv"
#> [47] "Downloading 241JourneyDataExtract18Nov2020-24Nov2020.csv"
#> [48] "Downloading 242JourneyDataExtract25Nov2020-01Dec2020.csv"
#> [49] "Downloading 243JourneyDataExtract02Dec2020-08Dec2020.csv"
#> [50] "Downloading 244JourneyDataExtract09Dec2020-15Dec2020.csv"
#> [51] "Downloading 245JourneyDataExtract16Dec2020-22Dec2020.csv"
#> [52] "Downloading 246JourneyDataExtract23Dec2020-29Dec2020.csv"
#> [53] "Downloading 246JourneyDataExtract30Dec2020-05Jan2021.csv"

Created on 2021-03-25 by the reprex package (v1.0.0)

I'm working on getting this package back on to CRAN soon.

geospatialmik commented 3 years ago

Thank you for resolving the issue!