You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.Rmd
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -25,16 +25,14 @@ knitr::opts_chunk$set(
25
25
## Introduction
26
26
27
27
The GSOD or [Global Surface Summary of the Day (GSOD)](https://www.ncei.noaa.gov/access/metadata/landing-page/bin/iso?id=gov.noaa.ncdc:C00516) data provided by the US National Centers for Environmental Information (NCEI) are a valuable source of weather data with global coverage.
28
-
{GSODR} aims to make it easy to find, transfer and format the data you need for use in analysis and provides five main functions for facilitating this:
28
+
{GSODR} aims to make it easy to find, transfer and format the data you need for use in analysis and provides four main functions for facilitating this:
29
29
30
30
-`get_GSOD()` - this function queries and transfers files from the NCEI's web server, reformats them and returns a data frame.
31
31
32
32
-`reformat_GSOD()` - this function takes individual station files from the local disk and re-formats them returning a data frame.
33
33
34
34
-`nearest_stations()` - this function returns a `data.table` of stations with their metadata and the distance in which they fall from the given radius (kilometres) of a point given as latitude and longitude in order from nearest to farthest.
35
35
36
-
-`get_inventory()` - this function downloads the latest station inventory information from the NCEI's server and returns the header information about the latest version as a message in the console and a tidy data frame of the stations' inventory for each month that data are reported.
37
-
38
36
-`get_updates()` - this function downloads the changelog for the GSOD data from the NCEI's server and reorders it by the most recent changes first.
39
37
40
38
When reformatting data either with `get_GSOD()` or `reformat_GSOD()`, all units are converted to International System of Units (SI), _e.g._, inches to millimetres and Fahrenheit to Celsius.
Copy file name to clipboardExpand all lines: README.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,16 +18,14 @@
18
18
## Introduction
19
19
20
20
The GSOD or [Global Surface Summary of the Day (GSOD)](https://www.ncei.noaa.gov/access/metadata/landing-page/bin/iso?id=gov.noaa.ncdc:C00516) data provided by the US National Centers for Environmental Information (NCEI) are a valuable source of weather data with global coverage.
21
-
{GSODR} aims to make it easy to find, transfer and format the data you need for use in analysis and provides five main functions for facilitating this:
21
+
{GSODR} aims to make it easy to find, transfer and format the data you need for use in analysis and provides four main functions for facilitating this:
22
22
23
23
-`get_GSOD()` - this function queries and transfers files from the NCEI's web server, reformats them and returns a data frame.
24
24
25
25
-`reformat_GSOD()` - this function takes individual station files from the local disk and re-formats them returning a data frame.
26
26
27
27
-`nearest_stations()` - this function returns a `data.table` of stations with their metadata and the distance in which they fall from the given radius (kilometres) of a point given as latitude and longitude in order from nearest to farthest.
28
28
29
-
-`get_inventory()` - this function downloads the latest station inventory information from the NCEI's server and returns the header information about the latest version as a message in the console and a tidy data frame of the stations' inventory for each month that data are reported.
30
-
31
29
-`get_updates()` - this function downloads the changelog for the GSOD data from the NCEI's server and reorders it by the most recent changes first.
32
30
33
31
When reformatting data either with `get_GSOD()` or `reformat_GSOD()`, all units are converted to International System of Units (SI), _e.g._, inches to millimetres and Fahrenheit to Celsius.
The GSOD or [Global Surface Summary of the Day (GSOD)](https://www.ncei.noaa.gov/access/metadata/landing-page/bin/iso?id=gov.noaa.ncdc:C00516) data provided by the US National Centers for Environmental Information (NCEI) are a valuable source of weather data with global coverage.
19
19
However, the data files are cumbersome and difficult to work with.
20
-
{GSODR} aims to make it easy to find, transfer and format the data you need for use in analysis and provides five main functions for facilitating this:
20
+
{GSODR} aims to make it easy to find, transfer and format the data you need for use in analysis and provides four main functions for facilitating this:
21
21
22
22
-`get_GSOD()` - this function queries and transfers files from the NCEI's web server, reformats them and returns a data frame.
23
23
24
24
-`reformat_GSOD()` - this function takes individual station files from the local disk and re-formats them returning a data frame.
25
25
26
26
-`nearest_stations()` - this function returns a `data.table` of stations with their metadata and the distance in which they fall from the given radius (kilometres) of a point given as latitude and longitude in order from nearest to farthest.
27
27
28
-
-`get_inventory()` - this function downloads the latest station inventory information from the NCEI's server and returns the header information about the latest version as a message in the console and a tidy data frame of the stations' inventory for each month that data are reported.
29
-
30
28
-`get_updates()` - this function downloads the changelog for the GSOD data from the NCEI's server and reorders it by the most recent changes first.
31
29
32
30
When reformatting data either with `get_GSOD()` or `reformat_GSOD()`, all units are converted from United States Customary System (USCS) to International System of Units (SI), _e.g._, inches to millimetres and Fahrenheit to Celsius.
@@ -44,24 +42,7 @@ It's easy to find all stations in Australia.
44
42
45
43
```r
46
44
library("GSODR")
47
-
```
48
-
49
-
```
50
-
## Warning in runHook(".onAttach", ns, dirname(nspath), nsname): restarting
51
-
## interrupted promise evaluation
52
-
```
53
-
54
-
```
55
-
## Warning in runHook(".onAttach", ns, dirname(nspath), nsname): internal error 1
56
-
## in R_decompress1 with libdeflate
57
-
```
58
-
59
-
```
60
-
## Error: package or namespace load failed for 'GSODR' in runHook(".onAttach", ns, dirname(nspath), nsname):
61
-
## lazy-load database '/Users/adamsparks/Library/R/arm64/4.5/library/GSODR/R/GSODR.rdb' is corrupt
## This station, 949999-00170, only provides data for years 1971 to 1984.
188
+
## Please send a request that falls within these years.
201
189
```
202
190
203
191
```
204
-
## Error in get_GSOD(years = 2010, station = tbar_stations): could not find function "get_GSOD"
192
+
## Warning:
193
+
## This station, 949999-00183, only provides data for years 1983 to 1984.
194
+
## Please send a request that falls within these years.
205
195
```
206
196
207
197
```r
@@ -337,56 +327,19 @@ get_updates()
337
327
```
338
328
339
329
```
340
-
## Error in get_updates(): could not find function "get_updates"
341
-
```
342
-
343
-
# Using get_inventory()
344
-
345
-
{GSODR} provides a function, `get_inventory()` to retrieve an inventory of the number of weather observations by station-year-month for the beginning of record through to current.
346
-
347
-
Following is an example of how to retrieve the inventory and check a station in Toowoomba, Queensland, Australia, which was used in an earlier example.
348
-
349
-
350
-
```r
351
-
inventory<- get_inventory()
352
-
```
353
-
354
-
```
355
-
## Error in get_inventory(): could not find function "get_inventory"
356
-
```
357
-
358
-
```r
359
-
inventory
360
-
```
361
-
362
-
```
363
-
## Warning in get(method, envir = home): internal error 1 in R_decompress1 with
364
-
## libdeflate
365
-
```
366
-
367
-
```
368
-
## Error in get(method, envir = home): lazy-load database '/Users/adamsparks/Library/R/arm64/4.5/library/GSODR/R/GSODR.rdb' is corrupt
369
-
```
370
-
371
-
```r
372
-
subset(inventory, STNID%in%"955510-99999")
373
-
```
374
-
375
-
```
376
-
## Warning in print(x): restarting interrupted promise evaluation
0 commit comments