arc2 | R Documentation |
Arc2 - Africa Rainfall Climatology version 2
arc2(date, box = NULL, ...)
date |
(character/date) one or more dates of the form YYYY-MM-DD |
box |
(numeric) vector of length 4, of the form
|
... |
curl options passed on to crul::verb-GET |
a list of tibbles with columns:
date: date (YYYY-MM-DD)
lon: longitude
lat: latitude
precip: precipitation (mm)
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.
See arc2_cache for managing cached files
docs: https://ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/ARC2_readme.txt
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.