Skip to content

Commit

Permalink
doc: review vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Feb 24, 2024
1 parent 9aa079f commit a55b958
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions vignettes/data-visualization.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ library(ggplot2)
Before going any further, we will download the latest version of the FORCIS database.

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

Expand All @@ -48,10 +51,11 @@ 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.
**NB:** In this vignette, we use a subset of the PUMP data, not the whole dataset.


## World base map
Expand All @@ -77,7 +81,7 @@ The function `ggmap_data()` can be used to plot FORCIS data on a World map. Let'
ggmap_data(pump_data)
```

This function works on the output of various functions available in the `forcis` package. For example:
This function works with the output of various functions available in the `forcis` package. For example:

```{r 'ggmap-filtered-data', echo=TRUE, fig.height=11, fig.width=20}
# Filter pump data ----
Expand Down
4 changes: 2 additions & 2 deletions vignettes/database-versions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ Note that the FORCIS database is saved in `forcis-db/version-99/`, where `99` is

If for some reasons the user wants to freeze the version he/she uses, it is possible to disable this message by setting the argument `check_for_update` to `FALSE` in the `read_*_data()` functions.

It is also possible to disable this message globally with the following line:
It is also possible to disable this message globally for the current session:

```{r 'disable-message'}
options(check_for_update = FALSE)
```

The package `forcis` "knows" which version of the database you used last time. A hidden file `.forcis` is created/updated each time the function `download_forcis_db()` or `read_*_data()` is called. This hidden file contains one line:
The package `forcis` _"knows"_ which version of the database you used last time. A hidden file `.forcis` is created/updated each time the function `download_forcis_db()` or `read_*_data()` is called. This hidden file contains one line:

```
FORCIS_VERSION=99
Expand Down

0 comments on commit a55b958

Please sign in to comment.