Skip to content

Commit

Permalink
various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchobben committed Oct 15, 2023
1 parent ba282cf commit ec2e2ef
Show file tree
Hide file tree
Showing 15 changed files with 162 additions and 250 deletions.
3 changes: 3 additions & 0 deletions .Rbuildignore
Expand Up @@ -24,3 +24,6 @@
^Dockerfile$
^test_debian.sh$
^dev$
^app\.R$
^\.covrignore$
^revdep$
9 changes: 9 additions & 0 deletions .covrignore
@@ -0,0 +1,9 @@
R/data_module.R
R/filter_module.R
R/NOAA_addin.R
R/NOAA_app.R
R/NOAA_data.R
R/oceanexplorer-package.R
R/plot_module.R
R/plot_NOAA.R
R/table_module.R
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -21,3 +21,4 @@ dev/*
NEWS.md
CRAN-SUBMISSION
cran-comments.md
revdep/
1 change: 1 addition & 0 deletions DESCRIPTION
Expand Up @@ -32,6 +32,7 @@ Suggests:
curl,
globals (>= 0.14.0),
knitr,
rmarkdown,
shinytest (>= 1.5.1),
spelling,
testthat (>= 3.1.2),
Expand Down
12 changes: 0 additions & 12 deletions NAMESPACE
Expand Up @@ -2,16 +2,10 @@

S3method(reproject,sf)
S3method(reproject,stars)
export(":=")
export(.data)
export(NOAA_addin)
export(NOAA_app)
export(NOAA_server)
export(as_label)
export(as_name)
export(citation_ui)
export(enquo)
export(enquos)
export(env_parm_labeller)
export(filter_NOAA)
export(filter_server)
Expand All @@ -32,9 +26,3 @@ export(url_parser)
import(miniUI)
import(ncmeta)
import(shiny, except = serverInfo)
importFrom(rlang,":=")
importFrom(rlang,.data)
importFrom(rlang,as_label)
importFrom(rlang,as_name)
importFrom(rlang,enquo)
importFrom(rlang,enquos)
5 changes: 4 additions & 1 deletion NEWS.md
@@ -1,4 +1,7 @@
# oceanexplorer (development version)
# oceanexplorer 0.1.0

* **Feature**: Now one can also use a fuzzy search to select a chemical/physical marine parameters. This is convenient when selecting data near coasts.
* Varies updates in the documentation. This includes mainly links as the source and shiny app are no longer hosted at Utrecht University.

# oceanexplorer 0.0.2

Expand Down
14 changes: 7 additions & 7 deletions README.Rmd
Expand Up @@ -6,7 +6,7 @@ bibliography: "vignettes/packages.bib"
<!-- README.md is generated from README.Rmd. Please edit that file -->


# The oceanexplorer <a href="https://dplyr.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" /></a>
# The oceanexplorer <a href="https://github.com/MartinSchobben/oceanexplorer"><img src="man/figures/logo.png" align="right" height="138" /></a>


```{r, include = FALSE}
Expand All @@ -23,7 +23,7 @@ knitr::opts_chunk$set(
# following code for loading and writing the bibtex references for the used pkgs
pkgs <- c(
# data transformation and visualization
"dplyr", "ggplot2", "rlang", "purrr",
"dplyr", "ggplot2", "purrr",
# package development
"devtools", "shinytest", "vdiffr", "roxygen2", "testthat",
# documentation
Expand Down Expand Up @@ -88,7 +88,7 @@ This project was funded by ERC Starting grant number 802835, OceaNice, awarded t

The construction of the R [@rversion] package *oceanexplorer* and associated documentation was aided by the packages; *devtools* [@devtools], *roxygen2* [@roxygen2], *testthat* [@testthat], *shinytest* [@shinytest], *vdiffr* [@vdiffr], *knitr* [@knitr2014 ; @knitr2015], *rmarkdown* [@rmarkdown2018; @rmarkdown2020], and the superb guidance in the book: *R packages: organize, test, document, and share your code*, by @Wickham2015.

Data transformation, cleaning and visualization is performed with: *dplyr* [@dplyr], *ggplot2* [@ggplot2], and *rlang* [@rlang].
Data transformation, cleaning and visualization is performed with: *dplyr* [@dplyr], and *ggplot2* [@ggplot2].

In addition, this package relies on a set of packages for spatial data analysis: *sf* [@sf] and *stars* [@stars].

Expand Down Expand Up @@ -118,23 +118,23 @@ oxy_global <- get_NOAA("oxygen", 1, "annual")

Slice a specific interval from the array with `filter_NOAA()`, like so:

```{r slice}
```{r slice, eval=exists("oxy_global")}
# filter a depth of 200 meters to show OMZs
(oxy_omz <- filter_NOAA(oxy_global, depth = 200))
```


In addition, the sliced array can be plotted, like so:

```{r plot1}
```{r plot1, eval=exists("oxy_omz")}
# plot the NOAA world ocean atlas for oxygen content
plot_NOAA(oxy_omz, depth = NULL)
```

The same plot can be produced by taking the original data and supplying a value to the `depth` argument and specifying the range of oxygen content to `oxy_omz`.


```{r plot2}
```{r plot2, eval=exists("oxy_global")}
# plot the NOAA world ocean atlas for oxygen content
plot_NOAA(oxy_global, depth = 200, rng = range(oxy_omz[[1]]))
```
Expand All @@ -159,6 +159,6 @@ NOAA_addin()

## Code of Conduct

Please note that the oceanexplorer project is released with a [Contributor Code of Conduct](https://utrechtuniversity.github.io/oceanexplorer/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.
Please note that the oceanexplorer project is released with a [Contributor Code of Conduct](https://martinschobben.github.io/oceanexplorer/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

# References
91 changes: 41 additions & 50 deletions README.md
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# The oceanexplorer <a href="https://dplyr.tidyverse.org"><img src="man/figures/logo.png" align="right" height="138" /></a>
# The oceanexplorer <a href="https://github.com/MartinSchobben/oceanexplorer"><img src="man/figures/logo.png" align="right" height="138" /></a>

<!-- badges: start -->

Expand Down Expand Up @@ -37,29 +37,29 @@ awarded to Peter Bijl.

## Credits

The construction of the R (R Core Team 2022) package *oceanexplorer* and
associated documentation was aided by the packages; *devtools* (Wickham
et al. 2021), *roxygen2* (Wickham, Danenberg, et al. 2022), *testthat*
(Wickham 2022), *shinytest* (Chang, Csárdi, and Wickham 2021), *vdiffr*
(Henry et al. 2022), *knitr* (Xie 2014 ; Xie 2015), *rmarkdown* (Xie,
Allaire, and Grolemund 2018; Xie, Dervieux, and Riederer 2020), and the
superb guidance in the book: *R packages: organize, test, document, and
share your code*, by Wickham (2015).
The construction of the R (R Core Team 2023) package *oceanexplorer* and
associated documentation was aided by the packages; *devtools* (Wickham,
Hester, et al. 2022), *roxygen2* (Wickham, Danenberg, et al. 2022),
*testthat* (Wickham 2023), *shinytest* (Chang, Csárdi, and Wickham
2023), *vdiffr* (Henry et al. 2023), *knitr* (Xie 2014 ; Xie 2015),
*rmarkdown* (Xie, Allaire, and Grolemund 2018; Xie, Dervieux, and
Riederer 2020), and the superb guidance in the book: *R packages:
organize, test, document, and share your code*, by Wickham (2015).

Data transformation, cleaning and visualization is performed with:
*dplyr* (Wickham, François, et al. 2022), *ggplot2* (Wickham, Chang, et
al. 2022), and *rlang* (Henry and Wickham 2022).
*dplyr* (Wickham, François, et al. 2023), and *ggplot2* (Wickham, Chang,
et al. 2023).

In addition, this package relies on a set of packages for spatial data
analysis: *sf* (Pebesma 2022a) and *stars* (Pebesma 2022b).
analysis: *sf* (Pebesma 2023a) and *stars* (Pebesma 2023b).

The app is build with *shiny* (Chang et al. 2022) and the guidance in
the book: *Mastering Shiny: Build Interactive Apps, Reports &
Dashboards* (Wickham 2020) was a great help in learning how to develop
such applications. Furthermore, the packages *shinyjs* (Attali 2021),
*waiter* (Coene 2022), *bslib* (Sievert and Cheng 2022) and *thematic*
(Sievert, Schloerke, and Cheng 2021) ensure user-friendliness of the
interface and visually pleasing graphics.
*waiter* (Coene 2022), *bslib* (Sievert, Cheng, and Aden-Buie 2023) and
*thematic* (Sievert, Schloerke, and Cheng 2023) ensure user-friendliness
of the interface and visually pleasing graphics.

## Installation

Expand Down Expand Up @@ -139,7 +139,7 @@ NOAA_addin()

Please note that the oceanexplorer project is released with a
[Contributor Code of
Conduct](https://utrechtuniversity.github.io/oceanexplorer/CODE_OF_CONDUCT.html).
Conduct](https://martinschobben.github.io/oceanexplorer/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.

# References
Expand All @@ -158,75 +158,67 @@ Shiny Apps in Seconds*. <https://deanattali.com/shinyjs/>.
Chang, Winston, Joe Cheng, JJ Allaire, Carson Sievert, Barret Schloerke,
Yihui Xie, Jeff Allen, Jonathan McPherson, Alan Dipert, and Barbara
Borges. 2022. *Shiny: Web Application Framework for r*.
<https://shiny.rstudio.com/>.
<https://shiny.posit.co/>.

</div>

<div id="ref-shinytest" class="csl-entry">

Chang, Winston, Gábor Csárdi, and Hadley Wickham. 2021. *Shinytest: Test
Chang, Winston, Gábor Csárdi, and Hadley Wickham. 2023. *Shinytest: Test
Shiny Apps*. <https://github.com/rstudio/shinytest>.

</div>

<div id="ref-waiter" class="csl-entry">

Coene, John. 2022. *Waiter: Loading Screen for Shiny*.
<https://CRAN.R-project.org/package=waiter>.
<https://waiter.john-coene.com/>.

</div>

<div id="ref-vdiffr" class="csl-entry">

Henry, Lionel, Thomas Lin Pedersen, T Jake Luciani, Matthieu Decorde,
and Vaudor Lise. 2022. *Vdiffr: Visual Regression Testing and Graphical
Diffing*. <https://CRAN.R-project.org/package=vdiffr>.

</div>

<div id="ref-rlang" class="csl-entry">

Henry, Lionel, and Hadley Wickham. 2022. *Rlang: Functions for Base
Types and Core r and Tidyverse Features*.
<https://CRAN.R-project.org/package=rlang>.
and Vaudor Lise. 2023. *Vdiffr: Visual Regression Testing and Graphical
Diffing*. <https://vdiffr.r-lib.org/>.

</div>

<div id="ref-sf" class="csl-entry">

Pebesma, Edzer. 2022a. *Sf: Simple Features for r*.
<https://CRAN.R-project.org/package=sf>.
Pebesma, Edzer. 2023a. *Sf: Simple Features for r*.
<https://r-spatial.github.io/sf/>.

</div>

<div id="ref-stars" class="csl-entry">

———. 2022b. *Stars: Spatiotemporal Arrays, Raster and Vector Data
Cubes*. <https://CRAN.R-project.org/package=stars>.
———. 2023b. *Stars: Spatiotemporal Arrays, Raster and Vector Data
Cubes*. <https://r-spatial.github.io/stars/>.

</div>

<div id="ref-rversion" class="csl-entry">

R Core Team. 2022. *R: A Language and Environment for Statistical
R Core Team. 2023. *R: A Language and Environment for Statistical
Computing*. Vienna, Austria: R Foundation for Statistical Computing.
<https://www.R-project.org/>.

</div>

<div id="ref-bslib" class="csl-entry">

Sievert, Carson, and Joe Cheng. 2022. *Bslib: Custom Bootstrap ’Sass’
Themes for Shiny and Rmarkdown*.
<https://CRAN.R-project.org/package=bslib>.
Sievert, Carson, Joe Cheng, and Garrick Aden-Buie. 2023. *Bslib: Custom
Bootstrap ’Sass’ Themes for Shiny and Rmarkdown*.
<https://rstudio.github.io/bslib/>.

</div>

<div id="ref-thematic" class="csl-entry">

Sievert, Carson, Barret Schloerke, and Joe Cheng. 2021. *Thematic:
Sievert, Carson, Barret Schloerke, and Joe Cheng. 2023. *Thematic:
Unified and Automatic Theming of Ggplot2, Lattice, and Base r Graphics*.
<https://CRAN.R-project.org/package=thematic>.
<https://rstudio.github.io/thematic/>.

</div>

Expand All @@ -246,41 +238,40 @@ Dashboards.* O’Reilly Media, Inc. <https://mastering-shiny.org/>.

<div id="ref-testthat" class="csl-entry">

———. 2022. *Testthat: Unit Testing for r*.
<https://CRAN.R-project.org/package=testthat>.
———. 2023. *Testthat: Unit Testing for r*. <https://testthat.r-lib.org>.

</div>

<div id="ref-ggplot2" class="csl-entry">

Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen,
Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey
Dunnington. 2022. *Ggplot2: Create Elegant Data Visualisations Using the
Grammar of Graphics*. <https://CRAN.R-project.org/package=ggplot2>.
Dunnington. 2023. *Ggplot2: Create Elegant Data Visualisations Using the
Grammar of Graphics*. <https://ggplot2.tidyverse.org>.

</div>

<div id="ref-roxygen2" class="csl-entry">

Wickham, Hadley, Peter Danenberg, Gábor Csárdi, and Manuel Eugster.
2022. *Roxygen2: In-Line Documentation for r*.
<https://CRAN.R-project.org/package=roxygen2>.
<https://roxygen2.r-lib.org/>.

</div>

<div id="ref-dplyr" class="csl-entry">

Wickham, Hadley, Romain François, Lionel Henry, and Kirill Müller. 2022.
*Dplyr: A Grammar of Data Manipulation*.
<https://CRAN.R-project.org/package=dplyr>.
Wickham, Hadley, Romain François, Lionel Henry, Kirill Müller, and Davis
Vaughan. 2023. *Dplyr: A Grammar of Data Manipulation*.
<https://dplyr.tidyverse.org>.

</div>

<div id="ref-devtools" class="csl-entry">

Wickham, Hadley, Jim Hester, Winston Chang, and Jennifer Bryan. 2021.
Wickham, Hadley, Jim Hester, Winston Chang, and Jennifer Bryan. 2022.
*Devtools: Tools to Make Developing r Packages Easier*.
<https://CRAN.R-project.org/package=devtools>.
<https://devtools.r-lib.org/>.

</div>

Expand All @@ -289,7 +280,7 @@ Wickham, Hadley, Jim Hester, Winston Chang, and Jennifer Bryan. 2021.
Xie, Yihui. 2014. “Knitr: A Comprehensive Tool for Reproducible Research
in R.” In *Implementing Reproducible Computational Research*, edited by
Victoria Stodden, Friedrich Leisch, and Roger D. Peng. Chapman;
Hall/CRC. <http://www.crcpress.com/product/isbn/9781466561595>.
Hall/CRC.

</div>

Expand Down
2 changes: 1 addition & 1 deletion man/oceanexplorer-package.Rd

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

0 comments on commit ec2e2ef

Please sign in to comment.