Skip to content

Commit 5596054

Browse files
committed
Tweaks to keep cran-checks happy
1 parent d9713ce commit 5596054

File tree

6 files changed

+81
-78
lines changed

6 files changed

+81
-78
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Description: General purpose R client for 'ERDDAP' servers. Includes
66
'ERDDAP' information:
77
<https://upwell.pfeg.noaa.gov/erddap/information.html>.
88
Version: 1.0.0
9-
Date: 2022-10-01
9+
Date: 2022-10-02
1010
License: MIT + file LICENSE
1111
Authors@R: c(
1212
person("Scott", "Chamberlain", role = "aut"),

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ rerddap 1.0.0
44
* griddap dataframe now uses the same coordinate names returned in 'rerddap::info()'
55
* all grids can now be "melted" into a dataframe, not just lat-lon grids
66
* fixed some bugs accessing some datasets not on lat-lon grid
7-
* One vignette now included in package.
7+
* vignette now included in package.
88

99
rerddap 0.8.0
1010
=============

cran-comments.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
## Test environments
22

33
* local macOS install, R 4.2.1
4-
* rhub ubuntu, debian, solaris, Apple Silicon (M1), macOS 11.6 Big Sur
5-
* win-builder (devel and release)
4+
* rhub (devtools::check_rhub())
5+
* macOS Builder (devtools::check_mac_release())
6+
* win-builder (devel and release - devtools::check_win_*())
67

78
## R CMD check results
89

910
OK from all checks
1011

1112
## Reverse dependencies
1213

13-
* No probelms with reverse dependencies.
14+
* I am maintainer of plotdap and rerddapXracto - they check out
15+
* The maintainer of PAMmisc tested new version wih no problem
1416

1517
---
1618

vignettes/Using_rerddap.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ A list of some of the public available <span style="color:red">ERDDAP</span> ser
104104
servers()
105105
```
106106

107-
The list of <span style="color:red">ERDDAP</span> servers is based on the list maintained at the [Awesome ERDDAP site](https://irishmarineinstitute.github.io/awesome-erddap).
107+
The list of <span style="color:red">ERDDAP</span> servers is based on the list maintained at the *Awesome ERDDAP* site compiled by the Irish Marine Institute.
108108

109109
The second way to find and obtain the desired data is to use functions in `rerddap`. The basic steps are:
110110

@@ -198,15 +198,15 @@ Tables in <span style="color:red">ERDDAP</span> are subset by using "constraint
198198

199199
Note that in `tabledap()` character strings usually must be passed as "double-quoted", as seen in the example with the scientific name. A full `tabledap()` request to retrieve 'latitude', 'longitude', 'time', 'scientific_name', and 'subsample_count' with these constraints would be:
200200

201-
```{r cache = TRUE, eval = FALSE, echo = TRUE }
201+
```{r, eval = FALSE, echo = TRUE }
202202
CPSinfo <- info('FRDCPSTrawlLHHaulCatch')
203203
sardines <- tabledap(CPSinfo, fields = c('latitude', 'longitude', 'time', 'scientific_name', 'subsample_count'), 'time>=2010-01-01', 'time<=2010-12-31', 'scientific_name="Sardinops sagax"' )
204204
205205
```
206206

207207
## Searching
208208

209-
The functions in `rerddap` work with any <span style="color:red">ERDDAP</span> server as long as the base URL is provided. A list of advertised <span style="color:red">ERDDAP</span> servers is provided at https://irishmarineinstitute.github.io/awesome-erddap and the `rerddap` function `servers()` will download this list.
209+
The functions in `rerddap` work with any <span style="color:red">ERDDAP</span> server as long as the base URL is provided. A list of advertised <span style="color:red">ERDDAP</span> servers is provided by the Irish Marine Institute's *Awesome ERDDAP* web page, and the `rerddap` function `servers()` will download this list.
210210

211211
Given a base <span style="color:red">ERDDAP</span> URL, the function `ed_search()` will search the server for the given search terms. The default <span style="color:red">ERDDAP</span> server is https://upwell.pfeg.noaa.gov/erddap/. Alternately, the function `global_search()` will search a list of <span style="color:red">ERDDAP</span> servers for the given search terms. The function `ed_datasets()` lists the datasets available from the given <span style="color:red">ERDDAP</span> server.
212212

@@ -326,7 +326,7 @@ ggplot(data = viirsCHLA$data, aes(x = longitude, y = latitude, fill = log(chla))
326326

327327
### Temperature at 70m in the north Pacific from the SODA model output
328328

329-
This is an example of an extract from a 4-D dataset (results from the "Simple Ocean Data Assimilation (SODA)" model - see https://www.atmos.umd.edu/~ocean/), and illustrate the case where the z-coordinate does not have the default name "altitude". Water temperature at 70m depth is extracted for the North Pacific Ocean.
329+
This is an example of an extract from a 4-D dataset (results from the "Simple Ocean Data Assimilation (SODA)" model - see https://www2.atmos.umd.edu/~ocean/), and illustrate the case where the z-coordinate does not have the default name "altitude". Water temperature at 70m depth is extracted for the North Pacific Ocean.
330330

331331

332332
```{r eval = FALSE, echo = TRUE}
@@ -368,7 +368,7 @@ myplot
368368

369369
### Irish Marine Institute {#hourly}
370370

371-
The Irish Marine Institute has an <span style="color:red">ERDDAP</span> server at https://erddap.marine.ie/erddap. Among other datasets, they have hourly output from a model of the North Altantic ocean, with a variety of ocean related parameters, see https://erddap.marine.ie/erddap/griddap/IMI_NEATL.html. To obtain the latest sea surface salinity for the domain of the model:
371+
The Irish Marine Institute has an <span style="color:red">ERDDAP</span> server at https://erddap.marine.ie/erddap. Among other datasets, they have hourly output from a model of the North Altantic ocean, with a variety of ocean related parameters, see the dataset *IMI_NEATL*. To obtain the latest sea surface salinity for the domain of the model:
372372

373373
```{r NAtlSSS, eval = FALSE, echo = TRUE}
374374
require("rerddap")
@@ -721,7 +721,7 @@ z + geom_polygon(data = w, aes(x = long, y = lat, group = group), fill = "grey80
721721

722722
## California Current System Integrated Ecosystem Assessment (CCSIEA)
723723

724-
The primary goals of the CCIEA are to better understand the web of interactions that drive patterns and trends of components within the California Current ecosystem, and forecast how changing environmental conditions and management actions affect the status of these components. The conceptual model of the social-ecological system of the California Current illustrates how humans and their social systems are inextricably linked to these marine, coastal, and upland environments (see https://www.integratedecosystemassessment.noaa.gov/regions/california-current-region/index.html).
724+
The primary goals of the CCIEA are to better understand the web of interactions that drive patterns and trends of components within the California Current ecosystem, and forecast how changing environmental conditions and management actions affect the status of these components. The conceptual model of the social-ecological system of the California Current illustrates how humans and their social systems are inextricably linked to these marine, coastal, and upland environments (see https://www.integratedecosystemassessment.noaa.gov/regions/california-current/projects).
725725

726726
The over 300 indices developed for the CCSIEA are available through `rerddap`. Here an index of coho abundance in California is compared with the February value of an index of the strength and location of the North Pacific High, developed in "The North Pacific High and wintertime pre-conditioning of California current productivity" by Schroeder et al. (Geophys. Res. Lett., 40, 541–546).
727727

vignettes/rerddap.Rmd

Lines changed: 67 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: rerddap introduction
33
author: Scott Chamberlain
4-
date: "2022-02-05"
4+
date: "2022-09-30"
55
output: rmarkdown::html_vignette
66
vignette: >
77
%\VignetteIndexEntry{rerddap introduction}
@@ -26,26 +26,26 @@ When you use `griddap()` or `tabledap()` functions, we construct a MD5 hash from
2626

2727
## ERDDAP servers
2828

29-
You can get a data.frame of ERDDAP servers using the function `servers()`. The list of ERDDAP servers is drawn from the [Awesome ERDDAP site](https://irishmarineinstitute.github.io/awesome-erddap). If you know of more ERDDAP servers, follow the instructions on that page to add the server.
29+
You can get a data.frame of ERDDAP servers using the function `servers()`. The list of ERDDAP servers is drawn from the *Awesome ERDDAP* page maintained by the Irish Marine Institute . If you know of more ERDDAP servers, follow the instructions on that page to add the server.
3030

3131
## Install
3232

3333
Stable version from CRAN
3434

3535

36-
```r{cran_install, eval = FALSE, echo = TRUE}
36+
```r
3737
install.packages("rerddap")
3838
```
3939

4040
Or, the development version from GitHub
4141

4242

43-
```r{remote_install, eval = FALSE, echo = TRUE}
43+
```r
4444
remotes::install_github("ropensci/rerddap")
4545
```
4646

4747

48-
```r{load, eval = FALSE, echo = TRUE}
48+
```r
4949
library("rerddap")
5050
```
5151

@@ -54,56 +54,57 @@ library("rerddap")
5454
First, you likely want to search for data, specify either `griddadp` or `tabledap`
5555

5656

57-
```r{ed_search_table, eval = FALSE, echo = TRUE}
57+
```r
5858
ed_search(query = 'size', which = "table")
59-
#> # A tibble: 42 × 2
60-
#> title dataset_id
61-
#> <chr> <chr>
62-
#> 1 CCE Prey Size and Hard Part Size Regressions mmtdPreyS
63-
#> 2 CCE Teleost Prey Size and Hard Part Size Measurements mmtdTeleo
64-
#> 3 CalCOFI Larvae Sizes erdCalCOF
65-
#> 4 Seabird Prey Size cciea_B_L
66-
#> 5 CCE Non-Teleost Prey Size and Hard Part Size Measurements mmtdNonTe
67-
#> 6 Channel Islands, Kelp Forest Monitoring, Size and Frequency, Natu… erdCinpKf
68-
#> 7 File Names from the AWS S3 noaa-goes16 Bucket awsS3Noaa
69-
#> 8 File Names from the AWS S3 noaa-goes17 Bucket awsS3Noaa
70-
#> 9 NOAA-Navy Sanctuary Soundscapes Monitoring Project -- File Access noaaSanct
71-
#> 10 PacIOOS Beach Camera 001: Waikiki, Oahu, Hawaii BEACHCAM-
72-
#> # … with 32 more rows
59+
#> # A tibble: 41 × 2
60+
#> title datas…¹
61+
#> <chr> <chr>
62+
#> 1 CCE Prey Size and Hard Part Size Regressions mmtdPr
63+
#> 2 CCE Teleost Prey Size and Hard Part Size Measurements mmtdTe
64+
#> 3 CalCOFI Larvae Sizes erdCal
65+
#> 4 Seabird Prey Size cciea_
66+
#> 5 CCE Non-Teleost Prey Size and Hard Part Size Measurements mmtdNo
67+
#> 6 Channel Islands, Kelp Forest Monitoring, Size and Frequency, Natural… erdCin
68+
#> 7 File Names from the AWS S3 noaa-goes16 Bucket awsS3N
69+
#> 8 File Names from the AWS S3 noaa-goes17 Bucket awsS3N
70+
#> 9 PacIOOS Beach Camera 001: Waikiki, Oahu, Hawaii BEACHC
71+
#> 10 PacIOOS Beach Camera 003: Waimea Bay, Oahu, Hawaii BEACHC
72+
#> # … with 31 more rows, and abbreviated variable name ¹​dataset_id
7373
```
7474

7575

76-
```r{ed_search_grid, eval = FALSE, echo = TRUE}
76+
```r
7777
ed_search(query = 'size', which = "grid")
78-
#> # A tibble: 101 × 2
79-
#> title dataset_id
80-
#> <chr> <chr>
81-
#> 1 Audio data from a local source. testGridW
82-
#> 2 Coastal Upwelling Transport Index (CUTI), Daily erdCUTIda
83-
#> 3 Coastal Upwelling Transport Index (CUTI), Monthly erdCUTImo
84-
#> 4 Biologically Effective Upwelling Transport Index (BEUTI), Daily erdBEUTId
85-
#> 5 Biologically Effective Upwelling Transport Index (BEUTI), Monthly erdBEUTIm
86-
#> 6 SST smoothed frontal gradients FRD_SSTgr
87-
#> 7 SST smoothed frontal gradients, Lon0360 FRD_SSTgr
88-
#> 8 Monthly means of OLR from interpolated OLR dataset (olr.mon.ltm),… noaa_psl_
89-
#> 9 Chlorophyll, NOAA VIIRS-SNPP, Near Real-Time, Global, Level 3, 20… nesdisVHN
90-
#> 10 Sardine Potential Habitat, MODIS Aqua Data, Near Real-Time, US We… sardine_h
91-
#> # … with 91 more rows
78+
#> # A tibble: 54 × 2
79+
#> title datas…¹
80+
#> <chr> <chr>
81+
#> 1 Audio data from a local source. testGr
82+
#> 2 Main Hawaiian Islands Multibeam Bathymetry Synthesis: 50-m Bathymetry hmrg_b
83+
#> 3 Main Hawaiian Islands Multibeam Bathymetry Synthesis: 50-m Bathymetr… hmrg_b
84+
#> 4 Coastal Upwelling Transport Index (CUTI), Daily erdCUT
85+
#> 5 SST smoothed frontal gradients FRD_SS
86+
#> 6 Coastal Upwelling Transport Index (CUTI), Monthly erdCUT
87+
#> 7 SST smoothed frontal gradients, Lon0360 FRD_SS
88+
#> 8 Biologically Effective Upwelling Transport Index (BEUTI), Daily erdBEU
89+
#> 9 Biologically Effective Upwelling Transport Index (BEUTI), Monthly erdBEU
90+
#> 10 monthly mean psi from the NCEP Reanalysis (psi.mon.ltm), 0001 noaa_p
91+
#> # … with 44 more rows, and abbreviated variable name ¹​dataset_id
9292
```
9393

9494
There is now a convenience function to search over a list of ERDDAP servers, designed to work with the function `servers()`
9595

9696

97-
```r{global_search, eval = FALSE, echo = TRUE}
97+
```r
9898
global_search(query, server_list, which_service)
99+
#> Error in check_arg(query, "character"): object 'query' not found
99100
```
100101

101102
## Information
102103

103104
Then you can get information on a single dataset
104105

105106

106-
```r{info_table, eval = FALSE, echo = TRUE}
107+
```r
107108
info('erdCalCOFIlrvsiz')
108109
#> <ERDDAP info> erdCalCOFIlrvsiz
109110
#> Base URL: https://upwell.pfeg.noaa.gov/erddap
@@ -123,13 +124,13 @@ info('erdCalCOFIlrvsiz')
123124
First, get information on a dataset to see time range, lat/long range, and variables.
124125

125126

126-
```r{info_grid, eval = FALSE, echo = TRUE}
127+
```r
127128
(out <- info('erdMBchla1day'))
128129
#> <ERDDAP info> erdMBchla1day
129130
#> Base URL: https://upwell.pfeg.noaa.gov/erddap
130131
#> Dataset Type: griddap
131132
#> Dimensions (range):
132-
#> time: (2006-01-01T12:00:00Z, 2022-02-04T12:00:00Z)
133+
#> time: (2006-01-01T12:00:00Z, 2022-09-28T12:00:00Z)
133134
#> altitude: (0.0, 0.0)
134135
#> latitude: (-45.0, 65.0)
135136
#> longitude: (120.0, 320.0)
@@ -141,40 +142,40 @@ First, get information on a dataset to see time range, lat/long range, and varia
141142
Then query for gridded data using the `griddap()` function
142143

143144

144-
```r{griddap, eval = FALSE, echo = TRUE}
145+
```r
145146
(res <- griddap(out,
146147
time = c('2015-01-01','2015-01-03'),
147148
latitude = c(14, 15),
148149
longitude = c(125, 126)
149150
))
150151
#> <ERDDAP griddap> erdMBchla1day
151152
#> Path: [~/Library/Caches/R/rerddap/4d844aa48552049c3717ac94ced5f9b8.nc]
152-
#> Last updated: [2022-02-05 16:01:53]
153+
#> Last updated: [2022-09-30 09:34:02]
153154
#> File size: [0.03 mb]
154155
#> Dimensions (dims/vars): [4 X 1]
155156
#> Dim names: time, altitude, latitude, longitude
156157
#> Variable names: Chlorophyll Concentration in Sea Water
157158
#> data.frame (rows/columns): [5043 X 5]
158159
#> # A tibble: 5,043 × 5
159-
#> time latitude longitude altitude chlorophyll
160-
#> <chr> <dbl> <dbl> <dbl> <dbl>
161-
#> 1 2015-01-01T12:00:00Z 14 125 0 NA
162-
#> 2 2015-01-01T12:00:00Z 14 125. 0 NA
163-
#> 3 2015-01-01T12:00:00Z 14 125. 0 NA
164-
#> 4 2015-01-01T12:00:00Z 14 125. 0 NA
165-
#> 5 2015-01-01T12:00:00Z 14 125. 0 NA
166-
#> 6 2015-01-01T12:00:00Z 14 125. 0 NA
167-
#> 7 2015-01-01T12:00:00Z 14 125. 0 NA
168-
#> 8 2015-01-01T12:00:00Z 14 125. 0 NA
169-
#> 9 2015-01-01T12:00:00Z 14 125. 0 NA
170-
#> 10 2015-01-01T12:00:00Z 14 125. 0 NA
160+
#> longitude latitude altitude time chlorophyll
161+
#> <dbl> <dbl> <dbl> <chr> <dbl>
162+
#> 1 125 14 0 2015-01-01T12:00:00Z NA
163+
#> 2 125. 14 0 2015-01-01T12:00:00Z NA
164+
#> 3 125. 14 0 2015-01-01T12:00:00Z NA
165+
#> 4 125. 14 0 2015-01-01T12:00:00Z NA
166+
#> 5 125. 14 0 2015-01-01T12:00:00Z NA
167+
#> 6 125. 14 0 2015-01-01T12:00:00Z NA
168+
#> 7 125. 14 0 2015-01-01T12:00:00Z NA
169+
#> 8 125. 14 0 2015-01-01T12:00:00Z NA
170+
#> 9 125. 14 0 2015-01-01T12:00:00Z NA
171+
#> 10 125. 14 0 2015-01-01T12:00:00Z NA
171172
#> # … with 5,033 more rows
172173
```
173174

174175
The output of `griddap()` is a list that you can explore further. Get the summary
175176

176177

177-
```r{grid_summary, eval = FALSE, echo = TRUE}
178+
```r
178179
res$summary
179180
#> $filename
180181
#> [1] "~/Library/Caches/R/rerddap/4d844aa48552049c3717ac94ced5f9b8.nc"
@@ -197,7 +198,7 @@ res$summary
197198
Get the dimension variables
198199

199200

200-
```r{grid_dimensions, eval = FALSE, echo = TRUE}
201+
```r
201202
names(res$summary$dim)
202203
#> [1] "time" "altitude" "latitude" "longitude"
203204
```
@@ -207,19 +208,19 @@ Get the data.frame (beware: you may want to just look at the `head` of the data.
207208

208209
```r
209210
head(res$data)
210-
#> time latitude longitude altitude chlorophyll
211-
#> 1 2015-01-01T12:00:00Z 14 125.000 0 NA
212-
#> 2 2015-01-01T12:00:00Z 14 125.025 0 NA
213-
#> 3 2015-01-01T12:00:00Z 14 125.050 0 NA
214-
#> 4 2015-01-01T12:00:00Z 14 125.075 0 NA
215-
#> 5 2015-01-01T12:00:00Z 14 125.100 0 NA
216-
#> 6 2015-01-01T12:00:00Z 14 125.125 0 NA
211+
#> longitude latitude altitude time chlorophyll
212+
#> 1 125.000 14 0 2015-01-01T12:00:00Z NA
213+
#> 2 125.025 14 0 2015-01-01T12:00:00Z NA
214+
#> 3 125.050 14 0 2015-01-01T12:00:00Z NA
215+
#> 4 125.075 14 0 2015-01-01T12:00:00Z NA
216+
#> 5 125.100 14 0 2015-01-01T12:00:00Z NA
217+
#> 6 125.125 14 0 2015-01-01T12:00:00Z NA
217218
```
218219

219220
## tabledap (tabular) data
220221

221222

222-
```r{calcofi_info, eval = FALSE, echo = TRUE}
223+
```r
223224
(out <- info('erdCalCOFIlrvsiz'))
224225
#> <ERDDAP info> erdCalCOFIlrvsiz
225226
#> Base URL: https://upwell.pfeg.noaa.gov/erddap
@@ -235,12 +236,12 @@ head(res$data)
235236
```
236237

237238

238-
```r{calcofi_tabledap, eval = FALSE, echo = TRUE}
239+
```r
239240
(dat <- tabledap('erdCalCOFIlrvsiz', fields=c('latitude','longitude','larvae_size',
240241
'scientific_name'), 'time>=2011-01-01', 'time<=2011-12-31'))
241242
#> <ERDDAP tabledap> erdCalCOFIlrvsiz
242243
#> Path: [~/Library/Caches/R/rerddap/db7389db5b5b0ed9c426d5c13bc43d18.csv]
243-
#> Last updated: [2022-02-05 16:01:57]
244+
#> Last updated: [2022-09-30 09:34:05]
244245
#> File size: [0.05 mb]
245246
#> # A tibble: 1,304 × 4
246247
#> latitude longitude larvae_size scientific_name
@@ -261,7 +262,7 @@ head(res$data)
261262
Since both `griddap()` and `tabledap()` give back data.frame's, it's easy to do downstream manipulation. For example, we can use `dplyr` to filter, summarize, group, and sort:
262263

263264

264-
```r{calcofi_dplyr, eval = FALSE, echo = TRUE}
265+
```r
265266
library("dplyr")
266267
dat$larvae_size <- as.numeric(dat$larvae_size)
267268
dat %>%

vignettes/rerddap.Rmd.og

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ When you use `griddap()` or `tabledap()` functions, we construct a MD5 hash from
5858

5959
## ERDDAP servers
6060

61-
You can get a data.frame of ERDDAP servers using the function `servers()`. The list of ERDDAP servers is drawn from the [Awesome ERDDAP site](https://irishmarineinstitute.github.io/awesome-erddap). If you know of more ERDDAP servers, follow the instructions on that page to add the server.
61+
You can get a data.frame of ERDDAP servers using the function `servers()`. The list of ERDDAP servers is drawn from the *Awesome ERDDAP* page maintained by the Irish Marine Institute . If you know of more ERDDAP servers, follow the instructions on that page to add the server.
6262

6363
## Install
6464

0 commit comments

Comments
 (0)