rasterize_trends | R Documentation |
The eBird trends data are stored in a tabular format, where each row gives
the trend estimate for a single cell in a 27 km x 27 km equal area grid. For
many applications, an explicitly spatial format is more useful. This function
uses the cell center coordinates to convert the tabular trend estimates to
raster format in terra
SpatRaster format.
rasterize_trends(
trends,
layers = c("abd_ppy", "abd_ppy_lower", "abd_ppy_upper"),
trim = TRUE
)
trends |
data frame; trends data for a single species as returned by
|
layers |
character; column names in the trends data frame to rasterize. These columns will become layers in the raster that is created. |
trim |
logical; flag indicating if the returned raster should be trimmed
to remove outer rows and columns that are NA. If |
A SpatRaster object.
## Not run:
# download example trends data if it hasn't already been downloaded
ebirdst_download_trends("yebsap-example")
# load trends
trends <- load_trends("yebsap-example")
# rasterize percent per year trend
rasterize_trends(trends, "abd_ppy")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.