You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/hdar.Rmd
+37-25Lines changed: 37 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,6 @@ vignette: >
10
10
%\VignetteEncoding{UTF-8}
11
11
---
12
12
13
-
14
13
# Introduction
15
14
16
15
The `hdar` R package provides seamless access to the WEkEO Harmonised Data Access (HDA) API, enabling users to programmatically query and download data from within R.
@@ -76,12 +75,16 @@ client$get_token()
76
75
```
77
76
78
77
# Copernicus Terms and Conditions (T&C)
78
+
79
79
Copernicus data is free to use and modify, still T&Cs must be accepted in order to download the data. `hdarc` offers a confortable functionality to read and accept/reject T&C of the individual Copernicus service:
80
+
80
81
```{r,eval=FALSE}
81
82
client$show_terms()
82
83
```
84
+
83
85
Will open a browser where you can read all the available T&Cs.
84
86
To accept/reject individual T&Cs or all at once use:
WEkEO offers a vast amount of different products. To find what you need the Client class provides a method called `datasets` that lists available datasets, optionally filtered by a text pattern.
The datasets method returns a list containing datasets and associated information. This information may include dataset names, descriptions, and other metadata.
"tileId": "__### Value of string type with pattern: [\\w-]+",
260
270
"productVersion": "__### Value of string type with pattern: [\\w-]+",
261
271
"resolution": "10",
262
-
"processingDate": "__### Value of string",
263
-
"start": "__### Value of string",
264
-
"end": "__### Value of string",
272
+
"_comment_resolution": "One of: 10",
273
+
"processingDate": "__### Value of string type with format: date-time",
274
+
"start": "__### Value of string type with format: date-time",
275
+
"end": "__### Value of string type with format: date-time",
265
276
"bbox": [
266
277
-180,
267
278
-90,
@@ -271,10 +282,11 @@ query_template
271
282
}
272
283
```
273
284
274
-
275
285
## Modify and use the generated Query Template
276
286
277
-
You can and should customize the generated query template to fit your specific needs. Fields starting with `__###` are placeholders indicating possible values. If these placeholders are left unchanged, they will be automatically removed before sending the query to the HDA service.
287
+
You can and should customize the generated query template to fit your specific needs. Fields starting with `__###` are placeholders indicating possible values. If these placeholders are left unchanged, they will be automatically removed before sending the query to the HDA service. Additionally, fields with the prefix `_comment_` provide relevant information regarding the specified field, such as possible values, format, or data patterns. Like the placeholders, these comment fields will also be automatically removed before the query is sent.
288
+
289
+
Placeholders are used when there is no way to derive the value from the metadata endpoint, while comment fields appear when the field has a value already defined, offering additional context for customizing the query.
278
290
279
291
To modify the query, it is often easier to transform the JSON into an R list using the `jsonlite::fromJSON()` function:
280
292
@@ -365,7 +377,7 @@ Once you have made the necessary modifications, you can convert the list back to
365
377
366
378
```{r, eval = FALSE}
367
379
# convert to JSON format
368
-
query_template <- toJSON(query_template, auto_unbox = TRUE) # don't forget to put auto_unbox = TRUE
380
+
query_template <- toJSON(query_template, auto_unbox = TRUE, digits = 17) # don't forget to put auto_unbox = TRUE
0 commit comments