write_watershed: Writes watershed data to the database

Description Usage Arguments Details Value

View source: R/watersheds.r

Description

Writes watershed data to the database

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
write_watershed(
  conn,
  name,
  stream,
  pixels,
  pix_time,
  Tp,
  Tr,
  schema = "watersheds"
)

Arguments

conn

A fleeDB_connection() with write permissions

name

The watershed name (e.g., "vjosa")

stream

A vector map of streams, in sf format

pixels

A data.frame of pixel data, with IDs

pix_time

A data.frame of pixel-time data (e.g., discharge etc)

Tp

A pixel topology, in SparseMatrix format

Tr

A reach topology SparseMatrix

schema

Where to write it, normally do not change the default

Details

Column names in the tables MUST match those in the database.

Value

NULL, has the side effect of writing watershed tables in the database


flee-group/fleeDB documentation built on Dec. 20, 2021, 8:43 a.m.