Skip to content

Commit

Permalink
getting ready for submission
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchobben committed Oct 15, 2023
1 parent 69c9290 commit 6ac3b23
Show file tree
Hide file tree
Showing 31 changed files with 28 additions and 35 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Expand Up @@ -29,7 +29,6 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Suggests:
curl,
globals (>= 0.14.0),
knitr,
rmarkdown,
Expand Down
4 changes: 0 additions & 4 deletions NAMESPACE
Expand Up @@ -9,19 +9,15 @@ export(citation_ui)
export(env_parm_labeller)
export(filter_NOAA)
export(filter_server)
export(filter_ui)
export(get_NOAA)
export(input_server)
export(input_ui)
export(list_NOAA)
export(output_server)
export(output_ui)
export(plot_NOAA)
export(plot_server)
export(plot_ui)
export(reproject)
export(table_server)
export(table_ui)
export(url_parser)
import(miniUI)
import(ncmeta)
Expand Down
2 changes: 1 addition & 1 deletion R/NOAA_addin.R
Expand Up @@ -9,7 +9,7 @@
#'
#' @examples
#'
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#'
#' # run RStudio addin (can also be launched from `Addins` dropdown menu)
#' NOAA_addin()
Expand Down
2 changes: 1 addition & 1 deletion R/NOAA_app.R
Expand Up @@ -9,7 +9,7 @@
#'
#' @examples
#'
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#'
#' # run app
#' NOAA_app()
Expand Down
3 changes: 1 addition & 2 deletions R/data_module.R
Expand Up @@ -16,12 +16,11 @@
#' @inheritParams get_NOAA
#'
#' @return Shiny module.
#' @export
#'
#' @examples
#'
#' # run data module stand-alone
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#'
#' library(oceanexplorer)
#' library(shiny)
Expand Down
2 changes: 1 addition & 1 deletion R/filter_NOAA.R
Expand Up @@ -31,7 +31,7 @@
#' @export
#'
#' @examples
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#'
#' # get atlas
#' NOAAatlas <- get_NOAA("oxygen", 1, "annual")
Expand Down
3 changes: 1 addition & 2 deletions R/filter_module.R
Expand Up @@ -10,12 +10,11 @@
#' @param ivars Character vector for the variables for filtering.
#'
#' @return Shiny module.
#' @export
#'
#' @examples
#'
#' # run filter module stand-alone
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#'
#' library(oceanexplorer)
#' library(shiny)
Expand Down
2 changes: 1 addition & 1 deletion R/get_NOAA.R
Expand Up @@ -31,7 +31,7 @@
#' # path to NOAA server or local data source
#' url_parser("oxygen", 1, "annual")
#'
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#'
#' # retrieve NOAA data
#' get_NOAA("oxygen", 1, "annual")
Expand Down
2 changes: 1 addition & 1 deletion R/plot_NOAA.R
Expand Up @@ -30,7 +30,7 @@
#' @export
#'
#' @examples
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#'
#' # data
#' NOAA <- get_NOAA("oxygen", 1, "annual")
Expand Down
3 changes: 1 addition & 2 deletions R/plot_module.R
Expand Up @@ -9,12 +9,11 @@
#' @param points Add locations of extracted point geometry.
#'
#' @return Shiny module.
#' @export
#'
#' @examples
#'
#' # run plot module stand-alone
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#'
#' library(oceanexplorer)
#' library(shiny)
Expand Down
3 changes: 1 addition & 2 deletions R/table_module.R
Expand Up @@ -7,11 +7,10 @@
#' @param download Add download button.
#'
#' @return Shiny module.
#' @export
#'
#' @examples
#'
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#' # run table module stand-alone
#'
#' library(oceanexplorer)
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Expand Up @@ -12,7 +12,7 @@
#'
#' @examples
#'
#' if (curl::has_internet() && interactive()) {
#' if (interactive()) {
#' # get data
#' NOAA <- get_NOAA("temperature", 1, "annual")
#'
Expand Down
2 changes: 1 addition & 1 deletion man/NOAA_addin.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/NOAA_app.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/filter_NOAA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/filter_ui.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_NOAA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/input_ui.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/oceanexplorer-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/plot_NOAA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/plot_ui.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/reproject.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/table_ui.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions vignettes/oceanexplorer.Rmd
Expand Up @@ -116,7 +116,7 @@ Imagine we are interested in phosphate concentrations in the month December from

First, we extract the data by proving the variable, grid resolution, and the averaging period. Make sure to have an internet connection in order to connect to the NOAA server.

```{r setup, eval = curl::has_internet(), error=TRUE}
```{r setup, cache=TRUE, error=TRUE}
# load package
library(oceanexplorer)
# get data
Expand All @@ -129,11 +129,11 @@ This operation can take a while, but it can be sped-up during future calls by ca

Then we can plot the phosphate data from a depth of 1000 meter below sea level.

```{r plot1, fig.width=7, eval = exists("WOA")}
```{r plot1, fig.width=7, eval = interactive() && exists("WOA")}
plot_NOAA(WOA, depth = 1000)
```

```{r save1, echo=FALSE, eval = exists("WOA"), message=FALSE}
```{r save1, echo=FALSE, eval = interactive() && exists("WOA"), message=FALSE}
ggplot2::ggsave("NOAA_plot1.png", plot_NOAA(WOA, depth = 1000), width = 9)
```

Expand All @@ -145,17 +145,17 @@ knitr::include_graphics("NOAA_plot1.png")

Finally, we can filter a data point from, for example, the Agulhas Basin.

```{r filter, eval = exists("WOA")}
```{r filter, cache=TRUE}
(pts <- filter_NOAA(WOA, depth = 1000, coord = list(lon = 20, lat = -46)))
```

We can then also project these extraction points on the world map for future reference.

```{r plot2, fig.width=7, eval = exists("WOA")}
```{r plot2, fig.width=7, eval = interactive() && exists("WOA")}
plot_NOAA(WOA, depth = 1000, points = pts)
```

```{r save2, echo=FALSE, eval = exists("WOA"), message=FALSE}
```{r save2, echo=FALSE, eval = interactive() && exists("WOA"), message=FALSE}
ggplot2::ggsave("NOAA_plot2.png", plot_NOAA(WOA, depth = 1000, points = pts), width = 9)
```

Expand Down
1 change: 1 addition & 0 deletions vignettes/oceanexplorer_cache/html/__packages
@@ -0,0 +1 @@
oceanexplorer
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 6ac3b23

Please sign in to comment.