ropensci / GSODR

API Client for Global Surface Summary of the Day ('GSOD') Weather Data Client in R
https://docs.ropensci.org/GSODR
Other
86 stars 15 forks source link

Error with get_GSOD's first example #36

Closed choisy closed 6 years ago

choisy commented 6 years ago

Typing the first example of the get_GSOD's help produces an error:

> t <- get_GSOD(years = 2010, station = "955510-99999")
Error in .f(.x[[i]], ...) : 
955510-99999 is not a valid station ID number, please check your entry.
Valid Station IDs can be found in the isd-history.txt file
available from the US NCEI FTP server by combining the USAF and WBAN
columns, e.g., '007005' '99999' is '007005-99999' from this file 
<ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-history.txt>
adamhsparks commented 6 years ago

I was afraid of that.

Can you try the latest version I have here on GitHub? I've been testing a new version because of this. I think I've corrected the issue with version 1.1, which is not yet on CRAN.

install.packages("devtools")
devtools::install_github("ropensci/GSODR", build_vignettes = TRUE)
rsmiller74 commented 6 years ago

I had the same issue. I just tried your version on GitHub. Same problem as Choisy. Also Build_vignettes failed. But build_vignettes = FALSE allowed it to install.

Error: processing vignette 'GSODR.Rmd' failed with diagnostics: It seems you should call rmarkdown::render() instead of knitr::knit2html() because GSODR.Rmd appears to be an R Markdown v2 document. Execution halted Installation failed: Command failed (1)

adamhsparks commented 6 years ago

@rsmiller74 thanks.

Interesting that the issue is still happening with the GitHub version. I'm able to use it to generate the README.Rmd files and vignettes on-the-fly for the pkgdown documentation site.

I'll see what I can figure out.

Also thanks for the heads up on the vignettes.

adamhsparks commented 6 years ago

Hmm, using the latest version from GitHub I get this.

> t <- get_GSOD(years = 2010, station = "955510-99999")

Checking requested station file for availability on server

Downloading individual station files.

|=================================================================================|100% ~0 s remaining     
> t
# A tibble: 365 x 48
     USAF  WBAN        STNID          STN_NAME  CTRY STATE  CALL    LAT     LON ELEV_M ELEV_M_SRTM_90m
    <chr> <chr>        <chr>             <chr> <chr> <chr> <chr>  <dbl>   <dbl>  <dbl>           <dbl>
 1 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
 2 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
 3 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
 4 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
 5 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
 6 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
 7 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
 8 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
 9 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
10 955510 99999 955510-99999 TOOWOOMBA AIRPORT    AS  <NA>  <NA> -27.55 151.917    642             635
# ... with 355 more rows, and 37 more variables: BEGIN <dbl>, END <dbl>, YEARMODA <date>, YEAR <chr>,
#   MONTH <chr>, DAY <chr>, YDAY <dbl>, TEMP <dbl>, TEMP_CNT <int>, DEWP <dbl>, DEWP_CNT <int>, SLP <dbl>,
#   SLP_CNT <int>, STP <dbl>, STP_CNT <int>, VISIB <dbl>, VISIB_CNT <int>, WDSP <dbl>, WDSP_CNT <int>,
#   MXSPD <dbl>, GUST <dbl>, MAX <dbl>, MAX_FLAG <chr>, MIN <dbl>, MIN_FLAG <chr>, PRCP <dbl>,
#   PRCP_FLAG <chr>, SNDP <dbl>, I_FOG <int>, I_RAIN_DRIZZLE <int>, I_SNOW_ICE <int>, I_HAIL <int>,
#   I_THUNDER <int>, I_TORNADO_FUNNEL <int>, EA <dbl>, ES <dbl>, RH <dbl>
rsmiller74 commented 6 years ago

So I was able to get it to work but only if I ran the install with force=TRUE. If I set build_vignettes to FALSE then get_GSOD would not run.

Thanks for your quick response.

install.packages("devtools") devtools::install_github("ropensci/GSODR", build_vignettes = TRUE, force = TRUE)

adamhsparks commented 6 years ago

Thank you for the feedback. I’m working on the vignettes and hope to have a fix shortly.

-- Adam H Sparks

On 25 October 2017 at 12:20:51, rsmiller74 (notifications@github.com) wrote:

So I was able to get it to work but only if I ran the install with force=TRUE. If I set build_vignettes to FALSE then get_GSOD would not run.

Thanks for your quick response.

install.packages("devtools") devtools::install_github("ropensci/GSODR", build_vignettes = TRUE, force = TRUE)

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/ropensci/GSODR/issues/36#issuecomment-339193276, or mute the thread https://github.com/notifications/unsubscribe-auth/ADDEAp5Cl4x1uogwvcvEEbtX45qgOcjsks5svpsDgaJpZM4QAgWN .

adamhsparks commented 6 years ago

@rsmiller74, I've worked on the vignettes, aside from some other issues. Could you try installation again from GitHub using ?

devtools::install_github("ropensci/GSODR", build_vignettes = TRUE)

I'm able to install it from GitHub using this method with no warnings or errors now.

adamhsparks commented 6 years ago

Closing with release of v1.1.0