This document is used to produce some tables from the Kampala test model output. The tables can be compared with other model revisions.

Human Sanitation Attribution

Print the attribution of sanitation types to the surface water emissions.

fpath <- testthat::test_path("output","kla","human_sources_rotavirus_kla_water.csv")
n_digits <- 5
df_human_sources_water <- read.csv(fpath)
df_print <- df_human_sources_water %>% 
  dplyr::mutate_if(is.numeric, format, digits = n_digits, scientific = TRUE) %>%
  dplyr::rename_with(~ stringr::str_trunc(.x, 10))
df_print %>% dplyr::select(iso, 2:8)
iso bucketL… compost… contain… flushOpen flushPit flushSe… flushSewer
1 0 1.0824e+10 0 5.8597e+12 6.7309e+10 2.3323e+11 1.1893e+13
2 0 3.7942e+09 0 4.2429e+12 4.5091e+11 1.1137e+12 0.0000e+00
3 0 1.8002e+10 0 1.1170e+13 7.2373e+11 2.2734e+12 0.0000e+00
4 0 6.2749e+09 0 6.5522e+12 5.0427e+11 2.1585e+12 0.0000e+00
5 0 7.4791e+09 0 5.2296e+12 7.8373e+11 1.4512e+12 1.8953e+13
df_print %>% dplyr::select(iso, 9:14)
iso flushUn… hanging… openDef… other pitNoSlab pitSlab
1 3.7176e+12 0.0000e+00 5.5511e+12 1.4867e+12 1.5559e+11 2.4404e+12
2 1.3258e+13 2.6803e+11 1.1617e+13 1.8836e+12 6.2408e+11 2.8806e+13
3 5.1082e+13 1.0084e+11 1.7778e+13 5.3607e+12 1.1778e+12 2.5170e+13
4 3.8535e+13 1.6317e+12 1.6672e+13 1.9984e+12 1.1613e+12 1.9031e+13
5 3.1370e+13 5.8429e+10 1.0857e+13 1.2768e+13 1.5000e+12 3.0162e+13

Surface Water Pathways

Print the attribution from various pathways to the surface water emissions.

fpath <- testthat::test_path("output","kla","human_emissions_rotavirus_kla_surface_water.csv")
df_pathways_water <- read.csv(fpath)
df_pathways_water %>% 
  dplyr::mutate_if(is.numeric, format, digits = n_digits, scientific = TRUE)
iso humans land wwtp
1 1.9207e+13 7.1999e+09 1.2201e+13
2 6.2183e+13 8.5869e+10 0.0000e+00
3 1.1477e+14 8.1338e+10 0.0000e+00
4 8.8188e+13 6.3329e+10 0.0000e+00
5 9.3604e+13 9.2557e+10 1.9444e+13

Pathways Maps

fpath <- testthat::test_path("output","kla","pathways.tif")
rast_pathways <- terra::trim(terra::rast(fpath), padding = 0)  
terra::plot(log10(rast_pathways), col = hcl.colors(50, palette = "Geyser"), buffer = TRUE)