Skip to content

Commit 6c725e8

Browse files
author
marus200
committed
change of function name
1 parent 0bb68e1 commit 6c725e8

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ License: GPL-3
1515
Encoding: UTF-8
1616
LazyData: true
1717
Roxygen: list(markdown = TRUE)
18-
RoxygenNote: 7.1.0
18+
RoxygenNote: 7.1.1
1919
Imports:
2020
httr,
2121
jsonlite,

NAMESPACE

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
export(get_and_parse)
44
export(wapor_collections)
5-
export(wapor_productMETA)
5+
export(wapor_metadata)
66
export(wapor_products)
77
export(wapor_queryRaster)
88
export(wapor_signin)

R/collections.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ wapor_products <-function(collection){
6565
#' @param product A length one character vector specifying the product..
6666
#'
6767
#' @return A list object with the obhects \code{info}, \code{dimensions}, and \code{meta}.
68-
#' @export wapor_productMETA
68+
#' @export wapor_metadata
6969
#'
7070
#' @importFrom stringr str_remove_all
71-
wapor_productMETA <- function(collection, product){
71+
wapor_metadata <- function(collection, product){
7272

7373
url = paste(dataurl, collection, "cubes", product, "measures", sep = "/")
7474
parsed = get_and_parse(url)
@@ -98,3 +98,4 @@ wapor_productMETA <- function(collection, product){
9898

9999
list(info = info, dimensions = dimensions, meta = meta)
100100
}
101+

R/queryRaster.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ wapor_queryRaster <- function(collection = NULL,
8888
tmp_vars = c("YEAR", "MONTH", "DEKAD")
8989

9090
# get product meta data
91-
metadata = wapor_productMETA(collection, product)
91+
metadata = wapor_metadata(collection, product)
9292
dim_names = metadata$dimensions$code
9393
if(!any(dim_names %in% tmp_vars)){
9494
if(!any(is.null(begin), is.null(end))){
@@ -111,7 +111,7 @@ wapor_queryRaster <- function(collection = NULL,
111111
if(length(dim_names) > 0){
112112
if(!any(names(dimensions) %in% dim_names)){
113113
stop("There are non matching dimensions specified in the 'dimensions' option.
114-
Check the dimension output of wapor_productMETA() and change your input.")
114+
Check the dimension output of wapor_metadata()$dimensions and change your input.")
115115
}
116116
}
117117
measure = as.character(metadata$info$code)

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ WAPOR collections. For some other collection it is also possible to
7575
query and download raster datasets. However, for some of the collections
7676
errors will be returned if queried. Currently, you might run into errors
7777
for these collections:
78+
7879
- C2ATLAS
7980
- DLMF
8081
- NASA
@@ -172,8 +173,8 @@ str(products[[1]]$meta)
172173
## $ spatialReferenceSystem: chr "EPSG:4326 - WGS84 - Geographic Coordinate System (lat/long)"
173174
## $ temporalResolution : chr "from January 2009 to present"
174175
## $ temporalExtent : chr "Annual"
175-
## $ nearRealTime : chr "New dekadal data layers are released approximately 5 days after the end of a dekad. A higher quality version of"| __truncated__
176-
## $ methodology : chr "The calculation of gross biomass water productivity (GBWP) is as follows: GBWP = TBP/ETIa Where TBP is annual T"| __truncated__
176+
## $ nearRealTime : chr "New dekadal data layers are released approximately 5 days after the end of a dekad."| __truncated__
177+
## $ methodology : chr "The calculation of gross biomass water productivity (GBWP) is as follows: GBWP ="| __truncated__
177178

178179

179180
With these information combined, we can start downloading some data.
@@ -208,4 +209,4 @@ wapor_queryRaster(collection = collection,
208209
tiled = TRUE,
209210
compressed = TRUE,
210211
overviews = TRUE)
211-
```
212+
```

man/wapor_productMETA.Rd man/wapor_metadata.Rd

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)