calculate_bill: Calculate Water Bill

Description Usage Arguments Details Value Author(s)

View source: R/calculate_bill.R

Description

Calculates customers' water bills based on fixed and volumetric rates. There is an option to include both current and proposed rate structures to assess bill impacts.

Usage

1
2
3
4
5
6
calculate_bill(
  df_use,
  df_rates,
  rate_group = c("class", "meter_size"),
  suffix = "current"
)

Arguments

df_use

dataframe that contains customer usage - var must be titled usage or use.

df_rates

dataframe that contains fixed and volumetric rates with suffix "_current". Set to NULL if widths and rates are already in df_use.

rate_group

vector of strings for the group that defines unique rate structure.

suffix

calculate bill based on current or proposed rate structure.

Details

calculate_bill <- function(df_use, df_rates, rate_group = c("class", "meter_size"), suffix = "current")

Value

This function returns a dataframe that includes the final bills under the current rate structure as well as the bill's respective tier components.

Author(s)

Bjorn Kallerud


bjornkallerud/waterr documentation built on Aug. 9, 2021, 10:55 a.m.