Skip to content

Commit 59e378b

Browse files
committed
modify README
1 parent 8b31868 commit 59e378b

1 file changed

Lines changed: 54 additions & 14 deletions

File tree

README.md

Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,46 @@ $dataEX$QA
191191

192192
So the result is a list of the metadata of the extraction in the `metaEX` tibble and the result of the extraction in the `dataEX` tibble.
193193

194+
Many CARDs are available. If you want to have a look of every current possibility, use the `CARD_list_all()` function
195+
``` R
196+
metaEX_all = CARD_list_all()
197+
```
198+
which gives
199+
``` R
200+
> metaEX_all
201+
# A tibble: 565 × 20
202+
variable_en unit_en name_en description_en method_en sampling_period_en
203+
<chr> <chr> <chr> <chr> <chr> <chr>
204+
1 ETPA mm Cumula"" "" 09-01, 08-31
205+
2 BFI_Wal withouBasefl"Ratio betwe…" "1. no …" NA
206+
3 BFM withouBasefl"" "1. no …" NA
207+
4 delta{BFI}_LH_withouChange"Ratio betwe…" "1. no …" NA
208+
5 delta{BFI}_LH_withouChange"Ratio betwe…" "1. no …" NA
209+
6 delta{BFI}_LH_withouChange"Ratio betwe…" "1. no …" NA
210+
7 delta{BFI}_WalwithouChange"Ratio betwe…" "1. no …" NA
211+
8 delta{BFI}_WalwithouChange"Ratio betwe…" "1. no …" NA
212+
9 delta{BFI}_WalwithouChange"Ratio betwe…" "1. no …" NA
213+
10 delta{centerBFday Averag"Date when 5…" "1. ann…" 09-01, 08-31
214+
# ℹ 555 more rows
215+
# ℹ 14 more variables: topic_en <chr>, variable_fr <chr>, unit_fr <chr>,
216+
# name_fr <chr>, description_fr <chr>, method_fr <chr>,
217+
# sampling_period_fr <chr>, topic_fr <chr>, source <chr>,
218+
# preferred_hydrological_month <int>, is_date <lgl>, to_normalise <lgl>,
219+
# palette <chr>, script_path <chr>
220+
# ℹ Use `print(n = ...)` to see more rows
221+
```
222+
223+
Based on that, you can for example filter variable by their topic with
224+
``` R
225+
metaEX_low_flow = dplyr::filter(metaEX_all, grepl("Low Flow", topic_en))
226+
```
227+
and get the name of all the available CARDs with
228+
``` R
229+
metaEX_low_flow$variable_en
230+
```
231+
232+
233+
#### Complex workflow
194234
In a similar, more complex way, you can extract multiple variables at a time with more than one discharge series,
195235
``` R
196236
# For one station
@@ -277,24 +317,24 @@ $dataEX$QA
277317

278318

279319
#### Custom workflow
280-
Maybe you can't find the CARD that you want so you want to try to customize one or even create one based on other example. To do so, you need to first get the CARD example that you want in a local directory with for example
281-
``` R
282-
CARD_management(CARD_name=c("VCN10-5"), CARD_path="CARD-WIP")
283-
```
284-
that will create the `VCN10-5.R` CARD in the directory `"CARD-WIP"` of your working directory.
320+
Maybe you can't find the CARD that you want so you want to try to customize one or even create a new one based on another example. To do so, get the example CARD you want in a local directory by running
321+
```R
322+
CARD_management(CARD_name = c("VCN10-5"), CARD_path = "CARD-WIP")
323+
```
324+
This will create the `VCN10-5.R` CARD in the `"CARD-WIP"` directory of your working directory.
285325
286-
From that point, you can open this R file and for example change the metadata and the return period parameter from `5` to `10` in order to get the `VCN10-10` so the annual minimum of 10-day mean daily discharge with a return period of 10 years instead of 5.
326+
From there, you can open this R file and, for example, change the metadata and the return period parameter from `5` to `10` to get the `VCN10-10` CARD, which represents the annual minimum of 10-day mean daily discharge with a return period of 10 years instead of 5.
287327
288-
And now for the extraction, just run
289-
``` R
290-
res = CARD_extraction(data, CARD_name=NULL,
291-
CARD_path="CARD-WIP")
292-
```
293-
in order to perform the extraction of all the CARD in the `CARD_path` directory.
328+
For the extraction, simply run
329+
```R
330+
res = CARD_extraction(data, CARD_name = NULL,
331+
CARD_path = "CARD-WIP")
332+
```
333+
This will perform the extraction of all the CARDs in the `CARD_path` directory.
294334
295-
If you want to make a selection of the variable to extract in your custom CARD directory, simply use the variable `CARD_name` like previously seen in the [basic workflow](#basic-workflow) section.
335+
If you want to select specific variables to extract from your custom CARD directory, just use the `CARD_name` variable as seen in the [basic workflow](#basic-workflow) section.
296336
297-
Take a look at the [EXstat.CARD documentation](https://github.com/super-lou/EXstat.CARD?tab=readme-ov-file#exstatcard-) to better understand the CARD formatting.
337+
For a deeper understanding of the CARD formatting, refer to the [EXstat.CARD documentation](https://github.com/super-lou/EXstat.CARD?tab=readme-ov-file#exstatcard-).
298338
299339
300340
### Trend analyse

0 commit comments

Comments
 (0)