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
+5-12Lines changed: 5 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ To search for data in the HDA service, you need to create a query template. Manu
126
126
127
127
The `generate_query_template` function generates a template of a query for a specified dataset. This function fetches information about existing parameters, default values, etc., from the `/queryable` endpoint of the HDA service.
128
128
129
-
#### Example: Generating a Query Template
129
+
#### Example: Generating a Query
130
130
131
131
Here is an example of how to generate a query template for the dataset with the ID "EO:EEA:DAT:CLMS_HRVPP_ST":
132
132
@@ -193,12 +193,10 @@ $bbox
193
193
[1] -180 -90 180 90
194
194
```
195
195
196
-
## Using the Generated Query Template
196
+
## Modify and use the generated Query Template
197
197
198
198
You can and should customize the generated query template to fit your specific needs. Fields starting with '\_\_###' are placeholder values indicating possible values, but if unchanged it will be stripped off before sending the query to the HDA service.
199
199
200
-
#### Example: Using the Query Template in a Search
201
-
202
200
Here is an example of how to use the query template in a search:
203
201
204
202
```{r, eval = FALSE}
@@ -251,8 +249,6 @@ To search for data in the HDA service, you can use the `search` function provide
251
249
252
250
The `search` function takes a query and an optional limit parameter, which specifies the maximum number of results you want to retrieve. The function only searches for data and does not download it. The output of this function is an instance of the `SearchResults` class.
253
251
254
-
#### Example: Searching for Data
255
-
256
252
Here is an example of how to search for data using a query and limit the results to 5:
The `SearchResults` class has a public field results and a method called download that is responsible for downloading the found data. The `download()` function takes an output directory (which is created if no existing) and the optional parameter `selected_indexes` to specify which files to download.
275
271
276
-
#### Example: Downloading results
277
-
278
272
```{r, eval = FALSE}
279
273
# Assuming 'matches' is an instance of SearchResults obtained from the search
280
274
odir <- "~/deleteme"
@@ -292,9 +286,7 @@ y
292
286
[1] "[Download] Downloading file 8/9"
293
287
[1] "[Download] Downloading file 9/9"
294
288
[1] "[Download] DONE"
295
-
```
296
-
#### Example: Downloading files
297
-
```{r, eval = FALSE}
289
+
298
290
# Assuming 'matches' is an instance of SearchResults obtained from the search
0 commit comments