Skip to content

Commit

Permalink
Add list_layers function (issue #6)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinisalazar committed May 23, 2022
1 parent a62e85e commit ffddba8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions R/draft.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#' names(constraints) = c("time", "latitude", "longitude")
#' # Test call
#' download_griddap_dataset(url, datasetid, variables, constraints)
download_griddap_dataset = function(erddap_server,
dataset,
download_griddap_dataset = function(dataset,
variables,
constraints,
erddap_server="https://erddap-test.emodnet.eu/erddap/",
response="nc",
directory=FALSE,
verbose=TRUE,
Expand Down Expand Up @@ -83,3 +83,11 @@ download_griddap_dataset = function(erddap_server,
return(res)
}


list_layers = function(erddap_server = "https://erddap-test.emodnet.eu/erddap/", filter_biooracle=TRUE) {
response = rerddap::ed_datasets("griddap", url=erddap_server)
if (isTRUE(filter_biooracle)) {
response = response %>% filter(grepl("biooracle",Dataset.ID))
}
return(response)
}

0 comments on commit ffddba8

Please sign in to comment.