sum_ss_grds_to_ts: Summarize Seascape grids into time series table

View source: R/analyze.R

sum_ss_grds_to_tsR Documentation

Summarize Seascape grids into time series table

Description

Summarize Seascape grids into a table having columns: date, cellvalue (ie CLASS) and number of cells (n_cells).

Usage

sum_ss_grds_to_ts(grds, ts_csv = NULL, verbose = F)

Arguments

grds

raster stack with more than one date, as returned by get_ss_grds

ts_csv

path to csv to save this time series table. Default is NULL, in which case the table is not saved. If path is set and already exists then that will be read in if all dates in the grds are present instead of recalculating and writing to ts_csv.

verbose

show messages of process. Useful for debugging. Default: FALSE.

Details

This function is particularly helpful in between using get_ss_grds() and plot_ss_ts().

Value

tibble of data

Examples

ply  <- get_url_ply("mbnms")
ss_i <- get_ss_info()
grds <- get_ss_grds(ss_i, ply, date_beg = "2020-01-01")
tbl  <- sum_ss_grds_to_ts(grds)
tbl


marinebon/seascapeR documentation built on Nov. 13, 2024, 2:30 a.m.