#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#' @title prod_itfdashboard
#' @description Produce CSVs needed for ITF dashboard
#'
#' @importFrom magrittr `%>%`
#'
#' @export
#'
#' @examples
#' \dontrun{
#' prod_itfdashboard()}
#'
prod_itfdashboard <- function(){
df_country_date <- add_country_dates(countries_data)
df_jhu <- get_jhu_covid(df_country_date)
df_rt_jhu <- calc_jhu_rt(df_jhu)
df_who <- get_who_covid(df_country_date)
df_rt_who <- calc_who_rt(df_who)
df_ncov <- get_covid_sources()
df_rt_ncov <- calc_rts(df_ncov)
hotspots <- calc_hotspots(df_ncov)
hotspot_data <- hotspots[[1]]
hotspot_map <- hotspots[[2]]
testing <- get_testing()
testing_data <- testing[[1]]
testing_cross <- testing[[2]]
gmob <- get_googlemobility()
risk <- calc_riskmatrix(df_ncov, df_rt_ncov)
riskmatrix <- risk[[1]]
xriskmatrix <- risk[[2]]
risk <- calc_riskmatrix_v2(df_ncov)
riskmatrix_v2 <- risk[[1]]
xriskmatrix_v2 <- risk[[2]]
risk <- calc_riskmatrix_v3(df_ncov)
riskmatrix_v3 <- risk[[1]]
xriskmatrix_v3 <- risk[[2]]
who_criteria <- calc_whocriteria(df_ncov, testing_data, df_rt_ncov)
vax <- get_vaccinations()
vaccinations_all <- vax[[1]]
vaccinations_manufacturers <- vax[[2]]
vaccinations_rollout <- vax[[3]]
vaccinations_categories <- vax[[4]]
overlay <- view_countryoverlays(df_ncov, gmob[[1]])
overlay_cases_deaths <- overlay[[1]]
overlay_stringency <- overlay[[2]]
overlay_mobility <- overlay[[3]]
files <- mget(ls())
for (i in 1:length(files)){
if(class(files[[i]])=="data.frame"){
write.csv(files[[i]], paste0(names(files[i]), ".csv", sep = ""))
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.