Skip to content

Commit db3f294

Browse files
Merge pull request #55 from California-Data-Collaborative/emwdDeploy
small changes for EMWD deploy
2 parents 819f92c + 7abb0a9 commit db3f294

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

R/rate_inputs.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ eval_uniques <- function(colList, value_map){
195195

196196
for(v in ls){
197197
print(v)
198-
if(v != ""){
198+
if(v != "" & !is.na(v) & !is.null(v)){
199199
value <- value_map[[v]]
200200

201201
if(!is.null(value)){

global.R

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,16 @@ owrs_file <- switch(utility_code,
6969
"MNWD"="mnwd.owrs",
7070
"LVMWD"="data/lvmwd_simplified.owrs",
7171
"SMWD"="data/smwd-2017-01-01_simplified.owrs",
72-
"SMC"="data/smc-2017-01-01_simplified.owrs")
72+
"SMC"="data/smc-2017-01-01_simplified.owrs",
73+
"EMWD"="data/emwd_simplified.owrs")
7374

7475
baseline_rate_list <- RateParser::read_owrs_file(owrs_file)
7576

7677
is_budget <- switch(utility_code,
7778
"IRWD"=,
7879
"MNWD"=,
7980
"LVMWD"=,
81+
"EMWD"=,
8082
"SMWD"=TRUE,
8183
"SMC"=FALSE)
8284

@@ -85,14 +87,16 @@ less_than_date <- switch(utility_code,
8587
"MNWD"="2017-01-01",
8688
"LVMWD"="2017-01-01",
8789
"SMWD"="2016-01-01",
88-
"SMC"="2017-01-01")
90+
"SMC"="2017-01-01",
91+
"EMWD"="2017-01-01")
8992

9093
test_file <- switch(utility_code,
9194
"IRWD"="data/irwd_test.csv",
9295
"MNWD"="data/mnwd_sample_revised.csv",
9396
"LVMWD"="data/lvmwd_test2_comm_budgets_monthly.csv",
9497
"SMWD"="data/smwd_test2.csv",
95-
"SMC"="data/smc_test2.csv")
98+
"SMC"="data/smc_test2.csv",
99+
"EMWD"="data/emwd_sample.csv")
96100

97101

98102

server.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,13 +481,7 @@ shinyServer(function(input, output, clientData, session) {
481481
# Calculate bills and tiers for the MNWD residential baseline rate
482482
#******************************************************************
483483
baseline_bill_info <- reactive({
484-
switch(utility_code,
485-
"IRWD"=baseline(basedata=DF()),
486-
"MNWD"=baseline(basedata=DF()),
487-
"LVMWD"=baseline(basedata=DF()),
488-
"SMWD"=baseline(basedata=DF()),
489-
"SMC"=baseline(basedata=DF())
490-
)
484+
baseline(basedata=DF())
491485
})
492486

493487
})

0 commit comments

Comments
 (0)