Skip to content

Commit

Permalink
doc: edit vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Mar 6, 2024
1 parent cdf7a92 commit f0976b6
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 5 deletions.
58 changes: 57 additions & 1 deletion vignettes/data-conversion.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,64 @@ knitr::opts_chunk$set(
)
```


> **NOTE:** THIS IS A WORK IN PROGRESS.
The package `forcis` provides [functions](https://frbcesab.github.io/forcis/reference/index.html#standardization-functions) to homogenize FORCIS data and compute abundances, concentrations, and frequencies of foraminifera. This vignette shows how to use these functions.


## Setup

First, let's import the required packages.

```{r setup}
library(forcis)
```

Work in progress...
Before going any further, we will download the latest version of the FORCIS database.

```{r 'download-db', eval=FALSE}
# Create a data/ folder ----
dir.create("data")
# Download latest version of the database ----
download_forcis_db(path = "data", version = NULL)
```

The vignette will use the PUMP data of the FORCIS database. Let's import the latest release of the data.

```{r 'load-data', echo=FALSE}
file_name <- system.file(file.path("extdata", "FORCIS_pump_sample.csv"), package = "forcis")
pump_data <- vroom::vroom(file_name, delim = ";", show_col_types = FALSE)
```

```{r 'load-data-user', eval=FALSE}
# Import pump data ----
pump_data <- read_pump_data(path = "data")
```

**NB:** In this vignette, we use a subset of the PUMP data, not the whole dataset.



## `compute_abundances()`

Add an illustration of `compute_abundances()`

[...]



## `compute_concentrations()`

Add an illustration of `compute_concentrations()`

[...]



## `compute_frequencies()`

Add an illustration of `compute_frequencies()`

[...]
35 changes: 33 additions & 2 deletions vignettes/data-visualization.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pump_data <- read_pump_data(path = "data")
**NB:** In this vignette, we use a subset of the PUMP data, not the whole dataset.


## World base map
## `geom_basemap()`

The function `geom_basemap()` can be used to easily add World countries, oceans and bounding box to a `ggplot2` object.

Expand All @@ -72,7 +72,7 @@ These layers come from the [Natural Earth](https://www.naturalearthdata.com/) we



## Map FORCIS data
## `ggmap_data()`

The function `ggmap_data()` can be used to plot FORCIS data on a World map. Let's map the PUMP data.

Expand Down Expand Up @@ -135,3 +135,34 @@ ggsave(indian_pump_data_map,
scale = 1.5,
bg = "white")
```


## `plot_record_by_year()`

Add an illustration of `plot_record_by_year()`

[...]



## `plot_record_by_month()`

Add an illustration of `plot_record_by_month()`

[...]



## `plot_record_by_season()`

Add an illustration of `plot_record_by_season()`

[...]



## `plot_record_by_depth()`

Add an illustration of `plot_record_by_depth()`

[...]
44 changes: 43 additions & 1 deletion vignettes/forcis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,50 @@ knitr::opts_chunk$set(
)
```


> **NOTE:** THIS IS A WORK IN PROGRESS.
Add an good introduction of the package.


## Setup

First, let's import the required packages.

```{r setup}
library(forcis)
```

Work in progress...
## Download FORCIS database

Before going any further, we will download the latest version of the FORCIS database.

```{r 'download-db', eval=FALSE}
# Create a data/ folder ----
dir.create("data")
# Download latest version of the database ----
download_forcis_db(path = "data", version = NULL)
```


## Import FORCIS data

The vignette will use the PUMP data of the FORCIS database. Let's import the latest release of the data.

```{r 'load-data', echo=FALSE}
file_name <- system.file(file.path("extdata", "FORCIS_pump_sample.csv"), package = "forcis")
pump_data <- vroom::vroom(file_name, delim = ";", show_col_types = FALSE)
```

```{r 'load-data-user', eval=FALSE}
# Import pump data ----
pump_data <- read_pump_data(path = "data")
```

**NB:** In this vignette, we use a subset of the PUMP data, not the whole dataset.


## Another section

[...]
97 changes: 96 additions & 1 deletion vignettes/select-and-filter-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,103 @@ knitr::opts_chunk$set(
)
```

> **NOTE:** THIS IS A WORK IN PROGRESS.
The package `forcis` provides [a lot of functions](https://frbcesab.github.io/forcis/reference/index.html#select-and-filters-tools) to filter and select FORCIS data. This vignette shows how to use these functions.


## Setup

First, let's import the required packages.

```{r setup}
library(forcis)
```

Work in progress...
Before going any further, we will download the latest version of the FORCIS database.

```{r 'download-db', eval=FALSE}
# Create a data/ folder ----
dir.create("data")
# Download latest version of the database ----
download_forcis_db(path = "data", version = NULL)
```

The vignette will use the PUMP data of the FORCIS database. Let's import the latest release of the data.

```{r 'load-data', echo=FALSE}
file_name <- system.file(file.path("extdata", "FORCIS_pump_sample.csv"), package = "forcis")
pump_data <- vroom::vroom(file_name, delim = ";", show_col_types = FALSE)
```

```{r 'load-data-user', eval=FALSE}
# Import pump data ----
pump_data <- read_pump_data(path = "data")
```

**NB:** In this vignette, we use a subset of the PUMP data, not the whole dataset.



## `select_columns()`

Add an illustration of `select_columns()`

[...]



## `select_taxonomy()`

Add an illustration of `select_taxonomy()`

[...]



## `filter_by_species()`

Add an illustration of `filter_by_species()`

[...]



## `filter_by_month()`

Add an illustration of `filter_by_month()`

[...]



## `filter_by_year()`

Add an illustration of `filter_by_year()`

[...]



## `filter_by_bbox()`

Add an illustration of `filter_by_bbox()`

[...]



## `filter_by_ocean()`

Add an illustration of `filter_by_ocean()`

[...]



## `filter_by_polygon()`

Add an illustration of `filter_by_polygon()`

[...]

0 comments on commit f0976b6

Please sign in to comment.