calculate_bill: Calculate water bills.

Description Usage Arguments Value

View source: R/rateParser.R

Description

calculate_bill applies a rate structure to water use data to calculate water bills. Applies calculate_class_bill to each cust_class separately.

Usage

1
calculate_bill(df, parsed_rate)

Arguments

df

Data frame containing all data values referenced in the rate file but not defined in the rate file. E.g. usage_ccf, cust_class, meter_size, etc.

parsed_rate

OWRS file, parsed into an R list by the yaml package.

Value

Original data frame with additional columns appended. Additional columns are those defined in the rate file, as well as columns Xi representing the usage in the ith tier, and XRi representing revenue in the ith tier (where applicable).

NOTE: rows are not guarenteed to be in the same order as originally passed, and will likely be in a different order


California-Data-Collaborative/RateParser documentation built on May 6, 2019, 9:27 a.m.