The oceanexplorer

Project Status: Active – The project has reached a stable, usable state and is being actively developed. license Codecov test coverage R-CMD-check

The goal of oceanexplorer is to enable easy access and exploration of the World Ocean Atlas of the US agency NOAA.

Demo of the ocean explorer app

Check the app

Check the app here:


This project was funded by ERC Starting grant number 802835, OceaNice, awarded to Peter Bijl.


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. 2023), and ggplot2 (Wickham, Chang, et al. 2023).

In addition, this package relies on a set of packages for spatial data 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, Cheng, and Aden-Buie 2023) and thematic (Sievert, Schloerke, and Cheng 2023) ensure user-friendliness of the interface and visually pleasing graphics.


You can install the latest version of oceanexplorer from CRAN

# Install oceanexplorer from CRAN: 


The package allows extraction of global databases of several physical and chemical parameters of the ocean from the NOAA World Ocean Atlas.

# obtain the NOAA world ocean atlas for oxygen content
oxy_global <- get_NOAA("oxygen", 1, "annual")

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

# filter a depth of 200 meters to show OMZs
(oxy_omz <- filter_NOAA(oxy_global, depth = 200))
#> stars object with 2 dimensions and 1 attribute
#> attribute(s):
#>            Min.  1st Qu.   Median     Mean  3rd Qu.     Max.  NA's
#> o_an  0.9701567 164.1833 218.6721 206.2584 266.9612 359.0279 26041
#> dimension(s):
#>     from  to offset delta refsys x/y
#> lon    1 360   -180     1 WGS 84 [x]
#> lat    1 180    -90     1 WGS 84 [y]

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

# 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.

# plot the NOAA world ocean atlas for oxygen content
plot_NOAA(oxy_global, depth = 200, rng = range(oxy_omz[[1]]))

Interactive exploration

Lastly, the package can launch a Shiny app for interactive exploration of the datasets.

# launch an interactive shiny session

The RStudio addin can be launched within the RStudio viewer pain by executing the following code, or by using the Addins drop down menu in the task-bar.

# launch an interactive shiny session

Code of Conduct

Please note that the oceanexplorer project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.


Attali, Dean. 2021. Shinyjs: Easily Improve the User Experience of Your Shiny Apps in Seconds.
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.
Chang, Winston, Gábor Csárdi, and Hadley Wickham. 2023. Shinytest: Test Shiny Apps.
Coene, John. 2022. Waiter: Loading Screen for Shiny.
Henry, Lionel, Thomas Lin Pedersen, T Jake Luciani, Matthieu Decorde, and Vaudor Lise. 2023. Vdiffr: Visual Regression Testing and Graphical Diffing.
Pebesma, Edzer. 2023a. Sf: Simple Features for r.
———. 2023b. Stars: Spatiotemporal Arrays, Raster and Vector Data Cubes.
R Core Team. 2023. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing.
Sievert, Carson, Joe Cheng, and Garrick Aden-Buie. 2023. Bslib: Custom Bootstrap ’Sass’ Themes for Shiny and Rmarkdown.
Sievert, Carson, Barret Schloerke, and Joe Cheng. 2023. Thematic: Unified and Automatic Theming of Ggplot2, Lattice, and Base r Graphics.
Wickham, Hadley. 2015. R Packages: Organize, Test, Document, and Share Your Code. O’Reilly Media, Inc.
———. 2020. Mastering Shiny: Build Interactive Apps, Reports & Dashboards. O’Reilly Media, Inc.
———. 2023. Testthat: Unit Testing for r.
Wickham, Hadley, Winston Chang, Lionel Henry, Thomas Lin Pedersen, Kohske Takahashi, Claus Wilke, Kara Woo, Hiroaki Yutani, and Dewey Dunnington. 2023. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics.
Wickham, Hadley, Peter Danenberg, Gábor Csárdi, and Manuel Eugster. 2022. Roxygen2: In-Line Documentation for r.
Wickham, Hadley, Romain François, Lionel Henry, Kirill Müller, and Davis Vaughan. 2023. Dplyr: A Grammar of Data Manipulation.
Wickham, Hadley, Jim Hester, Winston Chang, and Jennifer Bryan. 2022. Devtools: Tools to Make Developing r Packages Easier.
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.
———. 2015. Dynamic Documents with R and Knitr. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC.
Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC.
Xie, Yihui, Christophe Dervieux, and Emily Riederer. 2020. R Markdown Cookbook. Boca Raton, Florida: Chapman; Hall/CRC.