From 38ac5bdf60feb4e7eb7bc0a413fd3a96846d0c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Mon, 9 Sep 2024 08:04:11 +0200 Subject: [PATCH] docs: change title of main vignette thx @MargaretSiple-NOAA --- vignettes/emodnet.wfs.Rmd | 70 ++++++++++++++-------------------- vignettes/emodnet.wfs.Rmd.orig | 16 ++++---- 2 files changed, 37 insertions(+), 49 deletions(-) diff --git a/vignettes/emodnet.wfs.Rmd b/vignettes/emodnet.wfs.Rmd index 619b356..9c611bf 100644 --- a/vignettes/emodnet.wfs.Rmd +++ b/vignettes/emodnet.wfs.Rmd @@ -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} @@ -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 -#> -#> 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 , class , -#> # format , layer_namespace +#> data_source service_name service_url layer_name title abstract class format layer_namespace +#> +#> 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 ``` @@ -137,13 +130,11 @@ emodnet_get_layer_info( ) #> # A tibble: 3 × 9 #> # Rowwise: -#> data_source service_name service_url layer_name title -#> -#> 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 , class , -#> # format , layer_namespace +#> data_source service_name service_url layer_name title abstract class format layer_namespace +#> +#> 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 ``` @@ -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 "art17_hab_1110.13", "art17_hab_1110.22", "art17_hab_1110.25", "ar… -#> $ habitat_code "1110", "1110", "1110", "1110", "1110", "1110", "1110", "1110", "1… -#> $ ms "DK", "ES", "ES", "PT", "PT", "PL", "DK", "FR", "UK", "BE", "BE", … -#> $ region "ATL", "MAC", "MMAC", "MMAC", "MATL", "MBAL", "MBAL", "MATL", "MAT… -#> $ cs_ms "U2+", "U1+", "U1+", "XX", "U1-", "U1-", "U1-", "U1x", "U1x", "U1x… -#> $ country_code "Denmark", "Spain", "Spain", "Portugal", "Portugal", "Poland", "De… -#> $ habitat_code_uri "http://dd.eionet.europa.eu/vocabulary/art17_2018/habitats/1110", … -#> $ habitat_description "Sandbanks which are slightly covered by sea water all the time", … -#> $ geom MULTISURFACE (POLYGON ((420..., MULTISURFACE (POLYGON… +#> $ gml_id "art17_hab_1110.13", "art17_hab_1110.22", "art17_hab_1110.25", "art17_hab_11… +#> $ habitat_code "1110", "1110", "1110", "1110", "1110", "1110", "1110", "1110", "1110", "111… +#> $ ms "DK", "ES", "ES", "PT", "PT", "PL", "DK", "FR", "UK", "BE", "BE", "GR", "DE"… +#> $ region "ATL", "MAC", "MMAC", "MMAC", "MATL", "MBAL", "MBAL", "MATL", "MATL", "ATL",… +#> $ cs_ms "U2+", "U1+", "U1+", "XX", "U1-", "U1-", "U1-", "U1x", "U1x", "U1x", "U1x", … +#> $ country_code "Denmark", "Spain", "Spain", "Portugal", "Portugal", "Poland", "Denmark", "F… +#> $ habitat_code_uri "http://dd.eionet.europa.eu/vocabulary/art17_2018/habitats/1110", "http://dd… +#> $ habitat_description "Sandbanks which are slightly covered by sea water all the time", "Sandbanks… +#> $ geom MULTISURFACE (POLYGON ((420..., MULTISURFACE (POLYGON ((195...,… ``` diff --git a/vignettes/emodnet.wfs.Rmd.orig b/vignettes/emodnet.wfs.Rmd.orig index f154d50..bea997f 100644 --- a/vignettes/emodnet.wfs.Rmd.orig +++ b/vignettes/emodnet.wfs.Rmd.orig @@ -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} @@ -12,7 +12,7 @@ knitr::opts_chunk$set( collapse = TRUE, comment = "#>", echo = TRUE, eval = TRUE, warning = FALSE, - fig.path = "EMODnetWFS-" + fig.path = "emodnet.wfs-" ) ``` @@ -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 @@ -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) @@ -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( @@ -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.