Health impacts of waterborne microbes: Difference between revisions

From Opasnet
Jump to navigation Jump to search
Line 38: Line 38:
oprint(Wateruse)
oprint(Wateruse)
</rcode>
</rcode>


<rcode name="rawconsumption">
<rcode name="rawconsumption">
Line 57: Line 56:


Concentrations of pathogens in drinking water
Concentrations of pathogens in drinking water
<rcode
name="logdecrease"
label="Initialize microbe log decrease"
graphics="1"
>
#This is code "Op_en7957/logdecrease" on page [[Health impacts of waterborne microbes]]
library(OpasnetUtils)
MicrobeLogDecrease <- Ovariable("MicrobeLogDecrease",
                                dependencies=data.frame(
                                  Name=c("TreatmentEfficiency", "Disinfection", "ChlorineEfficiency"),
                                  Ident=c("Op_en7954/variable", "Op_en7955/variable", "Op_en7956/efficiency")
                                ),
                                formula=function(...){
                                  # Calculate the total log decrease of pathogen concentration from disinfection and other treatment
                                  # methods, then sum them to get the total not including chlorination
                                  MicrobeLogDecrease <- oapply(Disinfection, cols="TreatmentMethod", FUN=sum) +
                                    oapply(TreatmentEfficiency, cols="TreatmentMethod", FUN=sum)
                                  # Then sum that with chlorination to get the total microbe log decrease
                                  MicrobeLogDecrease <- MicrobeLogDecrease+ChlorineEfficiency
                                 
                                  return(MicrobeLogDecrease)
                                }
)
objects.store(MicrobeLogDecrease)
</rcode>


<rcode  
<rcode  
name="pathconcentration"  
name="pathconcentration"  
label="Initialize variable"  
label="Initialize microbe log decrease"  
graphics="1"
graphics="1"
>
>
Line 66: Line 98:
library(OpasnetUtils)
library(OpasnetUtils)


dependencies <- data.frame(
Name = c("RawConcentration", "Disinfection", "TreatmentEfficiency", "ChlorineEfficiency"),
Ident = c("Op_en7953/variable", "Op_en7955/variable", "Op_en7954/variable", "Op_en7956/efficiency")
)


funktio <- function(...) {
#MicrobeLogDecrease <- combine(Disinfection, TreatmentEfficiency, ChlorineEfficiency, name = "MicrobeLogDecrease")
#MicrobeLogDecrease@output[["TreatmentMethod"]][
# MicrobeLogDecrease@output[["MicrobeLogDecreaseSource"]] == "ChlorineEfficiencyF"
#] <- "Chlorination"
#MicrobeLogDecrease <- oapply(MicrobeLogDecrease, cols = c("TreatmentMethod", "ChlorineDoseSource"), FUN = sum, na.rm = TRUE)
# Varo laskemasta kloorausta monesti
#MicrobeLogDecrease@output <- fillna(MicrobeLogDecrease@output, colnames(MicrobeLogDecrease@output)[MicrobeLogDecrease@marginal])
MicrobeLogDecrease <- orbind(Disinfection, TreatmentEfficiency)
MicrobeLogDecrease <- orbind(MicrobeLogDecrease, ChlorineEfficiency)
MicrobeLogDecrease <- fillna(MicrobeLogDecrease, grep("Source$", colnames(MicrobeLogDecrease)))
MicrobeLogDecrease$DisinfectionResult[is.na(MicrobeLogDecrease$DisinfectionResult)] <- 0
MicrobeLogDecrease$TreatmentEfficiencyResult[is.na(MicrobeLogDecrease$TreatmentEfficiencyResult)] <- 0
MicrobeLogDecrease$ChlorineEfficiencyResult[is.na(MicrobeLogDecrease$ChlorineEfficiencyResult)] <- 0
MicrobeLogDecrease$MicrobeLogDecreaseResult <- MicrobeLogDecrease$DisinfectionResult +
MicrobeLogDecrease$TreatmentEfficiencyResult + MicrobeLogDecrease$ChlorineEfficiencyResult
MicrobeLogDecrease <- Ovariable(
"MicrobeLogDecrease",
dependencies = data.frame(
Name = c("Disinfection", "TreatmentEfficiency", "ChlorineEfficiency")
),
output = MicrobeLogDecrease
)
MicrobeLogDecrease <- CheckMarginals(MicrobeLogDecrease, verbose = FALSE)
MicrobeLogDecrease <- oapply(MicrobeLogDecrease, cols = c("TreatmentMethod"), FUN = sum, na.rm = TRUE)
out <- RawConcentration * 10 ^(-1*(MicrobeLogDecrease))
return(out@output)
}


TreatedConcentration <- Ovariable("TreatedConcentration", dependencies = dependencies, formula = funktio)
TreatedConcentration <- Ovariable("TreatedConcentration", dependencies = dependencies, formula = funktio)

Revision as of 06:09, 16 July 2019



Question

What are the health impacts of waterborne microbes in drinking water?

Answer

Rationale

Data

Health impacts of waterborne microbes depends on the following parameters:

Calculations

RCode

Daily cold tap water use of Finns

+ Show code

+ Show code

Concentrations of pathogens in drinking water

+ Show code


+ Show code

The amount of pathogens an average water consumer is exposed to in a day

+ Show code

See also