trashbirdecology / bbsAssistant

An R package for downloading and handling data and information from the North American Breeding Bird Survey.
Creative Commons Zero v1.0 Universal
27 stars 13 forks source link

Wisconsin's zip file in data/region_codes.rds does not match name on FTP server #55

Closed mbjoseph closed 4 years ago

mbjoseph commented 4 years ago

Describe the bug

The name of the zip file for Wisconsin's data appears to differ between the FTP server (Wiscons.zip at ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/States), and the data/region_codes.rds file (Wisons.zip), causing the get_bbsData() function to fail when trying to access data for Wisconsin.

To Reproduce

library(bbsAssistant)
data("region_codes")

region_filename <- region_codes$zip_states[region_codes$State == "WISCONSIN"]
print(region_filename)
#> [1] "Wisons.zip"

bbs_data <- get_bbsData(file = region_filename)
#> Warning in download.file(ZipName, temp, quiet = FALSE): cannot open URL
#> 'ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/States/Wisons.zip':
#> FTP status was '550 Requested action not taken; file unavailable'
#> Error in download.file(ZipName, temp, quiet = FALSE): cannot open URL 'ftp://ftpext.usgs.gov/pub/er/md/laurel/BBS/DataFiles/States/Wisons.zip'

Created on 2019-08-16 by the reprex package (v0.3.0)

Expected behavior

Expected the BBS data for Wisconsin to be downloaded.

Session info

─ Session info ─────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.6.1 (2019-07-05)
 os       Ubuntu 18.04.3 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language en_US                       
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/Denver              
 date     2019-08-16                  

─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────
 package     * version date       lib source        
 assertthat    0.2.1   2019-03-21 [1] CRAN (R 3.6.0)
 callr         3.3.1   2019-07-18 [1] CRAN (R 3.6.1)
 cli           1.1.0   2019-03-19 [1] CRAN (R 3.6.0)
 clipr         0.7.0   2019-07-23 [1] CRAN (R 3.6.1)
 crayon        1.3.4   2017-09-16 [1] CRAN (R 3.6.0)
 digest        0.6.20  2019-07-04 [1] CRAN (R 3.6.1)
 evaluate      0.14    2019-05-28 [1] CRAN (R 3.6.0)
 fs            1.3.1   2019-05-06 [1] CRAN (R 3.6.0)
 htmltools     0.3.6   2017-04-28 [1] CRAN (R 3.6.0)
 knitr         1.24    2019-08-08 [1] CRAN (R 3.6.1)
 packrat       0.5.0   2018-11-14 [1] CRAN (R 3.6.0)
 processx      3.4.1   2019-07-18 [1] CRAN (R 3.6.1)
 ps            1.3.0   2018-12-21 [1] CRAN (R 3.6.0)
 R6            2.4.0   2019-02-14 [1] CRAN (R 3.6.0)
 Rcpp          1.0.2   2019-07-25 [1] CRAN (R 3.6.1)
 reprex        0.3.0   2019-05-16 [1] CRAN (R 3.6.0)
 rlang         0.4.0   2019-06-25 [1] CRAN (R 3.6.1)
 rmarkdown     1.14    2019-07-12 [1] CRAN (R 3.6.1)
 rstudioapi    0.10    2019-03-19 [1] CRAN (R 3.6.0)
 sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 3.6.0)
 whisker       0.3-2   2013-04-28 [1] CRAN (R 3.6.0)
 withr         2.1.2   2018-03-15 [1] CRAN (R 3.6.0)
 xfun          0.8     2019-06-25 [1] CRAN (R 3.6.1)

[1] /home/max/R/x86_64-pc-linux-gnu-library/3.6
[2] /usr/local/lib/R/site-library
[3] /usr/lib/R/site-library
[4] /usr/lib/R/library

Additional context

I checked all other regions that have data and this seems to be the only one where the filenames don't match. Maybe also related to the recent BBS data update?

trashbirdecology commented 4 years ago

@mbjoseph , thanks for letting me know, We will update this asap!

trashbirdecology commented 4 years ago

@mbjoseph , this typo was resolved. Please reinstall the package to update the changes in data("region_codes").

Thanks a lot!

mbjoseph commented 4 years ago

Great -- thanks!