arc2: Arc2 - Africa Rainfall Climatology version 2

Description Usage Arguments Value box parameter Note References Examples

View source: R/arc2.R

Description

Arc2 - Africa Rainfall Climatology version 2

Usage

1

Arguments

date

(character/date) one or more dates of the form YYYY-MM-DD

box

(numeric) vector of length 4, of the form xmin, ymin, xmax, ymax. optional. If not given, no spatial filtering is done. If given, we use dplyr::filter() on a combined set of all dates, then split the output into tibbles by date

...

curl options passed on to crul::verb-GET

Value

a list of tibbles with columns:

box parameter

The box parameter filters the arc2 data to a bounding box you supply. The function that does the cropping to the bounding box is dplyr::filter. You can do any filtering you want on your own if you do not supply box and then use whatever tools you want to filter the data by lat/lon, date, precip values.

Note

See arc2_cache for managing cached files

References

docs: ftp://ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/ARC2_readme.txt

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
x = arc2(date = "1983-01-01")
arc2(date = "2017-02-14")

# many dates
arc2(date = c("2019-05-27", "2019-05-28"))
arc2(seq(as.Date("2019-04-21"), by = "day", length.out = 5))
## combine outputs 
x <- arc2(seq(as.Date("2019-05-20"), as.Date("2019-05-25"), "days"))
dplyr::bind_rows(x)

# bounding box filter
box <- c(xmin = 9, ymin = 4, xmax = 10, ymax = 5)
arc2(date = "2017-02-14", box = box)
arc2(date = c("2019-05-27", "2019-05-28"), box = box)
arc2(seq(as.Date("2019-05-20"), as.Date("2019-05-25"), "days"), box = box)

## End(Not run)

rnoaa documentation built on May 19, 2021, 9:13 a.m.