knitr::opts_chunk$set(fig.width=12, fig.height=6, echo=FALSE, warning=FALSE, message=FALSE, fig.path = "output/figures/")
library(magrittr) library(ggplot2) library(dplyr) library(EpiEstim) devtools::load_all() pow_dist <- params$pow_dist t.proj <- params$t.proj n.sim <- params$n.sim n.dates.sim <- params$n.dates.sim p.stay <- params$p.stay
Read in data prepared using the above code chunks.
infile <- here::here("data", "CaseCounts/processed/WHO_bydistricts.csv") WHO_bydistricts <- readr::read_csv(infile) infile <- here::here("data", "CaseCounts/processed/WHO_bycountry.csv") WHO_bycountry <- readr::read_csv(infile)
pow_N_to <- pow_N_from <- 1 K <- 1
outfile <- "output/alldistricts-lh-tproj-100.csv" log_likelihood <- read.csv(outfile, na.strings = "-Inf") ## Replace -Inf by a large negative number #log_likelihood[is.na(log_likelihood)] <- -900 pstay <- unique(log_likelihood$p.stay) %>% sort power <- unique(log_likelihood$pow_dist) %>% sort z <- select(log_likelihood, -c(pow_dist, p.stay)) %>% rowSums %>% matrix(nrow = length(power), byrow = TRUE) p <- plotly::plot_ly(x = ~pstay, y = ~power, z = ~z) %>% plotly::add_surface() #p <- plot_ly(x = ~pstay, y = ~power, showscale = TRUE) %>% # add_surface(z = ~z300) %>% # add_surface(z = ~z500, opacity = 0.98)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.