label_raster_stack {ebirdst}R Documentation

Label data cubes with the week date for each band

Description

The data cubes are saved as GeoTIFFs, which don't allow for band labels. For convenience, this function labels the layers of a data cube once it has been loaded with the week dates for each band.

Usage

label_raster_stack(x)

Arguments

x

RasterStack or RasterBrick; original eBird Status and Trends data cube with 52 bands, one for each week.

Value

A RasterStack or RasterBrick with names assigned for the dates in the format of "wYYYY.MM.DD" per raster package constraints. The ⁠Raster*⁠ objects do not allow the names to start with a number, nor are they allowed to contain "-", so it is not possible to store the date in an ISO compliant format. Use parse_raster_dates() to convert the layer names to dates.

Examples

## Not run: 
# download and load example abundance data
sp_path <- ebirdst_download("example_data")
abd <- load_raster(sp_path, "abundance")

# label
abd <- label_raster_stack(abd)
names(abd)

## End(Not run)

[Package ebirdst version 0.3.5 Index]