Skip to content

Commit

Permalink
fix fig.cap and btn css for pdf output
Browse files Browse the repository at this point in the history
* also re-enabled pdf output
  • Loading branch information
EliLawrence committed Dec 12, 2024
1 parent 37d6e37 commit 19bfce3
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 29 deletions.
8 changes: 6 additions & 2 deletions checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ Note that when you publish your dataset on the IPT, if you use a term not listed
- Terms marked with 1 indicate that the specified term is accepted in the Event or Occurrence table, but preference is that they be recorded in the eMoF table in the measurementType column so they can be linked with controlled vocabulary
- For the Occurrence table, distinction is made if the term could be used in the core or the extension table

```{r, echo=F}
```{r echo=F, results='asis'}
library(downloadthis)
library(webshot)
download_file(
if (knitr::is_html_output()) {
download_file(
path = "docs/OBIS-termchecklist.csv",
output_name = "OBISchecklist",
output_extension = ".csv",
Expand All @@ -28,6 +29,9 @@ download_file(
style = "background-color: #1e74ac; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 5px;
margin-top: 5px; margin-bottom: 20px;"
)
} else {
cat("[Click here to download the checklist](https://github.com/iobis/manual/raw/refs/heads/master/docs/OBIS-termchecklist.csv)")
}
```

| Term | OBIS Required | Term's DarwinCore Class | Event core | Occurrence core | Occurrence extension | eMoF Table | DNA Table |
Expand Down
4 changes: 3 additions & 1 deletion darwin_core.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ The name of the place or location can be provided in `locality`, and if possible

[Well-Known Text](https://en.wikipedia.org/wiki/Well-known_text) (WKT) provides a representation of the geoemtry of a location and can be provided in `footprintWKT`. This is particularly useful for tracks, transects, tows, trawls, habitat extents, or when an exact location is not known. You can use the [OBIS Maptool](https://obis.org/maptool) (Figure 2.1) to generate WKT, calculate midpoints of lines and polygons, and determine the radius of a polygon or line. Midpoints can used to populate `decimalLongitude` and `decimalLatitude`, while the radius can be used to populate `coordinateUncertaintyInMeters`. Additionally, an [obistools R function](https://github.com/iobis/obistools#calculate-centroid-and-radius-for-wkt-geometries) can calculate centroids and radii. To visualize and share WKT strings, try [wktmap.com](https://wktmap.com).

```{r fig-wkt, fig.cap = "*A screenshot demonstrating the OBIS Maptool's WKT function. After generating a polygon, pressing the WKT button will open a pop-up where you can copy the string. The Locations table provides the longitude, latitude, and radius to be used in `decimalLongitude`, `decimalLatitude`, and `coordinateUncertaintyInMeters` respectively*.",echo=FALSE, out.width = "90%"}
```{r fig-wkt, echo=FALSE, out.width = "90%"}
#| fig.cap = knitr::asis_output("A screenshot demonstrating the OBIS Maptool's WKT function. After generating a polygon, pressing the WKT button will open a pop-up where you can copy the string. The Locations table provides the longitude, latitude, and radius to be used in `decimalLongitude`, `decimalLatitude`, and `coordinateUncertaintyInMeters` respectively.")
library(webshot)
knitr::include_graphics("images/wkttool2.png")
```
Expand Down
56 changes: 37 additions & 19 deletions examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

In this section we will encode a fictional macroalgal survey dataset (Figure 9.1) into Darwin Core using the ENV-DATA approach, i.e. using an Event core with an Occurrence extension and an extendedMeasurementOrFact extension.

```{r fig-macroal, fig.cap = "*A fictional macroalgae survey with a single site, multiple zones, quadrats, and different types of transects.*.",echo=FALSE, out.width = "95%"}
```{r fig-macroal, fig.cap = "A fictional macroalgae survey with a single site, multiple zones, quadrats, and different types of transects.", echo=FALSE, out.width = "95%"}
library(webshot)
knitr::include_graphics("images/dwca_macroalgae_survey.png")
```
Expand Down Expand Up @@ -102,10 +102,11 @@ The example for ENV-DATA collected with marine bird sightings/occurrences is bas

For this dataset, human observation recorded individual bird sightings (thus, each specimen is a single occurrence). The dataset contains abiotic measurements (ENV-DATA) which are related to each individual sighting, instead of an entire sample. Therefore, we can create an Occurrence core with an eMoF extension that contain the abiotic environmental measurements or facts.

```{r echo=FALSE}
```{r echo=FALSE, results='asis'}
library(webshot)
library(downloadthis)
downloadthis::download_link(
if (knitr::is_html_output()) {
downloadthis::download_link(
link = "https://www.marine.csiro.au/ipt/archive.do?r=in2017_v02_wov&v=1.15",
button_label = "Download dataset DwC-A .zip",
button_type = "default",
Expand All @@ -115,7 +116,9 @@ downloadthis::download_link(
class = "hvr-sweep-to-left",
style = "background-color: #1e74ac; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 5px;
margin-top: 5px; margin-bottom: 20px;"
)
)} else {
cat("[Download the dataset](https://ipt.vliz.be/eurobis/archive.do?r=cetus_cetaceans&v=1.0)")
}
```

**Occurrence core:**
Expand Down Expand Up @@ -148,15 +151,16 @@ As shown in previous examples, the MeasurementOrFact extension table contains ab

In this section we will explore how to encode a marine mammal survey dataset into Darwin Core using the ENV-DATA approach. As an example, sections of the actual dataset [CETUS: Cetacean monitoring surveys in the Eastern North Atlantic](http://ipt.vliz.be/eurobis/resource?r=cetus_cetaceans) are used.

```{r fig-cetus, fig.cap = "*A representation of the observation events of [CETUS: Cetacean monitoring surveys in the Eastern North Atlantic](http://ipt.vliz.be/eurobis/resource?r=cetus_cetaceans), presenting the route **Madeira** as a site with three cruises (zones). Each **Cruise** is divided into different **Transects** and each transect contains a number of **Positions***.",echo=FALSE, out.width = "95%"}
```{r fig-cetus, fig.cap = "A representation of cetacean observation events from CETUS: Cetacean monitoring surveys in the Eastern North Atlantic, presenting the route Madeira as a site with three cruises (zones). Each Cruise is divided into different Transects and each transect contains a number of Positions.", echo=FALSE, out.width = "95%"}
library(webshot)
knitr::include_graphics("images/ENV_example_CETUS.png")
```

```{r echo=FALSE}
```{r echo=FALSE, results='asis'}
library(webshot)
library(downloadthis)
downloadthis::download_link(
if (knitr::is_html_output()) {
downloadthis::download_link(
link = "https://ipt.vliz.be/eurobis/archive.do?r=cetus_cetaceans&v=1.0",
button_label = "Download dataset DwC-A .zip",
button_type = "default",
Expand All @@ -166,7 +170,9 @@ downloadthis::download_link(
class = "hvr-sweep-to-left",
style = "background-color: #1e74ac; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 5px;
margin-top: 5px; margin-bottom: 20px;"
)
)} else {
cat("[Download the dataset](https://ipt.vliz.be/eurobis/archive.do?r=cetus_cetaceans&v=1.0)")
}
```

**Event core:**
Expand Down Expand Up @@ -218,10 +224,10 @@ And finally, the extendedMeasurementOrFact extension table has attributes of the

This section deals with encoding survey and/or sighting data of sea turtles into Darwin Core using the ENV-DATA approach. Extracts from the actual dataset [Presence of sea turtles collected through Fixed-Line-Transect monitoring across the Western Mediterranean Sea (Civitavecchia-Barcelona route) between 2013 and 2017](https://ipt.vliz.be/eurobis/resource?r=cc_flt_cbar_13-17#anchor-description) are used as an example.

```{r echo=FALSE}
```{r echo=FALSE, results='asis'}
library(webshot)
library(downloadthis)
downloadthis::download_link(
if (knitr::is_html_output()) {downloadthis::download_link(
link = "https://ipt.vliz.be/eurobis/archive.do?r=cc_flt_cbar_13-17&v=1.0",
button_label = "Download dataset DwC-A .zip",
button_type = "default",
Expand All @@ -232,6 +238,9 @@ downloadthis::download_link(
style = "background-color: #1e74ac; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 5px;
margin-top: 5px; margin-bottom: 20px;"
)
} else {
cat("[Download the dataset](https://ipt.vliz.be/eurobis/archive.do?r=cetus_cetaceans&v=1.0)")
}
```

**Event core:**
Expand Down Expand Up @@ -289,10 +298,11 @@ In addition to the measurements recorded by the example dataset, other measureme

This example deals with encoding phytoplankton observation data, including environmental data, into Darwin Core. Extracts from the actual dataset [LifeWatch observatory data: phytoplankton observations by imaging flow cytometry (FlowCam) in the Belgian Part of the North Sea](https://obis.org/dataset/956d618f-91dc-4930-a253-cdf80ddb9371), are used as an example. Phytoplankton data should adhere to guidelines by Martin-Cabrera et al., 2022: [Best practices and recommendations for plankton imaging data management: Ensuring effective data flow towards European data infrastructures. Version 1](http://dx.doi.org/10.25607/OBP-1742). Specific guidelines for the Occurrence and eMoF tables are documented in this publication, and we emphasize important fields in this example.

```{r echo=FALSE}
```{r echo=FALSE, results='asis'}
library(webshot)
library(downloadthis)
downloadthis::download_link(
if (knitr::is_html_output()) {
downloadthis::download_link(
link = "https://ipt.vliz.be/eurobis/archive.do?r=fyto&v=1.0",
button_label = "Download dataset DwC-A .zip",
button_type = "default",
Expand All @@ -302,7 +312,9 @@ downloadthis::download_link(
class = "hvr-sweep-to-left",
style = "background-color: #1e74ac; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 5px;
margin-top: 5px; margin-bottom: 20px;"
)
)} else {
cat("[Download the dataset](https://ipt.vliz.be/eurobis/archive.do?r=cetus_cetaceans&v=1.0)")
}
```

**Event core:**
Expand Down Expand Up @@ -351,10 +363,11 @@ The structure of the Event, Occurrence and extendedMeasurementOrFact extensions

Here we align seagrass survey data to Darwin Core according to the ENV-DATA approach and using sections of the actual dataset [Seagrass Monitoring at Chengue Bay, Colombia](http://ipt.iobis.org/caribbeanobis/resource?r=seagrasssurvey_colombia) as an example.

```{r echo=FALSE}
```{r echo=FALSE, results='asis'}
library(webshot)
library(downloadthis)
downloadthis::download_link(
if (knitr::is_html_output()) {
downloadthis::download_link(
link = "https://ipt.iobis.org/caribbeanobis/archive.do?r=seagrasssurvey_colombia&v=1.6",
button_label = "Download dataset DwC-A .zip",
button_type = "default",
Expand All @@ -364,7 +377,9 @@ downloadthis::download_link(
class = "hvr-sweep-to-left",
style = "background-color: #1e74ac; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 5px;
margin-top: 5px; margin-bottom: 20px;"
)
)} else {
cat("[Download the dataset](https://ipt.vliz.be/eurobis/archive.do?r=cetus_cetaceans&v=1.0)")
}
```

**Event core:**
Expand Down Expand Up @@ -414,10 +429,11 @@ The eMoF table contains the measurement information and data of each occurrence.

Here we will encode zooplankton observation and environmental data into Darwin Core. Extracts from the actual dataset [LifeWatch observatory data: zooplankton observations by imaging (ZooScan) in the Belgian Part of the North Sea](https://obis.org/dataset/afa5b0e8-826d-4433-b698-beb176ef7880), are used as an example. As with the phytoplankton example, zooplankton data should also adhere to guidelines by Martin-Cabrera et al., 2022: [Best practices and recommendations for plankton imaging data management: Ensuring effective data flow towards European data infrastructures. Version 1.](http://dx.doi.org/10.25607/OBP-1742). These Best Practices indicate that for imaging data like this example, the fields `identificationVerificationStatus` and `identifiedBy` are crucial to know whether the data has been validated, and by whom. `identificationReferences` is used to document the citation or algorithm software used in identification. When possible, `associatedMedia` should also be populated with the persistent URL of annotated images.

```{r echo=FALSE}
```{r echo=FALSE, results='asis'}
library(webshot)
library(downloadthis)
downloadthis::download_link(
if (knitr::is_html_output()) {
downloadthis::download_link(
link = "https://ipt.vliz.be/eurobis/archive.do?r=lifewatch_zooplankton&v=1.0",
button_label = "Download dataset DwC-A .zip",
button_type = "default",
Expand All @@ -427,7 +443,9 @@ downloadthis::download_link(
class = "hvr-sweep-to-left",
style = "background-color: #1e74ac; color: white; border: none; padding: 10px 20px; font-size: 16px; border-radius: 5px;
margin-top: 5px; margin-bottom: 20px;"
)
)} else {
cat("[Download the dataset](https://ipt.vliz.be/eurobis/archive.do?r=cetus_cetaceans&v=1.0)")
}
```

**Event core:**
Expand Down
4 changes: 2 additions & 2 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ header-includes:
- \setlist[itemize,2]{label=--}
- \setlist[itemize,3]{label=*}
output:
#bookdown::pdf_book:
# template: null
bookdown::pdf_book:
template: null
bookdown::gitbook:
toc_depth: 3
includes:
Expand Down
5 changes: 0 additions & 5 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ table {
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.btn { /* for download buttons */
border-style: solid;
border-width: 0 1px 4px 1px;
text-transform: uppercase;
}
.hvr-sweep-to-left:before {
content: "";
position: absolute;
Expand Down

0 comments on commit 19bfce3

Please sign in to comment.