ropensci / GSODR

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

GSODR package no longer working #108

Closed hubbarsc closed 2 years ago

hubbarsc commented 2 years ago

Hi,

I have been using the GSODR package to pull weather data from all over the world for well over a year without issue. Over the last couple days, I have been running the same code that always pulls weather data from my desired stations, but this time it's not working. For any of my weather stations. I have triple checked the station codes and they are correct. The code will run but it pulls a dataframe of 0 obs and 0 variables. Could you someone help? Thank you!

adamhsparks commented 2 years ago

Could you please provide a reproducible example?

adamhsparks commented 2 years ago

Also, have you confirmed that the data files are good at the source?

hubbarsc commented 2 years ago

Hi Adam! Thanks so much for responding. So I did confirm that the data files are good at the source. I downloaded them manually from GSOD online and then read the .csv into R and did my analyses. I am a little bit embarrassed because I just re-ran the code and, of course, it did work. However, I have been trying to run this very simple code all week and it wasn't working up until now. And I haven't changed related to the version of R studio I am using. I was running the simple code below:

hubbarsc commented 2 years ago

library(GSODR) weather <- get_GSOD(2021:2022, station= "672970-99999")

hubbarsc commented 2 years ago

This code pulls weather data for Beira, Mozambique. It is running now though! Sorry to waste your time.

adamhsparks commented 2 years ago

cheers!

hubbarsc commented 2 years ago

Oddly, the same issue is happening again today. Has anyone else reported this issue?

adamhsparks commented 2 years ago

No, sorry. I can't replicate.

Just now, 21.09.2022 16:16 AWST

[ins] r$> library(GSODR)
          weather <- get_GSOD(2021:2022, station= "672970-99999")

[ins] r$> weather
            STNID   NAME   CTRY COUNTRY_NAME  ISO2C  ISO3C  STATE LATITUDE LONGITUDE ELEVATION
           <char> <char> <char>       <char> <char> <char> <char>    <num>     <num>     <num>
  1: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
  2: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
  3: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
  4: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
  5: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
 ---
602: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
603: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
604: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
605: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
606: 672970-99999  BEIRA     MZ   MOZAMBIQUE     MZ    MOZ         -19.796    34.908     10.05
        BEGIN      END   YEARMODA  YEAR MONTH   DAY  YDAY  TEMP TEMP_ATTRIBUTES  DEWP
        <int>    <int>     <Date> <int> <int> <int> <int> <num>           <int> <num>
  1: 19490103 20220810 2021-01-01  2021     1     1     1  28.3              11  25.2
  2: 19490103 20220810 2021-01-02  2021     1     2     2  29.2              22  24.9
  3: 19490103 20220810 2021-01-03  2021     1     3     3  28.3              22  24.1
  4: 19490103 20220810 2021-01-04  2021     1     4     4  28.1              22  24.1
  5: 19490103 20220810 2021-01-05  2021     1     5     5  28.1              23  24.2
 ---
602: 19490103 20220810 2022-09-14  2022     9    14   257  23.8              21  17.9
603: 19490103 20220810 2022-09-15  2022     9    15   258  21.8              23  17.3
604: 19490103 20220810 2022-09-16  2022     9    16   259  22.2              23  18.6
605: 19490103 20220810 2022-09-17  2022     9    17   260  23.9              23  19.8
606: 19490103 20220810 2022-09-18  2022     9    18   261  24.8              22  20.5
     DEWP_ATTRIBUTES    SLP SLP_ATTRIBUTES   STP STP_ATTRIBUTES VISIB VISIB_ATTRIBUTES  WDSP
               <int>  <num>          <int> <num>          <int> <num>            <int> <num>
  1:              11     NA              0    NA              0  11.4               11   6.5
  2:              22 1013.8              7    NA              0  12.6               22   6.4
  3:              22 1013.2              8    NA              0  12.7               22   3.9
  4:              22 1010.7              7    NA              0  11.6               22   3.5
  5:              23 1008.9              8    NA              0  12.2               23   3.2
 ---
602:              21 1022.8              4    NA              0  10.9               21   6.3
603:              23     NA              0    NA              0  10.0               23   3.9
604:              23     NA              0    NA              0  11.4               23   4.0
605:              23     NA              0    NA              0  11.3               23   4.6
606:              22 1013.4              4    NA              0  10.5               22   5.2
     WDSP_ATTRIBUTES MXSPD  GUST   MAX MAX_ATTRIBUTES   MIN MIN_ATTRIBUTES  PRCP PRCP_ATTRIBUTES
               <int> <num> <num> <num>         <char> <num>         <char> <num>          <char>
  1:              11   9.8    NA  31.0              *  27.0              *   0.0               I
  2:              22   8.8    NA  31.6           <NA>  27.0              *   0.0               I
  3:              22   6.7    NA  31.0              *  25.8           <NA>   6.1               G
  4:              22   5.7    NA  31.4           <NA>  24.4           <NA>   0.0               G
  5:              23   5.7    NA  31.3           <NA>  25.0           <NA>   0.0               I
 ---
602:              11   7.7    NA  27.0           <NA>  22.0              *   0.0               I
603:              23   7.2    NA  26.0              *  17.8              *   0.0               I
604:              23   8.2    NA  28.1              *  17.0              *   0.0               I
605:              23   8.8    NA  30.0              *  17.5           <NA>   0.0               I
606:              22  10.3    NA  32.0              *  18.5           <NA>   0.0               I
      SNDP I_FOG I_RAIN_DRIZZLE I_SNOW_ICE I_HAIL I_THUNDER I_TORNADO_FUNNEL    EA    ES    RH
     <num> <num>          <num>      <num>  <num>     <num>            <num> <num> <num> <num>
  1:    NA     0              0          0      0         0                0   3.2   3.8  83.3
  2:    NA     0              0          0      0         0                0   3.1   4.0  77.7
  3:    NA     0              0          0      0         0                0   3.0   3.8  78.0
  4:    NA     0              0          0      0         0                0   3.0   3.8  78.9
  5:    NA     0              0          0      0         0                0   3.0   3.8  79.4
 ---
602:    NA     0              0          0      0         0                0   2.0   2.9  69.6
603:    NA     0              0          0      0         0                0   2.0   2.6  75.6
604:    NA     0              0          0      0         0                0   2.1   2.7  80.1
605:    NA     0              0          0      0         0                0   2.3   3.0  77.9
606:    NA     1              0          0      0         0                0   2.4   3.1  77.0