Skip to content
Snippets Groups Projects
Commit d4e5c232 authored by Nauta, Lisanne's avatar Nauta, Lisanne
Browse files

changes for building package

parent e26d6b18
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,6 @@
export(getLRV)
export(getLoadings)
export(t_JMP)
export(pathEmPlot)
export(t_JMPnat)
export(t_JMPsubnat)
......@@ -235,5 +235,3 @@ getLoadings<-function(inputDF,pathogenType="Virus"){
return(returned)
}
my=getLoadings(inputDF=my_input)
......@@ -78,4 +78,3 @@ pathEmPlot<-function(myLoadings){
# ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 90, vjust = 0.5, hjust=1))
return(jsonlite::toJSON(list(plotMe),pretty = T))
}
pathEmPlot(my)
......@@ -107,5 +107,4 @@ t_JMPnat<-function(context,myRegions="all"){
return(out)
}
my_input=t_JMPnat(context="urban",myRegions=c("HND","UGA"))
write.csv(my_input,"inputDF.csv")
......@@ -73,4 +73,3 @@ t_JMPsubnat<-function(contx,myRegions="all"){
head(out)
return(out)
}
t_JMPsubnat(contx="urban",myRegions="HND")
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getLoadings.R, R/getLoadingsOLD.R,
% R/transformJMP.R
% Please edit documentation in R/getLoadings.R, R/getLoadings20200702.R
\name{getLoadings}
\alias{getLoadings}
\title{The getLoadings function}
\usage{
getLoadings(
sanitation = "data/san_fac_subnational.csv",
emptying = "data/emptying_and_treatment.csv",
pathogenType = "Virus"
)
getLoadings(onsiteData = "data/onsiteData_example.csv", pathogenType = "Virus")
getLoadings(
sanitation = "data/san_fac_subnational.csv",
emptying = "data/emptying_and_treatment.csv",
pathogenType = "Virus"
)
getLoadings(
sanitation = "data/san_fac_subnational.csv",
emptying = "data/emptying_and_treatment.csv",
pathogenType = "Virus"
)
getLoadings(onsiteData = "data/onsiteData_example.csv", pathogenType = "Virus")
}
\arguments{
\item{sanitation}{The mapped location of a CSV file containing JMP sanitation facilities data.}
\item{emptying}{The mapped location of a CSV file containing JMP emptying and treatment data.}
\item{onsiteData}{A CSV file containing your onsite sanitation data. Defaults to example template from http://data.waterpathogens.org/dataset/5374462b-5bb5-456f-bfc0-816ea572666d/resource/4d9e5fba-9280-4b8b-acce-d1c87952acc1/download/onsitedata_example.csv}
\item{pathogenType}{The input pathogenType should be equal to either one of the following strings: c("Virus","Bacteria","Protozoa","Helminth")}
\item{context}{Specify either "urban" or "rural"}
\item{onsiteData}{A CSV file containing your onsite sanitation data. Defaults to example template from http://data.waterpathogens.org/dataset/5374462b-5bb5-456f-bfc0-816ea572666d/resource/4d9e5fba-9280-4b8b-acce-d1c87952acc1/download/onsitedata_example.csv}
\item{inputDF}{A dataframe containing your onsite sanitation data. An example template can be found at http://data.waterpathogens.org/dataset/pasteaddresshere?}
}
\description{
This function predicts the pathogen loadings from onsite sanitation systems for data available through the UNICEF/WHO Joint Monitoring Program and provides an output that can be used directly by the Pathogen Mapping Tool.
This function predicts the pathogen loadings from onsite sanitation systems for data available through the UNICEF/WHO Joint Monitoring Program and provides an output that can be used directly by the Pathogen Mapping Tool.
This function predicts the pathogen loadings from onsite sanitation systems for data available through the UNICEF/WHO Joint Monitoring Program and provides an output that can be used directly by the Pathogen Mapping Tool.
}
\examples{
getLoadings(onsiteData="data/onsitedata_example2.csv",pathogenType="Virus",context="urban")
region excreted to_groundwater to_surface retained_in_soil decayed In_Fecal_Sludge In_Sewage stillViable Onsite_LRV Onsite_PR
1 Central 3.470412e+16 7.208736e+14 1.241347e+15 6.487862e+15 1.696317e+16 4.204900e+13 9.142680e+15 1.114695e+16 0.49 0.6788
2 Kawempe 1.828207e+17 2.923315e+15 3.819070e+15 2.630984e+16 1.427235e+17 1.714675e+14 6.738060e+15 1.365191e+16 1.13 0.9253
3 Makindye 2.115370e+17 5.784264e+15 7.404292e+15 5.205838e+16 1.396717e+17 1.877473e+14 6.042660e+15 1.941896e+16 1.04 0.9082
4 Nakawa 1.740476e+17 4.848475e+15 5.834954e+15 4.363628e+16 1.023125e+17 1.109438e+14 1.716174e+16 2.795611e+16 0.79 0.8394
5 Rubaga 2.103805e+17 4.278101e+15 5.257688e+15 3.850291e+16 1.602164e+17 2.221318e+14 9.808800e+14 1.073880e+16 1.29 0.9490
getLoadings(inputDF,pathogenType="Virus")
$output
region excreted to_groundwater to_surface retained_in_soil decayed In_Fecal_Sludge In_Sewage stillViable Onsite_LRV Onsite_PR
1 HND 3.63e+18 5.840389e+16 1.963546e+18 5.738629e+17 5.042712e+17 1.179983e+14 5.297977e+17 2.551866e+18 0.15 0.2970
2 UGA 1.67e+19 1.565005e+17 1.731193e+18 1.408505e+18 1.340068e+19 0.000000e+00 3.127723e+15 1.890822e+18 0.95 0.8868
getLoadings(onsiteData="http://data.waterpathogens.org/dataset/5374462b-5bb5-456f-bfc0-816ea572666d/resource/4d9e5fba-9280-4b8b-acce-d1c87952acc1/download/onsitedata_example.csv",pathogenType="Virus")
region excreted to_groundwater to_surface retained_in_soil decayed In_Fecal_Sludge In_Sewage stillViable Onsite_LRV Onsite_PR
......@@ -60,14 +36,5 @@ getLoadings(onsiteData="http://data.waterpathogens.org/dataset/5374462b-5bb5-456
4 Nakawa 1.740476e+17 4.848475e+15 5.834954e+15 4.363628e+16 1.023125e+17 1.109438e+14 1.716174e+16 2.795611e+16 0.79 0.8394
5 Rubaga 2.103805e+17 4.278101e+15 5.257688e+15 3.850291e+16 1.602164e+17 2.221318e+14 9.808800e+14 1.073880e+16 1.29 0.9490
getLoadings(sanFac,empTrt,pathogenType="Virus")
region excreted to_groundwater to_surface retained_in_soil decayed In_Fecal_Sludge In_Sewage stillViable Onsite_LRV Onsite_PR
1 Central 3.470412e+16 7.208736e+14 1.241347e+15 6.487862e+15 1.696317e+16 4.204900e+13 9.142680e+15 1.114695e+16 0.49 0.6788
2 Kawempe 1.828207e+17 2.923315e+15 3.819070e+15 2.630984e+16 1.427235e+17 1.714675e+14 6.738060e+15 1.365191e+16 1.13 0.9253
3 Makindye 2.115370e+17 5.784264e+15 7.404292e+15 5.205838e+16 1.396717e+17 1.877473e+14 6.042660e+15 1.941896e+16 1.04 0.9082
4 Nakawa 1.740476e+17 4.848475e+15 5.834954e+15 4.363628e+16 1.023125e+17 1.109438e+14 1.716174e+16 2.795611e+16 0.79 0.8394
5 Rubaga 2.103805e+17 4.278101e+15 5.257688e+15 3.850291e+16 1.602164e+17 2.221318e+14 9.808800e+14 1.073880e+16 1.29 0.9490
}
\keyword{pathogens}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transformMihalisData.R
\name{t_JMP}
\alias{t_JMP}
\title{The t_JMP function}
\usage{
t_JMP(contx)
}
\arguments{
\item{contx}{Either "urban" or "rural" context}
}
\description{
This function transforms country-level sanitation data from the UNICEF/WHO Joint Monitoring Program and produces it in a format that can be used directly by the getLoadings function.
}
\examples{
t_JMP("urban")
}
\keyword{pathogens}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment