Skip to content

Commit

Permalink
docs: change title of main vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Sep 9, 2024
1 parent 12720b2 commit 38ac5bd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 49 deletions.
70 changes: 29 additions & 41 deletions vignettes/emodnet.wfs.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "emodnet.wfs Case Study: Accessing and mapping EMODnet data"
title: "Accessing and mapping EMODnet data"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{API details}
Expand Down Expand Up @@ -94,33 +94,26 @@ The column `service_name` shows services available, while `service_url` has the

``` r
seabed_wfs_client <- emodnet_init_wfs_client(service = "seabed_habitats_general_datasets_and_products")
#> Loading ISO 19139 XML schemas...
#> Loading ISO 19115 codelists...
#> ✔ WFS client created successfully
#> ℹ Service: "https://ows.emodnet-seabedhabitats.eu/geoserver/emodnet_open/wfs"
#> ℹ Version: "2.0.0"
```

``` r

emodnet_get_wfs_info(wfs = seabed_wfs_client)
#> # A tibble: 71 × 9
#> # A tibble: 72 × 9
#> # Rowwise:
#> data_source service_name service_url layer_name title
#> <chr> <chr> <chr> <chr> <chr>
#> 1 emodnet_wfs seabed_habitats_ge… https://ow… art17_hab… 2013…
#> 2 emodnet_wfs seabed_habitats_ge… https://ow… art17_hab… 2013…
#> 3 emodnet_wfs seabed_habitats_ge… https://ow… art17_hab… 2013…
#> 4 emodnet_wfs seabed_habitats_ge… https://ow… art17_hab… 2013…
#> 5 emodnet_wfs seabed_habitats_ge… https://ow… art17_hab… 2013…
#> 6 emodnet_wfs seabed_habitats_ge… https://ow… art17_hab… 2013…
#> 7 emodnet_wfs seabed_habitats_ge… https://ow… art17_hab… 2013…
#> 8 emodnet_wfs seabed_habitats_ge… https://ow… art17_hab… 2013…
#> 9 emodnet_wfs seabed_habitats_ge… https://ow… carib_eus… 2023…
#> 10 emodnet_wfs seabed_habitats_ge… https://ow… biogenic_… Biog…
#> # ℹ 61 more rows
#> # ℹ 4 more variables: abstract <chr>, class <chr>,
#> # format <chr>, layer_namespace <chr>
#> data_source service_name service_url layer_name title abstract class format layer_namespace
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 emodnet_wfs seabed_habitats_general… https://ow… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 2 emodnet_wfs seabed_habitats_general… https://ow… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 3 emodnet_wfs seabed_habitats_general… https://ow… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 4 emodnet_wfs seabed_habitats_general… https://ow… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 5 emodnet_wfs seabed_habitats_general… https://ow… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 6 emodnet_wfs seabed_habitats_general… https://ow… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 7 emodnet_wfs seabed_habitats_general… https://ow… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 8 emodnet_wfs seabed_habitats_general… https://ow… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 9 emodnet_wfs seabed_habitats_general… https://ow… carib_eus… 2023… "Output… WFSF… sf emodnet_open
#> 10 emodnet_wfs seabed_habitats_general… https://ow… biogenic_… Biog… "This l… WFSF… sf emodnet_open
#> # ℹ 62 more rows
```


Expand All @@ -137,13 +130,11 @@ emodnet_get_layer_info(
)
#> # A tibble: 3 × 9
#> # Rowwise:
#> data_source service_name service_url layer_name title
#> <chr> <chr> <chr> <chr> <chr>
#> 1 emodnet_wfs https://ows.emodnet… seabed_hab… art17_hab… 2013…
#> 2 emodnet_wfs https://ows.emodnet… seabed_hab… art17_hab… 2013…
#> 3 emodnet_wfs https://ows.emodnet… seabed_hab… art17_hab… 2013…
#> # ℹ 4 more variables: abstract <chr>, class <chr>,
#> # format <chr>, layer_namespace <chr>
#> data_source service_name service_url layer_name title abstract class format layer_namespace
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 emodnet_wfs https://ows.emodnet-seab… seabed_hab… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 2 emodnet_wfs https://ows.emodnet-seab… seabed_hab… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
#> 3 emodnet_wfs https://ows.emodnet-seab… seabed_hab… art17_hab… 2013… "Gridde… WFSF… sf emodnet_open
```


Expand All @@ -160,22 +151,19 @@ habitats_directive_layers <- emodnet_get_layers(

class(habitats_directive_layers)
#> [1] "sf" "data.frame"
```

``` r

glimpse(habitats_directive_layers)
#> Rows: 221
#> Columns: 9
#> $ gml_id <chr> "art17_hab_1110.13", "art17_hab_1110.22", "art17_hab_1110.25", "ar
#> $ habitat_code <chr> "1110", "1110", "1110", "1110", "1110", "1110", "1110", "1110", "1
#> $ ms <chr> "DK", "ES", "ES", "PT", "PT", "PL", "DK", "FR", "UK", "BE", "BE", …
#> $ region <chr> "ATL", "MAC", "MMAC", "MMAC", "MATL", "MBAL", "MBAL", "MATL", "MAT
#> $ cs_ms <chr> "U2+", "U1+", "U1+", "XX", "U1-", "U1-", "U1-", "U1x", "U1x", "U1x…
#> $ country_code <chr> "Denmark", "Spain", "Spain", "Portugal", "Portugal", "Poland", "De
#> $ habitat_code_uri <chr> "http://dd.eionet.europa.eu/vocabulary/art17_2018/habitats/1110", …
#> $ habitat_description <chr> "Sandbanks which are slightly covered by sea water all the time", …
#> $ geom <MULTISURFACE [m]> MULTISURFACE (POLYGON ((420..., MULTISURFACE (POLYGON…
#> $ gml_id <chr> "art17_hab_1110.13", "art17_hab_1110.22", "art17_hab_1110.25", "art17_hab_11
#> $ habitat_code <chr> "1110", "1110", "1110", "1110", "1110", "1110", "1110", "1110", "1110", "111
#> $ ms <chr> "DK", "ES", "ES", "PT", "PT", "PL", "DK", "FR", "UK", "BE", "BE", "GR", "DE"
#> $ region <chr> "ATL", "MAC", "MMAC", "MMAC", "MATL", "MBAL", "MBAL", "MATL", "MATL", "ATL",
#> $ cs_ms <chr> "U2+", "U1+", "U1+", "XX", "U1-", "U1-", "U1-", "U1x", "U1x", "U1x", "U1x",
#> $ country_code <chr> "Denmark", "Spain", "Spain", "Portugal", "Portugal", "Poland", "Denmark", "F
#> $ habitat_code_uri <chr> "http://dd.eionet.europa.eu/vocabulary/art17_2018/habitats/1110", "http://dd
#> $ habitat_description <chr> "Sandbanks which are slightly covered by sea water all the time", "Sandbanks
#> $ geom <MULTISURFACE [m]> MULTISURFACE (POLYGON ((420..., MULTISURFACE (POLYGON ((195...,
```


Expand Down
16 changes: 8 additions & 8 deletions vignettes/emodnet.wfs.Rmd.orig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "EMODnetWFS Case Study: Accessing and mapping EMODnet data"
title: "Accessing and mapping EMODnet data"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{API details}
Expand All @@ -12,7 +12,7 @@ knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
echo = TRUE, eval = TRUE, warning = FALSE,
fig.path = "EMODnetWFS-"
fig.path = "emodnet.wfs-"
)
```

Expand All @@ -24,10 +24,10 @@ The package was designed to make EMODnet vector data layers easily accessible in
## Data Product
### Installation

You can install the development version of `EMODnetWFS` from GitHub with:
You can install the development version of emodnet.wfs from GitHub with:

```{r install, eval = FALSE}
remotes::install_github("EMODnet/EMODnetWFS")
pak::pak("EMODnet/emodnet.wfs")
```

### Explore the EMODnet WFS services with R
Expand All @@ -42,12 +42,12 @@ install.packages(c("sf", "dplyr", "mapview"))



With the `EMODnetWFS` package, we can explore and combine the data served by the [EMODnet lots ](https://www.emodnet.eu/en/portals) through [OGC Web Feature Services](https://en.wikipedia.org/wiki/Web_Feature_Service) or WFS.
With the emodnet.wfs package, we can explore and combine the data served by the [EMODnet lots ](https://www.emodnet.eu/en/portals) through [OGC Web Feature Services](https://en.wikipedia.org/wiki/Web_Feature_Service) or WFS.

Imagine we are interested in seabed substrates. The first step is to choose what EMODnet lot can provide with these data. For that, we can check the services available with the `emodnet_wfs()` function.

```{r error = FALSE, warning = FALSE, message = FALSE}
library(EMODnetWFS)
library(emodnet.wfs)
library(mapview)
library(dplyr)
library(sf)
Expand Down Expand Up @@ -80,7 +80,7 @@ emodnet_get_layer_info(



We are now ready to read the layers into R with `emodnet_get_layers()`. EMODnetWFS reads the geometries as simple features (See `sf` package) transformed to [4326](https://epsg.io/4326) by default. Specifying another map projection is possible by passing a EPGS code or projection string with `emodnet_get_layers(crs = "your projection")`. The argument `reduce_layers = TRUE` stack all the layers in one single tibble. Default is FALSE and returns a list of sf objects, one per layer.
We are now ready to read the layers into R with `emodnet_get_layers()`. emodnet.wfs reads the geometries as simple features (See `sf` package) transformed to [4326](https://epsg.io/4326) by default. Specifying another map projection is possible by passing a EPGS code or projection string with `emodnet_get_layers(crs = "your projection")`. The argument `reduce_layers = TRUE` stack all the layers in one single tibble. Default is FALSE and returns a list of sf objects, one per layer.

```{r}
habitats_directive_layers <- emodnet_get_layers(
Expand Down Expand Up @@ -137,4 +137,4 @@ Tim Appelhans, Florian Detsch, Christoph Reudenbach and Stefan Woellauer (2020).

Please cite this package as:

Anna Krystalli (2020). EMODnetWFS: Access EMODnet Web Feature Service data through R. R package version 0.0.2. https://github.com/EMODnet/EMODnetWFS. Integrated data products created under the European Marine Observation Data Network (EMODnet) Biology project (EASME/EMFF/2017/1.3.1.2/02/SI2.789013), funded by the by the European Union under Regulation (EU) No 508/2014 of the European Parliament and of the Council of 15 May 2014 on the European Maritime and Fisheries Fund.
Anna Krystalli (2020). emodnet.wfs: Access EMODnet Web Feature Service data through R. R package version 0.0.2. https://github.com/EMODnet/emodnet.wfs. Integrated data products created under the European Marine Observation Data Network (EMODnet) Biology project (EASME/EMFF/2017/1.3.1.2/02/SI2.789013), funded by the by the European Union under Regulation (EU) No 508/2014 of the European Parliament and of the Council of 15 May 2014 on the European Maritime and Fisheries Fund.

0 comments on commit 38ac5bd

Please sign in to comment.