Creates a HS from input where grid is a polygon grid representing the spatial units of runoff, and /coderunoff is a data.frame containing column 'Date', and where column names match the grid IDs.

create_HS(zones, runoff, unit, zoneID = "zoneID", name = "runoff_1")

Arguments

zones

An sf POLYGON object

runoff

a table of runoff where rows are timesteps and columns correspond to specific polygons in grid.

unit

Unit of the runoff timeseries

zoneID

Column name with unique IDs in grid.

name

Name of the runoff timeseries. If multiple runoff timeseries are added to the same HS object using add_HS, each timeseries must have a unique name, or else they are replaced. @inheritParams raster_to_HS

Value

Returns a HS object with columns

  • zoneID: unique ID

  • runoff_ts: a list column containing the runoff timeseries.