diff --git a/docs/articles/Brazil_animated.gif b/docs/articles/Brazil_animated.gif index 584b5c2c..855b1c88 100644 Binary files a/docs/articles/Brazil_animated.gif and b/docs/articles/Brazil_animated.gif differ diff --git a/docs/articles/Brazil_animated_2021.gif b/docs/articles/Brazil_animated_2021.gif index ebb6df5d..cfb6d6c6 100644 Binary files a/docs/articles/Brazil_animated_2021.gif and b/docs/articles/Brazil_animated_2021.gif differ diff --git a/docs/articles/Brazil_animated_2023.gif b/docs/articles/Brazil_animated_2023.gif index 87887ece..5bd1903b 100644 Binary files a/docs/articles/Brazil_animated_2023.gif and b/docs/articles/Brazil_animated_2023.gif differ diff --git a/docs/articles/Brazil_animated_2024.gif b/docs/articles/Brazil_animated_2024.gif index 88f3aeab..5278a256 100644 Binary files a/docs/articles/Brazil_animated_2024.gif and b/docs/articles/Brazil_animated_2024.gif differ diff --git a/docs/articles/Germany_animated.gif b/docs/articles/Germany_animated.gif index 505fab74..12ff0559 100644 Binary files a/docs/articles/Germany_animated.gif and b/docs/articles/Germany_animated.gif differ diff --git a/docs/articles/Germany_animated_2021.gif b/docs/articles/Germany_animated_2021.gif index 943f5579..99361bf1 100644 Binary files a/docs/articles/Germany_animated_2021.gif and b/docs/articles/Germany_animated_2021.gif differ diff --git a/docs/articles/Germany_animated_2023.gif b/docs/articles/Germany_animated_2023.gif index 712ca729..3241a901 100644 Binary files a/docs/articles/Germany_animated_2023.gif and b/docs/articles/Germany_animated_2023.gif differ diff --git a/docs/articles/Germany_animated_2024.gif b/docs/articles/Germany_animated_2024.gif index 13c78bfb..33291857 100644 Binary files a/docs/articles/Germany_animated_2024.gif and b/docs/articles/Germany_animated_2024.gif differ diff --git a/docs/articles/IN_animated.gif b/docs/articles/IN_animated.gif index 59024812..357224ce 100644 Binary files a/docs/articles/IN_animated.gif and b/docs/articles/IN_animated.gif differ diff --git a/docs/articles/IN_animated_2021.gif b/docs/articles/IN_animated_2021.gif index 198d30cc..31dbaf4e 100644 Binary files a/docs/articles/IN_animated_2021.gif and b/docs/articles/IN_animated_2021.gif differ diff --git a/docs/articles/IN_animated_2022.gif b/docs/articles/IN_animated_2022.gif index 67fedcd7..4bc59287 100644 Binary files a/docs/articles/IN_animated_2022.gif and b/docs/articles/IN_animated_2022.gif differ diff --git a/docs/articles/IN_animated_2023.gif b/docs/articles/IN_animated_2023.gif index 7c42d92e..9d022a85 100644 Binary files a/docs/articles/IN_animated_2023.gif and b/docs/articles/IN_animated_2023.gif differ diff --git a/docs/articles/IN_animated_latest.gif b/docs/articles/IN_animated_latest.gif index 75e5ca72..5f6efcdf 100644 Binary files a/docs/articles/IN_animated_latest.gif and b/docs/articles/IN_animated_latest.gif differ diff --git a/docs/articles/NYC_animated.gif b/docs/articles/NYC_animated.gif index aad38808..8e27a16f 100644 Binary files a/docs/articles/NYC_animated.gif and b/docs/articles/NYC_animated.gif differ diff --git a/docs/articles/NYC_animated_2023.gif b/docs/articles/NYC_animated_2023.gif index 6c7471b0..a3e8a824 100644 Binary files a/docs/articles/NYC_animated_2023.gif and b/docs/articles/NYC_animated_2023.gif differ diff --git a/docs/articles/NY_animated.gif b/docs/articles/NY_animated.gif index 122ee05b..c305d385 100644 Binary files a/docs/articles/NY_animated.gif and b/docs/articles/NY_animated.gif differ diff --git a/docs/articles/NY_animated_2023.gif b/docs/articles/NY_animated_2023.gif index 3fa18b3d..751ec392 100644 Binary files a/docs/articles/NY_animated_2023.gif and b/docs/articles/NY_animated_2023.gif differ diff --git a/docs/articles/Singapore_animated.gif b/docs/articles/Singapore_animated.gif index 9b3cf78d..de4eb751 100644 Binary files a/docs/articles/Singapore_animated.gif and b/docs/articles/Singapore_animated.gif differ diff --git a/docs/articles/Singapore_animated_2021.gif b/docs/articles/Singapore_animated_2021.gif index 83d2a4c4..67aef21b 100644 Binary files a/docs/articles/Singapore_animated_2021.gif and b/docs/articles/Singapore_animated_2021.gif differ diff --git a/docs/articles/Singapore_animated_2023.gif b/docs/articles/Singapore_animated_2023.gif index 11615950..ff6d2545 100644 Binary files a/docs/articles/Singapore_animated_2023.gif and b/docs/articles/Singapore_animated_2023.gif differ diff --git a/docs/articles/Singapore_animated_2024.gif b/docs/articles/Singapore_animated_2024.gif index 265e05e9..c538b0a4 100644 Binary files a/docs/articles/Singapore_animated_2024.gif and b/docs/articles/Singapore_animated_2024.gif differ diff --git a/docs/articles/South_Africa_animated.gif b/docs/articles/South_Africa_animated.gif index 18d9b9af..ee02400f 100644 Binary files a/docs/articles/South_Africa_animated.gif and b/docs/articles/South_Africa_animated.gif differ diff --git a/docs/articles/South_Africa_animated_2021.gif b/docs/articles/South_Africa_animated_2021.gif index 147cb962..b4733101 100644 Binary files a/docs/articles/South_Africa_animated_2021.gif and b/docs/articles/South_Africa_animated_2021.gif differ diff --git a/docs/articles/VariantAnimation-Brazil.html b/docs/articles/VariantAnimation-Brazil.html index a4cfa454..e7563374 100644 --- a/docs/articles/VariantAnimation-Brazil.html +++ b/docs/articles/VariantAnimation-Brazil.html @@ -1,5 +1,19 @@ -Animation of projected weekly cases - Brazil • covmuller + + + + + + +Animation of projected weekly cases - Brazil • covmuller + + + + + + + + + + Skip to contents @@ -24,7 +40,8 @@ + + @@ -74,214 +95,237 @@ -
suppressPackageStartupMessages({
-  library(covmuller)
-  library(COVID19)
-  library(tidyverse)
-})
-theme_set(CovmullerTheme())
-
-

Get variants data for Brazil

-
gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_11.qs")
-gisaid_brazil <- gisaid_metadata %>%
-  filter(Country == "Brazil") %>%
-  filter(Host == "Human")
-# format metadata
-gisaid_brazil <- FormatGISAIDMetadata(gisaid_brazil)
-gisaid_brazil <- gisaid_brazil %>%
-  arrange(State, MonthYearCollected) %>%
-  filter(pangolin_lineage != "Unknown")
-
-vocs <- GetVOCs()
-custom_voc_mapping <- list(
-  `JN.1` = "JN.1",
-  `JN.1.*` = "JN.1",
-  `HV.1` = "HV.1",
-  `HV.1.*` = "HV.1"
-)
-gisaid_brazil <- gisaid_brazil %>% filter(pangolin_lineage != "None")
-
-gisaid_brazil <- CollapseLineageToVOCs(
-  variant_df = gisaid_brazil,
-  vocs = vocs,
-  custom_voc_mapping = custom_voc_mapping,
-  summarize = FALSE
-)
+
+suppressPackageStartupMessages({
+  library(covmuller)
+  library(COVID19)
+  library(tidyverse)
+})
+theme_set(CovmullerTheme())
+
+

Get variants data for Brazil +

+
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_11.qs")
+gisaid_brazil <- gisaid_metadata %>%
+  filter(Country == "Brazil") %>%
+  filter(Host == "Human")
+# format metadata
+gisaid_brazil <- FormatGISAIDMetadata(gisaid_brazil)
+gisaid_brazil <- gisaid_brazil %>%
+  arrange(State, MonthYearCollected) %>%
+  filter(pangolin_lineage != "Unknown")
+
+vocs <- GetVOCs()
+custom_voc_mapping <- list(
+  `B.1` = "B.1",
+  `JN.1` = "JN.1",
+  `JN.1.*` = "JN.1",
+  `HV.1` = "HV.1",
+  `HV.1.*` = "HV.1"
+)
+gisaid_brazil <- gisaid_brazil %>% filter(pangolin_lineage != "None")
+
+gisaid_brazil <- CollapseLineageToVOCs(
+  variant_df = gisaid_brazil,
+  vocs = vocs,
+  custom_voc_mapping = custom_voc_mapping,
+  summarize = FALSE
+)
-
-

Get weekly cases for Brazil

-
GetCases <- function() {
-  data <- read.csv("https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/cases_deaths/new_cases.csv")
-  confirmed <- data %>% select(date, Brazil)
-  colnames(confirmed)[2] <- c("cases")
-  confirmed$MonthYear <- GetMonthYear(confirmed$date)
-  confirmed$WeekYear <- tsibble::yearweek(confirmed$date)
-  return(confirmed)
-}
-
-
-GetCasesLong <- function() {
-  data <- read.csv("https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/cases_deaths/new_cases.csv")
-  confirmed <- data %>% select(date, Brazil)
-  colnames(confirmed)[2] <- c("cases")
-  confirmed$MonthYear <- GetMonthYear(confirmed$date)
-  confirmed$WeekYear <- tsibble::yearweek(confirmed$date)
-  confirmed_subset_weekwise <- confirmed %>%
-    group_by(WeekYear) %>%
-    summarise(cases = mean(cases, na.rm = T)) %>%
-    arrange(WeekYear)
-  confirmed_subset_weekwise$cases <- ceiling(confirmed_subset_weekwise$cases)
-  confirmed_subset_dateweekwise_long_india <- confirmed_subset_weekwise %>%
-    rename(n = cases) %>%
-    rename(WeekYearCollected = WeekYear)
-}
-
-
-confirmed <- GetCases()
-confirmed_subset_dateweekwise_long <- GetCasesLong()
-gisaid_brazil_weekwise <- SummarizeVariantsWeekwise(gisaid_brazil)
+
+

Get weekly cases for Brazil +

+
+GetCases <- function() {
+  data <- read.csv("https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/cases_deaths/new_cases.csv")
+  confirmed <- data %>% select(date, Brazil)
+  colnames(confirmed)[2] <- c("cases")
+  confirmed$MonthYear <- GetMonthYear(confirmed$date)
+  confirmed$WeekYear <- tsibble::yearweek(confirmed$date)
+  return(confirmed)
+}
+
+
+GetCasesLong <- function() {
+  data <- read.csv("https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/cases_deaths/new_cases.csv")
+  confirmed <- data %>% select(date, Brazil)
+  colnames(confirmed)[2] <- c("cases")
+  confirmed$MonthYear <- GetMonthYear(confirmed$date)
+  confirmed$WeekYear <- tsibble::yearweek(confirmed$date)
+  confirmed_subset_weekwise <- confirmed %>%
+    group_by(WeekYear) %>%
+    summarise(cases = mean(cases, na.rm = T)) %>%
+    arrange(WeekYear)
+  confirmed_subset_weekwise$cases <- ceiling(confirmed_subset_weekwise$cases)
+  confirmed_subset_dateweekwise_long_india <- confirmed_subset_weekwise %>%
+    rename(n = cases) %>%
+    rename(WeekYearCollected = WeekYear)
+}
+
+
+confirmed <- GetCases()
+confirmed_subset_dateweekwise_long <- GetCasesLong()
+gisaid_brazil_weekwise <- SummarizeVariantsWeekwise(gisaid_brazil)
-
-

Distribution of variants

-
state_month_counts <- SummarizeVariantsMonthwise(gisaid_brazil)
-state_month_counts$State <- "Brazil"
-state_month_prevalence <- CountsToPrevalence(state_month_counts)
-vocs <- GetVOCs()
-
-state_month_prevalence <- CollapseLineageToVOCs(
-  variant_df = state_month_prevalence,
-  vocs = vocs,
-  custom_voc_mapping = custom_voc_mapping, summarize = FALSE
-)
-
-p5 <- StackedBarPlotPrevalence(state_month_prevalence)
-p5
-

+
+

Distribution of variants +

+
+state_month_counts <- SummarizeVariantsMonthwise(gisaid_brazil)
+state_month_counts$State <- "Brazil"
+state_month_prevalence <- CountsToPrevalence(state_month_counts)
+vocs <- GetVOCs()
+
+state_month_prevalence <- CollapseLineageToVOCs(
+  variant_df = state_month_prevalence,
+  vocs = vocs,
+  custom_voc_mapping = custom_voc_mapping, summarize = FALSE
+)
+
+p5 <- StackedBarPlotPrevalence(state_month_prevalence)
+p5
+

-
-

Project weekly cases to variant prevalence data from GISAID

-
voc_to_keep <- gisaid_brazil_weekwise %>%
-  group_by(lineage_collapsed) %>%
-  summarise(n_sum = sum(n)) %>%
-  filter(n_sum > 50) %>%
-  pull(lineage_collapsed) %>%
-  unique()
-gisaid_brazil_weekwise <- gisaid_brazil_weekwise %>% filter(lineage_collapsed %in% voc_to_keep)
-
-brazil_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_brazil_weekwise, confirmed_subset_dateweekwise_long)
-#> # weights:  24 (15 variable)
-#> initial  value 439814.238114 
-#> iter  10 value 256033.720738
-#> iter  20 value 142234.034232
-#> iter  30 value 120096.926154
-#> iter  40 value 115996.408661
-#> iter  50 value 101694.726489
-#> iter  60 value 101679.150425
-#> iter  60 value 101679.150298
-#> iter  60 value 101679.150294
-#> final  value 101679.150294 
-#> converged
-the_anim <- PlotVariantPrevalenceAnimated(brazil_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Brazil by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>", date_breaks = "100 days")
-gganimate::anim_save(filename = here::here("docs/articles/Brazil_animated.gif"), animation = the_anim)
-

+
+

Project weekly cases to variant prevalence data from GISAID +

+
+voc_to_keep <- gisaid_brazil_weekwise %>%
+  group_by(lineage_collapsed) %>%
+  summarise(n_sum = sum(n)) %>%
+  filter(n_sum > 50) %>%
+  pull(lineage_collapsed) %>%
+  unique()
+gisaid_brazil_weekwise <- gisaid_brazil_weekwise %>% filter(lineage_collapsed %in% voc_to_keep)
+
+brazil_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_brazil_weekwise, confirmed_subset_dateweekwise_long)
+#> # weights:  28 (18 variable)
+#> initial  value 477631.429726 
+#> iter  10 value 252774.699692
+#> iter  20 value 152863.433099
+#> iter  30 value 112374.590589
+#> iter  40 value 97530.709125
+#> iter  50 value 89047.637849
+#> iter  60 value 87375.304507
+#> iter  70 value 87327.814941
+#> final  value 87327.549989 
+#> converged
+the_anim <- PlotVariantPrevalenceAnimated(brazil_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Brazil by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>", date_breaks = "100 days")
+gganimate::anim_save(filename = here::here("docs/articles/Brazil_animated.gif"), animation = the_anim)
+

Look at cases from 2022,

-
confirmed_subset_dateweekwise_long <- GetCasesLong() %>%
-  filter(WeekYearCollected >= tsibble::yearweek("2021 W35"))
-
-gisaid_brazil_subset <- gisaid_brazil %>% filter(MonthYearCollected > "Oct 2021")
-gisaid_brazil_weekwise <- SummarizeVariantsWeekwise(gisaid_brazil_subset)
-
-voc_to_keep <- gisaid_brazil_weekwise %>%
-  group_by(lineage_collapsed) %>%
-  summarise(n_sum = sum(n)) %>%
-  filter(n_sum > 50) %>%
-  pull(lineage_collapsed) %>%
-  unique()
-gisaid_brazil_weekwise <- gisaid_brazil_weekwise %>% filter(lineage_collapsed %in% voc_to_keep)
-
-brazil_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_brazil_weekwise, confirmed_subset_dateweekwise_long)
-#> # weights:  24 (15 variable)
-#> initial  value 242593.481577 
-#> iter  10 value 67367.516549
-#> iter  20 value 50299.321008
-#> iter  30 value 48568.582744
-#> iter  40 value 48399.528910
-#> iter  50 value 48216.001702
-#> final  value 48215.991366 
-#> converged
-the_anim <- PlotVariantPrevalenceAnimated(brazil_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Brazil by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>", date_breaks = "100 days")
-gganimate::anim_save(filename = here::here("docs/articles/Brazil_animated_2021.gif"), animation = the_anim)
-

Look at cases from 2023

-
confirmed_subset_dateweekwise_long <- GetCasesLong() %>%
-  filter(WeekYearCollected >= tsibble::yearweek("2022 W35"))
-
-gisaid_brazil_subset <- gisaid_brazil %>% filter(MonthYearCollected > "October 2022")
-gisaid_brazil_weekwise <- SummarizeVariantsWeekwise(gisaid_brazil_subset)
-
-voc_to_keep <- gisaid_brazil_weekwise %>%
-  group_by(lineage_collapsed) %>%
-  summarise(n_sum = sum(n)) %>%
-  filter(n_sum > 50) %>%
-  pull(lineage_collapsed) %>%
-  unique()
-gisaid_brazil_weekwise <- gisaid_brazil_weekwise %>% filter(lineage_collapsed %in% voc_to_keep)
-
-brazil_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_brazil_weekwise, confirmed_subset_dateweekwise_long)
-#> # weights:  16 (9 variable)
-#> initial  value 42782.430279 
-#> iter  10 value 25591.413964
-#> iter  20 value 24307.240935
-#> iter  20 value 24307.240870
-#> final  value 24307.240870 
-#> converged
-the_anim <- PlotVariantPrevalenceAnimated(brazil_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Brazil by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>")
-gganimate::anim_save(filename = here::here("docs/articles/Brazil_animated_2023.gif"), animation = the_anim)
-

+
+confirmed_subset_dateweekwise_long <- GetCasesLong() %>%
+  filter(WeekYearCollected >= tsibble::yearweek("2021 W35"))
+
+gisaid_brazil_subset <- gisaid_brazil %>% filter(MonthYearCollected > "Oct 2021")
+gisaid_brazil_weekwise <- SummarizeVariantsWeekwise(gisaid_brazil_subset)
+
+voc_to_keep <- gisaid_brazil_weekwise %>%
+  group_by(lineage_collapsed) %>%
+  summarise(n_sum = sum(n)) %>%
+  filter(n_sum > 50) %>%
+  pull(lineage_collapsed) %>%
+  unique()
+gisaid_brazil_weekwise <- gisaid_brazil_weekwise %>% filter(lineage_collapsed %in% voc_to_keep)
+
+brazil_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_brazil_weekwise, confirmed_subset_dateweekwise_long)
+#> # weights:  20 (12 variable)
+#> initial  value 217901.798964 
+#> iter  10 value 68117.519899
+#> iter  20 value 38972.173600
+#> iter  30 value 38224.146018
+#> iter  40 value 37696.212812
+#> iter  50 value 37684.646795
+#> final  value 37684.553986 
+#> converged
+the_anim <- PlotVariantPrevalenceAnimated(brazil_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Brazil by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>", date_breaks = "100 days")
+gganimate::anim_save(filename = here::here("docs/articles/Brazil_animated_2021.gif"), animation = the_anim)
+

Look at cases from 2023

+
+confirmed_subset_dateweekwise_long <- GetCasesLong() %>%
+  filter(WeekYearCollected >= tsibble::yearweek("2022 W35"))
+
+gisaid_brazil_subset <- gisaid_brazil %>% filter(MonthYearCollected > "October 2022")
+gisaid_brazil_weekwise <- SummarizeVariantsWeekwise(gisaid_brazil_subset)
+
+voc_to_keep <- gisaid_brazil_weekwise %>%
+  group_by(lineage_collapsed) %>%
+  summarise(n_sum = sum(n)) %>%
+  filter(n_sum > 50) %>%
+  pull(lineage_collapsed) %>%
+  unique()
+gisaid_brazil_weekwise <- gisaid_brazil_weekwise %>% filter(lineage_collapsed %in% voc_to_keep)
+
+brazil_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_brazil_weekwise, confirmed_subset_dateweekwise_long)
+#> # weights:  12 (6 variable)
+#> initial  value 33904.273841 
+#> iter  10 value 19641.239613
+#> iter  20 value 18993.304042
+#> iter  30 value 18989.592419
+#> iter  40 value 18989.385555
+#> iter  40 value 18989.385495
+#> final  value 18989.385495 
+#> converged
+the_anim <- PlotVariantPrevalenceAnimated(brazil_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Brazil by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>")
+gganimate::anim_save(filename = here::here("docs/articles/Brazil_animated_2023.gif"), animation = the_anim)
+

Look at cases in the past few weeks

-
confirmed_subset_dateweekwise_long <- GetCasesLong() %>%
-  filter(WeekYearCollected >= tsibble::yearweek("2023 W23"))
-
-gisaid_brazil_subset <- gisaid_brazil %>% filter(MonthYearCollected > "June 2023")
-gisaid_brazil_weekwise <- SummarizeVariantsWeekwise(gisaid_brazil_subset)
-
-voc_to_keep <- gisaid_brazil_weekwise %>%
-  group_by(lineage_collapsed) %>%
-  summarise(n_sum = sum(n)) %>%
-  filter(n_sum > 50) %>%
-  pull(lineage_collapsed) %>%
-  unique()
-gisaid_brazil_weekwise <- gisaid_brazil_weekwise %>% filter(lineage_collapsed %in% voc_to_keep)
-
-brazil_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_brazil_weekwise, confirmed_subset_dateweekwise_long)
-#> # weights:  16 (9 variable)
-#> initial  value 7589.961627 
-#> iter  10 value 3097.145675
-#> iter  20 value 2913.994381
-#> iter  30 value 2912.954507
-#> final  value 2905.363627 
-#> converged
-the_anim <- PlotVariantPrevalenceAnimated(brazil_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Brazil by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>")
-gganimate::anim_save(filename = here::here("docs/articles/Brazil_animated_2024.gif"), animation = the_anim)
-

+
+confirmed_subset_dateweekwise_long <- GetCasesLong() %>%
+  filter(WeekYearCollected >= tsibble::yearweek("2023 W23"))
+
+gisaid_brazil_subset <- gisaid_brazil %>% filter(MonthYearCollected > "June 2023")
+gisaid_brazil_weekwise <- SummarizeVariantsWeekwise(gisaid_brazil_subset)
+
+voc_to_keep <- gisaid_brazil_weekwise %>%
+  group_by(lineage_collapsed) %>%
+  summarise(n_sum = sum(n)) %>%
+  filter(n_sum > 50) %>%
+  pull(lineage_collapsed) %>%
+  unique()
+gisaid_brazil_weekwise <- gisaid_brazil_weekwise %>% filter(lineage_collapsed %in% voc_to_keep)
+
+brazil_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_brazil_weekwise, confirmed_subset_dateweekwise_long)
+#> # weights:  12 (6 variable)
+#> initial  value 6014.902280 
+#> iter  10 value 2614.497681
+#> iter  20 value 2554.179438
+#> iter  30 value 2546.094236
+#> iter  40 value 2544.802563
+#> iter  50 value 2544.464767
+#> iter  60 value 2544.297783
+#> iter  60 value 2544.297759
+#> iter  60 value 2544.297759
+#> final  value 2544.297759 
+#> converged
+the_anim <- PlotVariantPrevalenceAnimated(brazil_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Brazil by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>")
+gganimate::anim_save(filename = here::here("docs/articles/Brazil_animated_2024.gif"), animation = the_anim)
+

+ +
+ +
- + + diff --git a/docs/articles/VariantAnimation-Germany.html b/docs/articles/VariantAnimation-Germany.html index 9a5ff9e7..891c53bb 100644 --- a/docs/articles/VariantAnimation-Germany.html +++ b/docs/articles/VariantAnimation-Germany.html @@ -118,6 +118,7 @@

Get variants data for Germanyvocs <- GetVOCs() custom_voc_mapping <- list( + `B.1` = "B.1", `JN.1` = "JN.1", `JN.1.*` = "JN.1", `HV.1` = "HV.1", @@ -199,15 +200,18 @@

Project wee gisaid_germany_weekwise <- gisaid_germany_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) germany_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_germany_weekwise, confirmed_subset_dateweekwise_long) -#> # weights: 24 (15 variable) -#> initial value 1691637.741847 -#> iter 10 value 570765.488578 -#> iter 20 value 358421.836309 -#> iter 30 value 336331.334427 -#> iter 40 value 335021.300503 -#> iter 50 value 334445.582898 -#> iter 60 value 334438.288338 -#> final value 334437.830119 +#> # weights: 36 (24 variable) +#> initial value 2074445.865179 +#> iter 10 value 1063939.935748 +#> iter 20 value 867530.835780 +#> iter 30 value 478554.650417 +#> iter 40 value 396066.387593 +#> iter 50 value 381217.890151 +#> iter 60 value 380394.091673 +#> iter 70 value 378533.555259 +#> iter 80 value 378391.902892 +#> iter 90 value 378390.016817 +#> final value 378389.677651 #> converged the_anim <- PlotVariantPrevalenceAnimated(germany_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Germany by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>", date_breaks = "100 days") gganimate::anim_save(filename = here::here("docs/articles/Germany_animated.gif"), animation = the_anim) @@ -229,14 +233,16 @@

Project wee gisaid_germany_weekwise <- gisaid_germany_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) germany_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_germany_weekwise, confirmed_subset_dateweekwise_long) -#> # weights: 20 (12 variable) -#> initial value 1096014.342864 -#> iter 10 value 220828.608976 -#> iter 20 value 175829.659929 -#> iter 30 value 175663.722535 -#> iter 40 value 175607.599433 -#> iter 50 value 175599.865736 -#> final value 175596.709160 +#> # weights: 28 (18 variable) +#> initial value 1325133.676944 +#> iter 10 value 337084.466635 +#> iter 20 value 241897.671222 +#> iter 30 value 218966.887574 +#> iter 40 value 217770.622258 +#> iter 50 value 217394.147386 +#> iter 60 value 217257.750656 +#> iter 70 value 217253.122840 +#> final value 217246.820859 #> converged the_anim <- PlotVariantPrevalenceAnimated(germany_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Germany by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>", date_breaks = "100 days") gganimate::anim_save(filename = here::here("docs/articles/Germany_animated_2021.gif"), animation = the_anim) @@ -257,14 +263,15 @@

Project wee gisaid_germany_weekwise <- gisaid_germany_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) germany_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_germany_weekwise, confirmed_subset_dateweekwise_long) -#> # weights: 20 (12 variable) -#> initial value 139995.347375 -#> iter 10 value 36401.635622 -#> iter 20 value 31581.847812 -#> iter 30 value 31347.374123 -#> iter 40 value 31328.203051 -#> iter 50 value 31320.291537 -#> final value 31320.289271 +#> # weights: 24 (15 variable) +#> initial value 155847.238633 +#> iter 10 value 56793.412935 +#> iter 20 value 52114.661952 +#> iter 30 value 51877.456813 +#> iter 40 value 51873.049641 +#> iter 50 value 51862.141065 +#> iter 60 value 51853.315798 +#> final value 51852.132729 #> converged the_anim <- PlotVariantPrevalenceAnimated(germany_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Germany by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>") gganimate::anim_save(filename = here::here("docs/articles/Germany_animated_2023.gif"), animation = the_anim) @@ -288,10 +295,10 @@

Project wee germany_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_germany_weekwise, confirmed_subset_dateweekwise_long) #> # weights: 16 (9 variable) #> initial value 7300.226106 -#> iter 10 value 3881.371736 -#> iter 20 value 3706.527485 -#> iter 30 value 3706.061160 -#> final value 3705.818922 +#> iter 10 value 5030.140143 +#> iter 20 value 5016.816763 +#> iter 30 value 5016.741640 +#> final value 5016.642195 #> converged the_anim <- PlotVariantPrevalenceAnimated(germany_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Germany by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>") gganimate::anim_save(filename = here::here("docs/articles/Germany_animated_2024.gif"), animation = the_anim) diff --git a/docs/articles/VariantAnimation-Germany_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-Germany_files/figure-html/unnamed-chunk-5-1.png index 0a05b442..35a11b6c 100644 Binary files a/docs/articles/VariantAnimation-Germany_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-Germany_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/VariantAnimation-India.html b/docs/articles/VariantAnimation-India.html index 1a4595b6..de142d78 100644 --- a/docs/articles/VariantAnimation-India.html +++ b/docs/articles/VariantAnimation-India.html @@ -188,12 +188,15 @@

Project wee gisaid_india_weekwise <- gisaid_india_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) india_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_india_weekwise, confirmed_subset_dateweekwise_long_india) -#> # weights: 16 (9 variable) -#> initial value 337271.555117 -#> iter 10 value 136164.268951 -#> iter 20 value 127274.289121 -#> iter 30 value 126211.402259 -#> final value 126175.431381 +#> # weights: 24 (15 variable) +#> initial value 435917.161268 +#> iter 10 value 203376.238329 +#> iter 20 value 132627.668437 +#> iter 30 value 110387.638012 +#> iter 40 value 98997.091816 +#> iter 50 value 91613.245843 +#> iter 60 value 91567.517092 +#> final value 91567.125908 #> converged the_anim <- PlotVariantPrevalenceAnimated(india_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in India by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**", date_breaks = "28 days") # , trans_y="log10") gganimate::anim_save(filename = here::here("docs/articles/IN_animated.gif"), animation = the_anim) @@ -216,11 +219,11 @@

Project wee cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) #> # weights: 16 (9 variable) -#> initial value 150824.667607 -#> iter 10 value 24972.993517 -#> iter 20 value 23962.883697 -#> iter 30 value 23855.803013 -#> final value 23854.831935 +#> initial value 150823.281312 +#> iter 10 value 28488.446992 +#> iter 20 value 28078.367254 +#> iter 30 value 28037.626623 +#> final value 28036.775627 #> converged the_anim <- PlotVariantPrevalenceAnimated(cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in India by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>") # , trans_y="log10") gganimate::anim_save(filename = here::here("docs/articles/IN_animated_2021.gif"), animation = the_anim) @@ -242,14 +245,12 @@

Project wee gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) -#> # weights: 12 (6 variable) -#> initial value 65787.101070 -#> iter 10 value 12795.846468 -#> iter 20 value 11341.853020 -#> iter 30 value 11321.898730 -#> iter 40 value 11320.964974 -#> iter 40 value 11320.964972 -#> final value 11320.964972 +#> # weights: 16 (9 variable) +#> initial value 83022.396699 +#> iter 10 value 21662.171867 +#> iter 20 value 20663.788332 +#> iter 30 value 20634.583647 +#> final value 20634.418904 #> converged the_anim <- PlotVariantPrevalenceAnimated(cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in India by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>") gganimate::anim_save(filename = here::here("docs/articles/IN_animated_2022.gif"), animation = the_anim) @@ -271,11 +272,12 @@

Project wee gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) -#> # weights: 12 (6 variable) -#> initial value 16898.854224 -#> iter 10 value 8321.928987 -#> iter 20 value 8320.438000 -#> final value 8320.240607 +#> # weights: 16 (9 variable) +#> initial value 21322.593568 +#> iter 10 value 4544.090139 +#> iter 20 value 4357.909949 +#> iter 30 value 4353.022910 +#> final value 4352.362691 #> converged the_anim <- PlotVariantPrevalenceAnimated(cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in India by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>") gganimate::anim_save(filename = here::here("docs/articles/IN_animated_latest.gif"), animation = the_anim) @@ -298,24 +300,27 @@

Project wee cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) #> # weights: 12 (6 variable) #> initial value 874.495382 -#> iter 10 value 446.382584 -#> iter 20 value 445.174009 -#> iter 30 value 443.854662 -#> iter 40 value 443.778264 -#> iter 50 value 443.726497 -#> iter 60 value 443.655272 -#> iter 70 value 443.610395 -#> iter 80 value 443.568138 -#> iter 90 value 443.543940 -#> iter 100 value 443.523862 -#> iter 110 value 443.509262 -#> iter 120 value 443.502576 -#> iter 130 value 443.496379 -#> iter 140 value 443.488435 -#> iter 150 value 443.481717 -#> iter 160 value 443.479106 -#> iter 170 value 443.461110 -#> final value 443.451292 +#> iter 10 value 389.775945 +#> iter 20 value 387.804553 +#> iter 30 value 386.553643 +#> iter 40 value 386.441513 +#> iter 50 value 386.382953 +#> iter 60 value 386.365254 +#> iter 70 value 386.298318 +#> iter 80 value 386.272505 +#> iter 90 value 386.255368 +#> iter 100 value 386.222906 +#> iter 110 value 386.201252 +#> iter 120 value 386.162814 +#> iter 130 value 386.124863 +#> iter 140 value 386.054155 +#> iter 150 value 386.023411 +#> iter 160 value 386.018070 +#> iter 170 value 385.965945 +#> iter 180 value 385.930468 +#> iter 190 value 385.928281 +#> iter 200 value 385.836327 +#> final value 385.828110 #> converged the_anim <- PlotVariantPrevalenceAnimated(cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in India by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>") gganimate::anim_save(filename = here::here("docs/articles/IN_animated_2023.gif"), animation = the_anim) diff --git a/docs/articles/VariantAnimation-India_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/VariantAnimation-India_files/figure-html/unnamed-chunk-4-1.png index 1db5de55..9f861933 100644 Binary files a/docs/articles/VariantAnimation-India_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/VariantAnimation-India_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/VariantAnimation-NYC.html b/docs/articles/VariantAnimation-NYC.html index 08ce20ee..500ef399 100644 --- a/docs/articles/VariantAnimation-NYC.html +++ b/docs/articles/VariantAnimation-NYC.html @@ -170,36 +170,16 @@

Distribution of variants variant_df = state_month_prevalence, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE -) -
## Warning: There was 1 warning in `mutate()`.
-##  In argument: `lineage_collapsed = case_when(...)`.
-## Caused by warning in `grepl()`:
-## ! argument 'pattern' has length > 1 and only the first element will be used
-## There was 1 warning in `mutate()`.
-##  In argument: `lineage_collapsed = case_when(...)`.
-## Caused by warning in `grepl()`:
-## ! argument 'pattern' has length > 1 and only the first element will be used
-## There was 1 warning in `mutate()`.
-##  In argument: `lineage_collapsed = case_when(...)`.
-## Caused by warning in `grepl()`:
-## ! argument 'pattern' has length > 1 and only the first element will be used
-## There was 1 warning in `mutate()`.
-##  In argument: `lineage_collapsed = case_when(...)`.
-## Caused by warning in `grepl()`:
-## ! argument 'pattern' has length > 1 and only the first element will be used
-## There was 1 warning in `mutate()`.
-##  In argument: `lineage_collapsed = case_when(...)`.
-## Caused by warning in `grepl()`:
-## ! argument 'pattern' has length > 1 and only the first element will be used
-
-p5 <- StackedBarPlotPrevalence(state_month_prevalence)
+)
+
+p5 <- StackedBarPlotPrevalence(state_month_prevalence)
 p5

Project weekly cases to variant prevalence data from GISAID

-
+
 voc_to_keep <- gisaid_NYC_weekwise %>%
   group_by(lineage_collapsed) %>%
   summarise(n_sum = sum(n)) %>%
@@ -209,22 +189,30 @@ 

Project wee gisaid_NYC_weekwise <- gisaid_NYC_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) newyork_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_NYC_weekwise, confirmed_subset_dateweekwise_long)

-
## # weights:  24 (15 variable)
-## initial  value 275423.890331 
-## iter  10 value 103526.406601
-## iter  20 value 57662.832925
-## iter  30 value 52088.430642
-## iter  40 value 51128.645887
-## iter  50 value 50130.386333
-## iter  60 value 50124.942658
-## final  value 50124.923846 
+
## # weights:  32 (21 variable)
+## initial  value 319645.515462 
+## iter  10 value 129725.918553
+## iter  20 value 95448.294186
+## iter  30 value 66627.314993
+## iter  40 value 61240.137015
+## iter  50 value 59773.177006
+## iter  60 value 56245.973825
+## iter  70 value 55654.886438
+## iter  80 value 55647.792960
+## iter  90 value 55627.197638
+## iter 100 value 55623.924667
+## iter 110 value 55622.181447
+## iter 120 value 55621.085564
+## iter 120 value 55621.085151
+## iter 120 value 55621.085150
+## final  value 55621.085150 
 ## converged
-
+
 the_anim <- PlotVariantPrevalenceAnimated(newyork_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in New York City by variant", caption = "**Source: gisaid.org and NYC Health**<br>", date_breaks = "14 days")
 gganimate::anim_save(filename = here::here("docs/articles/NYC_animated.gif"), animation = the_anim)

Look at cases from 2023:

-
+
 confirmed_subset_dateweekwise_long <- confirmed %>%
   filter(MonthYear > "April 2023") %>%
   group_by(WeekYear) %>%
@@ -246,20 +234,21 @@ 

Project wee cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long)

## # weights:  20 (12 variable)
 ## initial  value 6255.885166 
-## iter  10 value 3026.359758
-## iter  20 value 2921.703016
-## iter  30 value 2920.866234
-## iter  40 value 2919.388425
-## iter  50 value 2915.871424
-## final  value 2915.869578 
+## iter  10 value 3451.483231
+## iter  20 value 3290.395049
+## iter  30 value 3287.151312
+## iter  40 value 3286.131901
+## iter  50 value 3284.254882
+## iter  60 value 3283.660561
+## final  value 3283.634015 
 ## converged
-
+
 the_anim <- PlotVariantPrevalenceAnimated(cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in New York City by variant", caption = "**Source: gisaid.org and NYC Health**<br>")
## `geom_line()`: Each group consists of only one observation.
 ##  Do you need to adjust the group aesthetic?
 ## `geom_line()`: Each group consists of only one observation.
 ##  Do you need to adjust the group aesthetic?
-
+
 gganimate::anim_save(filename = here::here("docs/articles/NYC_animated_2023.gif"), animation = the_anim)

diff --git a/docs/articles/VariantAnimation-NYC_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/VariantAnimation-NYC_files/figure-html/unnamed-chunk-4-1.png index 5aa7ce1b..e4043458 100644 Binary files a/docs/articles/VariantAnimation-NYC_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/VariantAnimation-NYC_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/VariantAnimation-NewYork.html b/docs/articles/VariantAnimation-NewYork.html index 338d49ba..6c4cbcef 100644 --- a/docs/articles/VariantAnimation-NewYork.html +++ b/docs/articles/VariantAnimation-NewYork.html @@ -199,15 +199,26 @@

Project wee gisaid_NY_weekwise <- gisaid_NY_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) newyork_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_NY_weekwise, confirmed_subset_dateweekwise_long) -#> # weights: 24 (15 variable) -#> initial value 619721.222900 -#> iter 10 value 195727.910791 -#> iter 20 value 170255.896718 -#> iter 30 value 155698.851947 -#> iter 40 value 154824.652436 -#> iter 50 value 154462.055572 -#> iter 60 value 154363.600858 -#> final value 154363.141606 +#> # weights: 32 (21 variable) +#> initial value 719222.684345 +#> iter 10 value 250462.078514 +#> iter 20 value 201636.251764 +#> iter 30 value 160252.304662 +#> iter 40 value 144230.414078 +#> iter 50 value 141156.595823 +#> iter 60 value 140119.368791 +#> iter 70 value 139877.250294 +#> iter 80 value 139856.880616 +#> iter 90 value 139853.933404 +#> iter 100 value 139852.923006 +#> iter 110 value 139851.719163 +#> iter 120 value 139839.294051 +#> iter 130 value 139798.844398 +#> iter 140 value 139798.172817 +#> iter 150 value 139789.702568 +#> iter 160 value 139789.263859 +#> iter 170 value 139783.874106 +#> final value 139769.529380 #> converged the_anim <- PlotVariantPrevalenceAnimated(newyork_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in New York state by variant", caption = "**Source: gisaid.org and covid19nytimes**<br>", date_breaks = "28 days") gganimate::anim_save(filename = here::here("docs/articles/NY_animated.gif"), animation = the_anim)

@@ -235,16 +246,15 @@

Project wee gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long) -#> # weights: 16 (9 variable) -#> initial value 51058.607614 -#> iter 10 value 30075.975445 -#> iter 20 value 25816.045505 -#> iter 30 value 25743.056638 -#> iter 40 value 25726.530411 -#> iter 50 value 25725.121302 -#> iter 60 value 25724.530866 -#> iter 70 value 25724.410164 -#> final value 25724.409451 +#> # weights: 20 (12 variable) +#> initial value 59275.598315 +#> iter 10 value 32489.530379 +#> iter 20 value 23853.543116 +#> iter 30 value 23765.301220 +#> iter 40 value 23676.483714 +#> iter 50 value 23659.962306 +#> iter 60 value 23657.736857 +#> final value 23657.605377 #> converged the_anim <- PlotVariantPrevalenceAnimated(cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in New York state by variant", caption = "**Source: gisaid.org and covid19nytimes**<br>") gganimate::anim_save(filename = here::here("docs/articles/NY_animated_2023.gif"), animation = the_anim)

diff --git a/docs/articles/VariantAnimation-NewYork_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-NewYork_files/figure-html/unnamed-chunk-5-1.png index f116559e..1526a9b8 100644 Binary files a/docs/articles/VariantAnimation-NewYork_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-NewYork_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/VariantAnimation-Singapore.html b/docs/articles/VariantAnimation-Singapore.html index f3f27eee..c00cb110 100644 --- a/docs/articles/VariantAnimation-Singapore.html +++ b/docs/articles/VariantAnimation-Singapore.html @@ -118,6 +118,7 @@

Get variants data for Singapore vocs <- GetVOCs() custom_voc_mapping <- list( + `B.1` = "B.1", `JN.1` = "JN.1", `JN.1.*` = "JN.1", `HV.1` = "HV.1", @@ -199,15 +200,22 @@

Project wee gisaid_singapore_weekwise <- gisaid_singapore_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) singapore_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_singapore_weekwise, confirmed_subset_dateweekwise_long) -#> # weights: 24 (15 variable) -#> initial value 82510.523558 -#> iter 10 value 33090.560838 -#> iter 20 value 26735.659433 -#> iter 30 value 25247.257923 -#> iter 40 value 25213.729733 -#> iter 50 value 25117.939097 -#> iter 60 value 25114.301460 -#> final value 25114.254352 +#> # weights: 36 (24 variable) +#> initial value 101182.191786 +#> iter 10 value 48652.582101 +#> iter 20 value 39085.719681 +#> iter 30 value 28592.344153 +#> iter 40 value 25826.843049 +#> iter 50 value 24977.172867 +#> iter 60 value 24844.233642 +#> iter 70 value 23985.157994 +#> iter 80 value 23669.365207 +#> iter 90 value 23455.798545 +#> iter 100 value 23434.628311 +#> iter 110 value 23434.622239 +#> iter 110 value 23434.622024 +#> iter 110 value 23434.622009 +#> final value 23434.622009 #> converged the_anim <- PlotVariantPrevalenceAnimated(singapore_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Singapore by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>", date_breaks = "100 days") gganimate::anim_save(filename = here::here("docs/articles/Singapore_animated.gif"), animation = the_anim)

@@ -230,14 +238,14 @@

Project wee singapore_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_singapore_weekwise, confirmed_subset_dateweekwise_long) #> # weights: 24 (15 variable) -#> initial value 65922.414392 -#> iter 10 value 28220.263731 -#> iter 20 value 17092.115644 -#> iter 30 value 15938.368484 -#> iter 40 value 15926.599474 -#> iter 50 value 15915.823096 -#> iter 60 value 15892.865985 -#> final value 15891.837481 +#> initial value 65890.162721 +#> iter 10 value 36987.620326 +#> iter 20 value 22026.664366 +#> iter 30 value 20152.953185 +#> iter 40 value 20134.991682 +#> iter 50 value 20120.576654 +#> iter 60 value 20118.637434 +#> final value 20117.468685 #> converged the_anim <- PlotVariantPrevalenceAnimated(singapore_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Singapore by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>", date_breaks = "100 days") gganimate::anim_save(filename = here::here("docs/articles/Singapore_animated_2021.gif"), animation = the_anim)

@@ -259,15 +267,13 @@

Project wee singapore_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_singapore_weekwise, confirmed_subset_dateweekwise_long) #> # weights: 20 (12 variable) -#> initial value 32468.800445 -#> iter 10 value 13308.373611 -#> iter 20 value 12515.237932 -#> iter 30 value 12487.928802 -#> iter 40 value 12485.484234 -#> iter 50 value 12479.046008 -#> iter 60 value 12478.849939 -#> iter 70 value 12468.270107 -#> final value 12460.142882 +#> initial value 32454.315504 +#> iter 10 value 16545.778112 +#> iter 20 value 14649.971312 +#> iter 30 value 14616.699200 +#> iter 40 value 14613.463909 +#> iter 50 value 14609.706540 +#> final value 14609.653579 #> converged the_anim <- PlotVariantPrevalenceAnimated(singapore_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Singapore by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>") gganimate::anim_save(filename = here::here("docs/articles/Singapore_animated_2023.gif"), animation = the_anim)

@@ -291,10 +297,10 @@

Project wee singapore_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_singapore_weekwise, confirmed_subset_dateweekwise_long) #> # weights: 16 (9 variable) #> initial value 11482.676193 -#> iter 10 value 4059.930547 -#> iter 20 value 3693.774537 -#> iter 30 value 3654.622195 -#> final value 3634.804030 +#> iter 10 value 6272.345196 +#> iter 20 value 6052.218801 +#> iter 30 value 6017.423893 +#> final value 6010.399981 #> converged the_anim <- PlotVariantPrevalenceAnimated(singapore_cases_pred_prob_sel_long, title = "Estimated cases (weekly average) in Singapore by variant", caption = "**Source: gisaid.org and ourworldindata.org/coronavirus**<br>") gganimate::anim_save(filename = here::here("docs/articles/Singapore_animated_2024.gif"), animation = the_anim) diff --git a/docs/articles/VariantAnimation-Singapore_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-Singapore_files/figure-html/unnamed-chunk-5-1.png index 02ac7a28..20df626a 100644 Binary files a/docs/articles/VariantAnimation-Singapore_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-Singapore_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/VariantAnimation-SouthAfrica_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-SouthAfrica_files/figure-html/unnamed-chunk-5-1.png index 091aed25..b32fb0a0 100644 Binary files a/docs/articles/VariantAnimation-SouthAfrica_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-SouthAfrica_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index 9ca99a11..5656fd08 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -82,10 +82,6 @@

All vignettes

Animation of projected weekly cases - Singapore
-
Animation of projected weekly cases - South Africa
-
-
Animation of projected weekly cases - United Kingdom
-
Animation of projected weekly cases - USA
diff --git a/vignettes/VariantAnimation-SouthAfrica.Rmd b/vignettes/_VariantAnimation-SouthAfrica.Rmd similarity index 100% rename from vignettes/VariantAnimation-SouthAfrica.Rmd rename to vignettes/_VariantAnimation-SouthAfrica.Rmd diff --git a/vignettes/VariantAnimation-UK.Rmd b/vignettes/_VariantAnimation-UK.Rmd similarity index 100% rename from vignettes/VariantAnimation-UK.Rmd rename to vignettes/_VariantAnimation-UK.Rmd