Skip to contents

assign a partition_start (a year) to every event in the mhw metrics table that is sent based on either start or end date of the mhw, the new column is called partition_start

Usage

partition_mhw_events(
  conn,
  mhw_table_name,
  partition_size_years = 3,
  start_year = 2040,
  end_year = 2069,
  use_end_date = TRUE
)

Arguments

conn

dbi database connection, see mhw_connect()

mhw_table_name

name of main metrics table to use

partition_size_years

width of partions in years

start_year

year to start partitions default 2040

end_year

year to end partitions default 2069

use_end_date

bolean deafult TRUE

Value

dbplyr 'table', data frame with partition value assigned to each event in column partition_start