A collection of R-based geospatial tutorials demonstrating how to access and analyze marine biological and environmental data from EMODnet Biology and other EMODnet thematic services using the emodnet.wfs and emodnet.wcs R packages.
These tutorials provide practical, reproducible workflows for working with EMODnet's Web Feature Service (WFS) and Web Coverage Service (WCS) data. They cover a range of marine spatial analysis scenarios, from basic data access to complex multi-source integrations.
-
Detecting Overlaps Between Marine Protected Areas and Subsea Infrastructure - Uses
emodnet.wfsto identify spatial overlaps between MPAs and human activities in the North Sea -
Accessing and Analyzing WCS Raster Layers - Demonstrates
emodnet.wcsby exploring zooplankton distributions in relation to plaice nursery grounds -
Combining WFS and WCS Data - Integrates vector and raster data to investigate biodiversity change in relation to depth in the North Sea
-
Integrating Multiple Data Sources - Advanced tutorial combining EMODnet services with Copernicus Marine Service data and trait databases to explore functional ecology in the Aegean Sea
The tutorials are available as an interactive website at: https://emodnet.github.io/emodnet-bio-r-geo-tutorials/
To follow along with the tutorials, you'll need:
Required Knowledge:
- Basic to intermediate R programming
- Familiarity with geospatial concepts (vectors, rasters, coordinate reference systems)
- Understanding of pipe operators (
|>or%>%)
Software:
- R (≥ 4.1.0) - Download here
- RStudio (recommended) - Download here
The tutorials are bundled as an R package with helper functions and cached data. Installing the package from GitHub also pulls in every R dependency the tutorials need (including emodnet.wfs and emodnet.wcs, plus website-only extras), so this is a single one-liner:
# install pak if you don't have it
install.packages("pak")
# install the tutorials package and ALL dependencies
# (Imports + Suggests from DESCRIPTION, plus website-only deps)
pak::pak(
"EMODnet/emodnet-bio-r-geo-tutorials",
dependencies = c("all", "Config/Needs/website")
)emodnet.wfs is on CRAN; emodnet.wcs is installed from the EMODnet/emodnet.wcs GitHub repository via the Remotes: field in DESCRIPTION. pak resolves both transparently.
If you want to work through the tutorials in your own R environment:
-
Clone the repository:
git clone https://github.com/EMODnet/emodnet-bio-r-geo-tutorials.git cd emodnet-bio-r-geo-tutorials -
Install required packages (see R Package Installation above)
-
Open tutorial files:
- Tutorial files are in the
tutorials/directory (.qmdfiles) - Open them in RStudio or your preferred editor
- Run code chunks interactively (
Ctrl/Cmd + Enter)
- Tutorial files are in the
-
Work through at your own pace:
- Code chunks can be run independently
- Modify code to explore different scenarios
- Create your own variations based on the examples
If you want to preview the full website or contribute changes:
-
Install Quarto (≥ 1.5): Download here
-
Clone and setup:
git clone https://github.com/EMODnet/emodnet-bio-r-geo-tutorials.git cd emodnet-bio-r-geo-tutorials -
Install R packages (see R Package Installation)
-
Preview the site:
quarto preview
- Opens browser with live-reloading preview
- Changes auto-refresh as you edit
-
Build the site:
quarto render
- Generates site in
_site/directory - Check
_site/index.htmlto verify build
- Generates site in
-
Refresh caches before submitting PRs:
# Remove freeze cache and re-execute all code rm -rf _freeze/ quarto render --cache-refresh # Or for a single tutorial rm -rf _freeze/tutorials/tutorial-01/ quarto render tutorials/tutorial-01.qmd --cache-refresh
This ensures tutorials run correctly with current package versions. See CONTRIBUTING.md for details on caching.
If the CI/CD workflow fails:
1. Check the workflow run:
2. Common issues:
- R package errors: Package versions may have changed - update
DESCRIPTION - EMODnet service issues: WFS/WCS endpoints may be temporarily down - check EMODnet status
- Broken links: Check the "Check links with Lychee" step job summary
- Render errors: Test locally with
quarto renderto reproduce
3. Broken links (scheduled runs):
- Weekly checks create issues with label
scheduled-check - Review and fix broken external links or update exclusions
- Internal links usually indicate missing files or incorrect paths
4. Test locally first:
# Reproduce the CI environment
quarto render
# If successful locally but fails in CI, check package versions5. Need help?
- Open an issue
- Tag maintainers if urgent
We welcome contributions! Whether you want to:
- Report a bug or suggest improvements
- Add a new tutorial
- Fix errors or improve documentation
Please see CONTRIBUTING.md for detailed guidelines on the contribution process.
This project uses a dual license:
- Tutorial content (text, documentation): CC-BY 4.0
- Code (R scripts, functions): MIT License
See LICENSE for an overview and individual license files for full legal text.
If you use these tutorials in your research or teaching, please cite them using the information provided in our CITATION.cff file.
On GitHub: Click the "Cite this repository" button in the repository sidebar to get formatted citations in various styles (APA, BibTeX, etc.).
Manual citation format:
Krystalli, A. (2025). EMODnet Biology R Geospatial Tutorials [Data set].
https://github.com/EMODnet/emodnet-bio-r-geo-tutorials
- EMODnet: emodnet.eu
- emodnet.wfs Package: github.com/EMODnet/emodnet.wfs
- emodnet.wcs Package: github.com/EMODnet/emodnet.wcs
- Tutorial Website: emodnet.github.io/emodnet-bio-r-geo-tutorials
- Report issues: GitHub Issues
- Questions: Open a Discussion
The European Marine Observation and Data Network (EMODnet) is financed by the European Union under Regulation (EU) 2021/1139 of the European Parliament and of the Council of 7 July 2021 establishing the European Maritime, Fisheries and Aquaculture Fund. Ref: CINEA/EMFAF/2022/3.5.2/SI2.895681
Copyright © 2025 European Climate, Infrastructure and Environment Executive Agency (CINEA).
Thanks to Maëlle Salmon (@maelle) and Joana Beja (@JoBeja) for thorough review of the tutorials and supporting documentation.