WaterBill: Water Bill Calculation

Description Usage Arguments Details Value Author(s)

View source: R/WaterBill.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
 7
 8
 9
10
11
12
13
14
15
WaterBill(
  df,
  uniform_rates = TRUE,
  nt_c,
  wdths_c = NULL,
  fxd_c = NULL,
  vol_c = NULL,
  proposed_rates = TRUE,
  elasticity_par = 0,
  elasticity_response = "average",
  nt_p = NULL,
  wdths_p = NULL,
  fxd_p = NULL,
  vol_p = NULL
)

Arguments

df

dataframe that contains customer usage - var must be titled usage. If rates are not uniform across customers, fixed rate columns must be titled fixed_c and fixed_p

uniform_rates

logical if TRUE the rates are constant across all customers in dataframe. If TRUE inputs for the rate structure are required in the function call

nt_c

number of tiers in the current rate structure

wdths_c

vector of tier widths under the current rate structure - not necessary if rate structure is not uniform

fxd_c

double of fixed charge under current rate structure - not necessary if rate structure is not uniform

vol_c

vector of volumetric rates under the current rate structure - not necessary if rate structure is not uniform

proposed_rates

logical if TRUE two rate structures are included in the calculation

elasticity_par

the elasticity parameter, default is set to zero which excludes elasticity from the analysis

nt_p

number of tiers in the proposed rate structure

wdths_p

vector of tier widths under the proposed rate structure - not necessary if rate structure is not uniform

fxd_p

double of fixed charge under proposed rate structure - not necessary if rate structure is not uniform

vol_p

vector of volumetric rates under the proposed rate structure - not necessary if rate structure is not uniform

Details

BillCalculation <- function(df, elasticity = 0.0, nt_c, nt_p = NULL, uniform_rates = TRUE, proposed_rates = TRUE,

Value

This function returns a dataframe that includes all final bills under the current and proposed rate structures as well as their respective components

Author(s)

Bjorn Kallerud


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