diff --git a/docs/articles/Australia_animated.gif b/docs/articles/Australia_animated.gif index bdcbc152..656bc513 100644 Binary files a/docs/articles/Australia_animated.gif and b/docs/articles/Australia_animated.gif differ diff --git a/docs/articles/Australia_animated_2021.gif b/docs/articles/Australia_animated_2021.gif index 9d5470f7..72e58eb7 100644 Binary files a/docs/articles/Australia_animated_2021.gif and b/docs/articles/Australia_animated_2021.gif differ diff --git a/docs/articles/Australia_animated_2023.gif b/docs/articles/Australia_animated_2023.gif index ad87dce8..5311b428 100644 Binary files a/docs/articles/Australia_animated_2023.gif and b/docs/articles/Australia_animated_2023.gif differ diff --git a/docs/articles/Australia_animated_2024.gif b/docs/articles/Australia_animated_2024.gif index 080575a0..25ae82d0 100644 Binary files a/docs/articles/Australia_animated_2024.gif and b/docs/articles/Australia_animated_2024.gif differ diff --git a/docs/articles/Brazil_animated.gif b/docs/articles/Brazil_animated.gif index a249c92a..46e3c13f 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 e1002023..2e72ae7c 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 2730c5f5..453d0945 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 6a12cbb7..e02ffa0f 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 65b189b0..d9edd7fb 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 285428c2..21c45f63 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 2b6b84ef..febe39a8 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 e18675ec..0e0e8fca 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 c1cee2f2..031b5af3 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 83bedc60..0d411207 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 e91c4538..87da3306 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 b200a9f8..408b142b 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 259dfc8e..fd0647ab 100644 Binary files a/docs/articles/IN_animated_latest.gif and b/docs/articles/IN_animated_latest.gif differ diff --git a/docs/articles/Introduction.html b/docs/articles/Introduction.html index d1e85570..e36cca73 100644 --- a/docs/articles/Introduction.html +++ b/docs/articles/Introduction.html @@ -136,7 +136,7 @@
-current_date <- "2024_01_22"
+current_date <- "2024_01_25"
fpath.tar <- paste0("~/data/epicov/metadata_tsv_", current_date, ".tar.xz")
fpath.qs <- paste0("~/data/epicov/metadata_tsv_", current_date, ".qs")
diff --git a/docs/articles/Introduction_files/figure-html/unnamed-chunk-10-1.png b/docs/articles/Introduction_files/figure-html/unnamed-chunk-10-1.png
index edc0d163..38d0350c 100644
Binary files a/docs/articles/Introduction_files/figure-html/unnamed-chunk-10-1.png and b/docs/articles/Introduction_files/figure-html/unnamed-chunk-10-1.png differ
diff --git a/docs/articles/Introduction_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/Introduction_files/figure-html/unnamed-chunk-4-1.png
index cf1fb386..719cbcce 100644
Binary files a/docs/articles/Introduction_files/figure-html/unnamed-chunk-4-1.png and b/docs/articles/Introduction_files/figure-html/unnamed-chunk-4-1.png differ
diff --git a/docs/articles/Introduction_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/Introduction_files/figure-html/unnamed-chunk-6-1.png
index 9a5878d7..9898a1aa 100644
Binary files a/docs/articles/Introduction_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/Introduction_files/figure-html/unnamed-chunk-6-1.png differ
diff --git a/docs/articles/Introduction_files/figure-html/unnamed-chunk-7-1.png b/docs/articles/Introduction_files/figure-html/unnamed-chunk-7-1.png
index 73826538..cfb1dc1b 100644
Binary files a/docs/articles/Introduction_files/figure-html/unnamed-chunk-7-1.png and b/docs/articles/Introduction_files/figure-html/unnamed-chunk-7-1.png differ
diff --git a/docs/articles/NYC_animated.gif b/docs/articles/NYC_animated.gif
index 74369df8..217fcf6c 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 88264cb5..1d3671eb 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 4ee766b4..14ab40cf 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 1b917791..d2b1d1a4 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 35f8922a..ce1f9efe 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 a57fc5d2..a43e5e64 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 26c3ae44..5217f006 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 e4802a35..701c6ae1 100644
Binary files a/docs/articles/Singapore_animated_2024.gif and b/docs/articles/Singapore_animated_2024.gif differ
diff --git a/docs/articles/Switzerland_animated.gif b/docs/articles/Switzerland_animated.gif
index cc55eb41..740254ef 100644
Binary files a/docs/articles/Switzerland_animated.gif and b/docs/articles/Switzerland_animated.gif differ
diff --git a/docs/articles/Switzerland_animated_2021.gif b/docs/articles/Switzerland_animated_2021.gif
index d7872f2b..13785c01 100644
Binary files a/docs/articles/Switzerland_animated_2021.gif and b/docs/articles/Switzerland_animated_2021.gif differ
diff --git a/docs/articles/Switzerland_animated_2023.gif b/docs/articles/Switzerland_animated_2023.gif
index 31e0410d..f43439ed 100644
Binary files a/docs/articles/Switzerland_animated_2023.gif and b/docs/articles/Switzerland_animated_2023.gif differ
diff --git a/docs/articles/Switzerland_animated_2024.gif b/docs/articles/Switzerland_animated_2024.gif
index ad7e81d3..91034238 100644
Binary files a/docs/articles/Switzerland_animated_2024.gif and b/docs/articles/Switzerland_animated_2024.gif differ
diff --git a/docs/articles/USA_animated.gif b/docs/articles/USA_animated.gif
index a860cd72..761ca4a5 100644
Binary files a/docs/articles/USA_animated.gif and b/docs/articles/USA_animated.gif differ
diff --git a/docs/articles/USA_animated_2021.gif b/docs/articles/USA_animated_2021.gif
index eff69c6b..f29cdf69 100644
Binary files a/docs/articles/USA_animated_2021.gif and b/docs/articles/USA_animated_2021.gif differ
diff --git a/docs/articles/USA_animated_2023.gif b/docs/articles/USA_animated_2023.gif
index 189c2156..ca58d453 100644
Binary files a/docs/articles/USA_animated_2023.gif and b/docs/articles/USA_animated_2023.gif differ
diff --git a/docs/articles/United_Kingdom_animated.gif b/docs/articles/United_Kingdom_animated.gif
index 5e618b7a..c0c98125 100644
Binary files a/docs/articles/United_Kingdom_animated.gif and b/docs/articles/United_Kingdom_animated.gif differ
diff --git a/docs/articles/United_Kingdom_animated_2021.gif b/docs/articles/United_Kingdom_animated_2021.gif
index 9ffb0fc2..62944fea 100644
Binary files a/docs/articles/United_Kingdom_animated_2021.gif and b/docs/articles/United_Kingdom_animated_2021.gif differ
diff --git a/docs/articles/United_Kingdom_animated_2023.gif b/docs/articles/United_Kingdom_animated_2023.gif
index d4817290..b0804fd9 100644
Binary files a/docs/articles/United_Kingdom_animated_2023.gif and b/docs/articles/United_Kingdom_animated_2023.gif differ
diff --git a/docs/articles/United_Kingdom_animated_2024.gif b/docs/articles/United_Kingdom_animated_2024.gif
index 424999e1..77f1d914 100644
Binary files a/docs/articles/United_Kingdom_animated_2024.gif and b/docs/articles/United_Kingdom_animated_2024.gif differ
diff --git a/docs/articles/VariantAnimation-Australia.html b/docs/articles/VariantAnimation-Australia.html
index e10daf38..6c68cf92 100644
--- a/docs/articles/VariantAnimation-Australia.html
+++ b/docs/articles/VariantAnimation-Australia.html
@@ -106,7 +106,7 @@
Get variants data for Australia
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_Australia <- gisaid_metadata %>%
filter(Country == "Australia") %>%
filter(Host == "Human")
diff --git a/docs/articles/VariantAnimation-Australia_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-Australia_files/figure-html/unnamed-chunk-5-1.png
index e1d2344c..e41c666b 100644
Binary files a/docs/articles/VariantAnimation-Australia_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-Australia_files/figure-html/unnamed-chunk-5-1.png differ
diff --git a/docs/articles/VariantAnimation-Brazil.html b/docs/articles/VariantAnimation-Brazil.html
index 9dc9f418..e089f635 100644
--- a/docs/articles/VariantAnimation-Brazil.html
+++ b/docs/articles/VariantAnimation-Brazil.html
@@ -106,7 +106,7 @@
Get variants data for Brazil
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_brazil <- gisaid_metadata %>%
filter(Country == "Brazil") %>%
filter(Host == "Human")
diff --git a/docs/articles/VariantAnimation-Brazil_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-Brazil_files/figure-html/unnamed-chunk-5-1.png
index 51ecae9f..8ea617f2 100644
Binary files a/docs/articles/VariantAnimation-Brazil_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-Brazil_files/figure-html/unnamed-chunk-5-1.png differ
diff --git a/docs/articles/VariantAnimation-Germany.html b/docs/articles/VariantAnimation-Germany.html
index 89cf734e..fdafef63 100644
--- a/docs/articles/VariantAnimation-Germany.html
+++ b/docs/articles/VariantAnimation-Germany.html
@@ -106,7 +106,7 @@
Get variants data for Germany
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_germany <- gisaid_metadata %>%
filter(Country == "Germany") %>%
filter(Host == "Human")
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 d30e08b8..d292d58e 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 d1ac5d0a..997ec32e 100644
--- a/docs/articles/VariantAnimation-India.html
+++ b/docs/articles/VariantAnimation-India.html
@@ -106,7 +106,7 @@
Get variants data for India
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_india <- FilterGISAIDIndia(gisaid_metadata_all = gisaid_metadata)
vocs <- GetVOCs()
diff --git a/docs/articles/VariantAnimation-India_files/figure-html/unnamed-chunk-11-1.png b/docs/articles/VariantAnimation-India_files/figure-html/unnamed-chunk-11-1.png
index 59bf0998..1fa7f424 100644
Binary files a/docs/articles/VariantAnimation-India_files/figure-html/unnamed-chunk-11-1.png and b/docs/articles/VariantAnimation-India_files/figure-html/unnamed-chunk-11-1.png differ
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 5902afcf..884b1312 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 d2c4fbe5..8d232410 100644
--- a/docs/articles/VariantAnimation-NYC.html
+++ b/docs/articles/VariantAnimation-NYC.html
@@ -108,7 +108,7 @@ Get variants data for NY state
counties <- c("New York", "New York City", "New York County", "Queens County", "Bronx County", "Bronx", "Brooklyn", "Manhattan", "Queens", "Richmond County")
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_usa <- gisaid_metadata %>%
filter(Country == "USA") %>%
filter(Host == "Human")
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 001b66fb..45fd9d3e 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 a2fae838..99d09f75 100644
--- a/docs/articles/VariantAnimation-NewYork.html
+++ b/docs/articles/VariantAnimation-NewYork.html
@@ -106,7 +106,7 @@
Get variants data for NY state
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_usa <- gisaid_metadata %>%
filter(Country == "USA") %>%
filter(Host == "Human")
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 2dd9c8c9..022c1f4e 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 7ac085c5..362a5f01 100644
--- a/docs/articles/VariantAnimation-Singapore.html
+++ b/docs/articles/VariantAnimation-Singapore.html
@@ -106,7 +106,7 @@
Get variants data for Singapore
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_singapore <- gisaid_metadata %>%
filter(Country == "Singapore") %>%
filter(Host == "Human")
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 194f7b87..24f23586 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-Switzerland.html b/docs/articles/VariantAnimation-Switzerland.html
index 01900d0e..e02ef296 100644
--- a/docs/articles/VariantAnimation-Switzerland.html
+++ b/docs/articles/VariantAnimation-Switzerland.html
@@ -106,7 +106,7 @@
Get variants data for Switzerland
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_Switzerland <- gisaid_metadata %>%
filter(Country == "Switzerland") %>%
filter(Host == "Human")
diff --git a/docs/articles/VariantAnimation-Switzerland_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-Switzerland_files/figure-html/unnamed-chunk-5-1.png
index 49e2e4c3..36742352 100644
Binary files a/docs/articles/VariantAnimation-Switzerland_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-Switzerland_files/figure-html/unnamed-chunk-5-1.png differ
diff --git a/docs/articles/VariantAnimation-UK.html b/docs/articles/VariantAnimation-UK.html
index 89f75f2d..c746421f 100644
--- a/docs/articles/VariantAnimation-UK.html
+++ b/docs/articles/VariantAnimation-UK.html
@@ -106,7 +106,7 @@
Get variants data for United Kingdom
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_United_Kingdom <- gisaid_metadata %>%
filter(Country == "United Kingdom") %>%
filter(Host == "Human")
diff --git a/docs/articles/VariantAnimation-UK_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-UK_files/figure-html/unnamed-chunk-5-1.png
index 12a5fa1e..b68c4299 100644
Binary files a/docs/articles/VariantAnimation-UK_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-UK_files/figure-html/unnamed-chunk-5-1.png differ
diff --git a/docs/articles/VariantAnimation-USA.html b/docs/articles/VariantAnimation-USA.html
index 7b3263d9..8c0e7539 100644
--- a/docs/articles/VariantAnimation-USA.html
+++ b/docs/articles/VariantAnimation-USA.html
@@ -106,7 +106,7 @@
Get variants data for USA
-gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_22.qs")
+gisaid_metadata <- qs::qread("~/data/epicov/metadata_tsv_2024_01_25.qs")
gisaid_usa <- gisaid_metadata %>%
filter(Country == "USA") %>%
filter(Host == "Human")
diff --git a/docs/articles/VariantAnimation-USA_files/figure-html/unnamed-chunk-5-1.png b/docs/articles/VariantAnimation-USA_files/figure-html/unnamed-chunk-5-1.png
index abd2a748..1248323e 100644
Binary files a/docs/articles/VariantAnimation-USA_files/figure-html/unnamed-chunk-5-1.png and b/docs/articles/VariantAnimation-USA_files/figure-html/unnamed-chunk-5-1.png differ
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 78a6847b..65e5e060 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -1,4 +1,4 @@
-pandoc: 3.1.11.1
+pandoc: 3.1.3
pkgdown: 2.0.7
pkgdown_sha: ~
articles:
@@ -13,7 +13,7 @@ articles:
VariantAnimation-Switzerland: VariantAnimation-Switzerland.html
VariantAnimation-UK: VariantAnimation-UK.html
VariantAnimation-USA: VariantAnimation-USA.html
-last_built: 2024-01-27T15:53Z
+last_built: 2024-01-27T19:15Z
urls:
reference: http://saket-choudhary.me/covmuller/reference
article: http://saket-choudhary.me/covmuller/articles
diff --git a/docs/search.json b/docs/search.json
index 0bf57b25..0160387b 100644
--- a/docs/search.json
+++ b/docs/search.json
@@ -1 +1 @@
-[{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"get-cases-data","dir":"Articles","previous_headings":"","what":"Get cases data","title":"Introduction to covmuller","text":"use covid19bharat.org get tally daily confirmed cases summarize monthly level.","code":"indian_state_cases <- GetIndiaConfirmedCasesMonthlyLong() india_cases <- indian_state_cases %>% filter(State == \"India\") %>% filter(value > 1) head(india_cases) #> MonthYear State value type #> 1 Mar 2020 India 1635 Confirmed #> 2 Apr 2020 India 33232 Confirmed #> 3 May 2020 India 155781 Confirmed #> 4 Jun 2020 India 395044 Confirmed #> 5 Jul 2020 India 1111273 Confirmed #> 6 Aug 2020 India 1990350 Confirmed"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"plot-cases-for-india","dir":"Articles","previous_headings":"Get cases data","what":"Plot cases for India","title":"Introduction to covmuller","text":"easy visualize monthly case counts bar plot:","code":"p1 <- BarPlot(india_cases, ylabel = \"Cases per month\", label_si = TRUE, title = \"Total cases per month - India\", caption = \"**Source: covid19bharat.org**
\") p1"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"read-variant-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Read variant data from GISAID","title":"Introduction to covmuller","text":"utilize GISAID data look prevalence variants. access data, GISAID requires registration.","code":"current_date <- \"2024_01_22\" fpath.tar <- paste0(\"~/data/epicov/metadata_tsv_\", current_date, \".tar.xz\") fpath.qs <- paste0(\"~/data/epicov/metadata_tsv_\", current_date, \".qs\") if (file.exists(fpath.qs)) { gisaid_metadata <- qs::qread(file = fpath.qs) } else { gisaid_metadata <- ReadGISAIDMetada(path = fpath.tar) qs::qsave(gisaid_metadata, fpath.qs) }"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"plot-total-sequenced-cases","dir":"Articles","previous_headings":"Read variant data from GISAID","what":"Plot total sequenced cases","title":"Introduction to covmuller","text":"can look absolute number cases sequenced country filtering information metadata made available GISAID (includes countries). , visualize total sequenced cases coming India:","code":"gisaid_india <- FilterGISAIDIndia(gisaid_metadata_all = gisaid_metadata) country_seq_stats <- TotalSequencesPerMonthCountrywise(gisaid_india, rename_country_as_state = TRUE) p2 <- BarPlot(country_seq_stats, ylabel = \"Sequenced per month\", color = \"slateblue1\", label_si = TRUE, title = \"Total sequences deposited to GISAID from India\", caption = \"**Source: gisaid.org **
\") p2"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"overall-how-much-has-india-sequenced-over-months","dir":"Articles","previous_headings":"Read variant data from GISAID","what":"Overall, how much has India sequenced over months?","title":"Introduction to covmuller","text":"absolute numbers informative, useful metric proportion cases (cases sequenced total cases) getting sequenced. look proportion cases sequenced India course pandemic:","code":"# india_cases_long <- GetIndiaConfirmedCasesMonthlyLong() %>% filter(State == \"India\") GetIndiaCases <- function() { data <- read.csv(\"https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/cases_deaths/new_cases.csv\") confirmed <- data %>% select(date, India) colnames(confirmed)[2] <- c(\"cases\") confirmed$MonthYear <- GetMonthYear(confirmed$date) confirmed_subset_weekwise <- confirmed %>% group_by(MonthYear) %>% summarise(value = sum(cases, na.rm = T)) %>% arrange(MonthYear) } india_cases_long <- GetIndiaCases() india_cases_long$State <- \"India\" india_cases_long$type <- \"Confirmed\" india_sequencing_proportion <- CombineSequencedCases( cases_sequenced = country_seq_stats, confirmed_long = india_cases_long ) p3 <- BarPlot(india_sequencing_proportion, yaxis = \"percent_sequenced_collected\", ylabel = \"% deposited to GISAID\", color = \"yellowgreen\", title = \"Proportion of cases deposited to GISAID from India\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") p3"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"plot-proportion-of-cases-that-been-deposited-from-each-state","dir":"Articles","previous_headings":"Read variant data from GISAID","what":"Plot proportion of cases that been deposited from each state","title":"Introduction to covmuller","text":"can break proportion sequenced cases state level:","code":"state_seq_stats <- TotalSequencesPerMonthStatewise(gisaid_india, drop_country = TRUE) seq_stats <- rbind(country_seq_stats, state_seq_stats) state_cases_long <- GetIndiaConfirmedCasesMonthlyLong() india_sequencing_proportion <- CombineSequencedCases( cases_sequenced = seq_stats, confirmed_long = state_cases_long, month.min = \"Jan 2022\", month.max = \"Feb 2023\", max.percent = 5 ) india_sequencing_proportion$State <- factor( x = india_sequencing_proportion$State, levels = as.character(GetIndianStates()) ) p4 <- PlotSequencedPropHeatmap(india_sequencing_proportion) # p4"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"plot-prevalence","dir":"Articles","previous_headings":"","what":"Plot Prevalence","title":"Introduction to covmuller","text":"Finally, look prevalence variants variants concern (VOCs): animated version prevalence plot, check VariantAnimation.","code":"india_month_counts <- SummarizeVariantsMonthwise(gisaid_india) india_month_counts$State <- \"India\" india_month_prevalence <- CountsToPrevalence(india_month_counts) vocs <- GetVOCs() custom_voc_mapping <- list( `JN.1` = \"JN.1\", `JN.1.*` = \"JN.1\", `HV.1` = \"HV.1\", `HV.1.*` = \"HV.1\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) india_month_prevalence <- CollapseLineageToVOCs( variant_df = india_month_prevalence, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE ) p5 <- StackedBarPlotPrevalence(india_month_prevalence) p5"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Australia.html","id":"get-variants-data-for-australia","dir":"Articles","previous_headings":"","what":"Get variants data for Australia","title":"Animation of projected weekly cases - Australia","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_Australia <- gisaid_metadata %>% filter(Country == \"Australia\") %>% filter(Host == \"Human\") # format metadata gisaid_Australia <- FormatGISAIDMetadata(gisaid_Australia) gisaid_Australia <- gisaid_Australia %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_Australia <- gisaid_Australia %>% filter(pangolin_lineage != \"None\") gisaid_Australia <- CollapseLineageToVOCs( variant_df = gisaid_Australia, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Australia.html","id":"get-weekly-cases-for-australia","dir":"Articles","previous_headings":"","what":"Get weekly cases for Australia","title":"Animation of projected weekly cases - Australia","text":"","code":"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, Australia) 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, Australia) 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_Australia_weekwise <- SummarizeVariantsWeekwise(gisaid_Australia)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Australia.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Australia","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_Australia) state_month_counts$State <- \"Australia\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Australia.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Australia","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_Australia_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Australia_weekwise <- gisaid_Australia_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Australia_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Australia_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Australia_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Australia by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Australia_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_Australia_subset <- gisaid_Australia %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_Australia_weekwise <- SummarizeVariantsWeekwise(gisaid_Australia_subset) voc_to_keep <- gisaid_Australia_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Australia_weekwise <- gisaid_Australia_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Australia_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Australia_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Australia_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Australia by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Australia_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_Australia_subset <- gisaid_Australia %>% filter(MonthYearCollected > \"October 2022\") gisaid_Australia_weekwise <- SummarizeVariantsWeekwise(gisaid_Australia_subset) voc_to_keep <- gisaid_Australia_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Australia_weekwise <- gisaid_Australia_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Australia_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Australia_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Australia_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Australia by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Australia_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_Australia_subset <- gisaid_Australia %>% filter(MonthYearCollected > \"June 2023\") gisaid_Australia_weekwise <- SummarizeVariantsWeekwise(gisaid_Australia_subset) voc_to_keep <- gisaid_Australia_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Australia_weekwise <- gisaid_Australia_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Australia_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Australia_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Australia_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Australia by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Australia_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Brazil.html","id":"get-variants-data-for-brazil","dir":"Articles","previous_headings":"","what":"Get variants data for Brazil","title":"Animation of projected weekly cases - Brazil","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.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 )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Brazil.html","id":"get-weekly-cases-for-brazil","dir":"Articles","previous_headings":"","what":"Get weekly cases for Brazil","title":"Animation of projected weekly cases - Brazil","text":"","code":"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)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Brazil.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Brazil","text":"","code":"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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Brazil.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Brazil","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Brazil_animated.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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Brazil_animated_2021.gif\"), animation = the_anim) 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Brazil_animated_2023.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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Brazil_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Germany.html","id":"get-variants-data-for-germany","dir":"Articles","previous_headings":"","what":"Get variants data for Germany","title":"Animation of projected weekly cases - Germany","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_germany <- gisaid_metadata %>% filter(Country == \"Germany\") %>% filter(Host == \"Human\") # format metadata gisaid_germany <- FormatGISAIDMetadata(gisaid_germany) gisaid_germany <- gisaid_germany %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_germany <- gisaid_germany %>% filter(pangolin_lineage != \"None\") gisaid_germany <- CollapseLineageToVOCs( variant_df = gisaid_germany, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Germany.html","id":"get-weekly-cases-for-germany","dir":"Articles","previous_headings":"","what":"Get weekly cases for Germany","title":"Animation of projected weekly cases - Germany","text":"","code":"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, Germany) 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, Germany) 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_germany_weekwise <- SummarizeVariantsWeekwise(gisaid_germany)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Germany.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Germany","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_germany) state_month_counts$State <- \"Germany\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Germany.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Germany","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_germany_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Germany_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_germany_subset <- gisaid_germany %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_germany_weekwise <- SummarizeVariantsWeekwise(gisaid_germany_subset) voc_to_keep <- gisaid_germany_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Germany_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_germany_subset <- gisaid_germany %>% filter(MonthYearCollected > \"October 2022\") gisaid_germany_weekwise <- SummarizeVariantsWeekwise(gisaid_germany_subset) voc_to_keep <- gisaid_germany_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Germany_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_germany_subset <- gisaid_germany %>% filter(MonthYearCollected > \"June 2023\") gisaid_germany_weekwise <- SummarizeVariantsWeekwise(gisaid_germany_subset) voc_to_keep <- gisaid_germany_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Germany_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"get-variants-data-for-india","dir":"Articles","previous_headings":"","what":"Get variants data for India","title":"Animation of projected weekly cases - India","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_india <- FilterGISAIDIndia(gisaid_metadata_all = gisaid_metadata) vocs <- GetVOCs() custom_voc_mapping <- list( `JN.1` = \"JN.1\", `JN.1.*` = \"JN.1\", `HV.1` = \"HV.1\", `HV.1.*` = \"HV.1\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_india <- gisaid_india %>% filter(pangolin_lineage != \"None\") %>% filter(pangolin_lineage != \"Unassigned\") gisaid_india$District <- stringr::str_to_title(gisaid_india$District) gisaid_india$City <- stringr::str_to_title(gisaid_india$City) gisaid_india$custom_city <- gisaid_india$City gisaid_india$custom_city[gisaid_india$custom_city == \"\"] <- gisaid_india$District[gisaid_india$custom_city == \"\"] gisaid_india$custom_city <- stringr::str_to_title(gisaid_india$custom_city) gisaid_india <- CollapseLineageToVOCs( variant_df = gisaid_india, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE ) gisaid_india_all <- gisaid_india"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - India","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_india) state_month_counts$State <- \"India\" state_month_prevalence <- CountsToPrevalence(state_month_counts) 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"get-weekly-cases-for-india","dir":"Articles","previous_headings":"","what":"Get weekly cases for India","title":"Animation of projected weekly cases - India","text":"","code":"GetIndiaCases <- function() { data <- read.csv(\"https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/cases_deaths/new_cases.csv\") confirmed <- data %>% select(date, India) 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_subset_dateweekwise_long_india <- GetIndiaCases() gisaid_india_weekwise <- SummarizeVariantsWeekwise(gisaid_india)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - India","text":"Look cases January, 2022 : Look cases last months: Look cases last months:","code":"voc_to_keep <- gisaid_india_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() 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) 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 = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long_india <- GetIndiaCases() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_india <- gisaid_india %>% filter(MonthYearCollected > \"Dec 2021\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_india) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) 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**
\", date_breaks = \"90 days\") # , trans_y=\"log10\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long_india <- GetIndiaCases() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W12\")) gisaid_india <- gisaid_india %>% filter(MonthYearCollected >= \"Mar 2022\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_india) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) 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**
\", date_breaks = \"90 days\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated_2022.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long_india <- GetIndiaCases() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_india <- gisaid_india %>% filter(MonthYearCollected >= \"Dec 2022\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_india) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) 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**
\", date_breaks = \"30 days\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated_latest.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long_india <- GetIndiaCases() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_india <- gisaid_india %>% filter(MonthYearCollected >= \"June 2023\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_india) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) 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**
\", date_breaks = \"30 days\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated_2023.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"jn-1-variant","dir":"Articles","previous_headings":"Project weekly cases to variant prevalence data from GISAID","what":"JN.1 variant","title":"Animation of projected weekly cases - India","text":"many cases JN.1 variant deposited GISAID across states?","code":"jn.1 <- gisaid_india_all %>% filter(lineage_collapsed %in% c(\"JN.1\")) jn.1.grouped <- jn.1 %>% group_by(State) %>% tally() jn.1.grouped <- jn.1.grouped %>% filter(!State %in% c(\"Unknown\", \"Unassigned\")) %>% arrange(desc(n)) jn.1.grouped$State <- factor(jn.1.grouped$State, levels = jn.1.grouped$State) ggplot(jn.1.grouped, aes(State, n, label = n)) + # , color= \"#4682b4\" geom_col(position = \"identity\", fill = \"#4682b4\") + geom_bar_text(stat = \"identity\") + xlab(\"\") + ylab(\"Number of JN.1 samples deposited\") + scale_x_discrete(guide = guide_axis(angle = 90)) + labs( title = \"Number of JN.1 samples deposited to GISAID from India\", caption = paste0(\"**Source: gisaid.org**
\", Sys.Date()) )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NYC.html","id":"get-variants-data-for-ny-state","dir":"Articles","previous_headings":"","what":"Get variants data for NY state","title":"Animation of projected weekly cases - New York City","text":"","code":"counties <- c(\"New York\", \"New York City\", \"New York County\", \"Queens County\", \"Bronx County\", \"Bronx\", \"Brooklyn\", \"Manhattan\", \"Queens\", \"Richmond County\") gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_usa <- gisaid_metadata %>% filter(Country == \"USA\") %>% filter(Host == \"Human\") # format metadata gisaid_usa <- FormatGISAIDMetadata(gisaid_usa) gisaid_usa <- gisaid_usa %>% arrange(State, MonthYearCollected) %>% filter(pangolin_lineage != \"Unknown\") gisaid_NY <- gisaid_usa %>% filter(State == \"New York\") gisaid_NYC <- gisaid_NY %>% filter(District %in% counties) vocs <- GetVOCs() custom_voc_mapping <- list( `JN.1` = \"JN.1\", `JN.1.*` = \"JN.1\", `HV.1` = \"HV.1\", `HV.1.*` = \"HV.1\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_NYC <- gisaid_NYC %>% filter(pangolin_lineage != \"None\") gisaid_NYC <- CollapseLineageToVOCs( variant_df = gisaid_NYC, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NYC.html","id":"get-weekly-cases-for-new-york","dir":"Articles","previous_headings":"","what":"Get weekly cases for New York","title":"Animation of projected weekly cases - New York City","text":"","code":"confirmed <- read_csv(\"https://raw.githubusercontent.com/nychealth/coronavirus-data/master/trends/data-by-day.csv\") %>% select(date_of_interest, CASE_COUNT) colnames(confirmed) <- c(\"date\", \"daily_cases\") confirmed$WeekYear <- tsibble::yearweek(confirmed$date) confirmed$MonthYear <- GetMonthYear(confirmed$date, datefmt = \"%m/%d/%Y\") confirmed_subset_dateweekwise_long <- confirmed %>% group_by(WeekYear) %>% summarise(n = ceiling(mean(daily_cases, na.rm = T))) %>% arrange(WeekYear) %>% rename(WeekYearCollected = WeekYear) gisaid_NYC_weekwise <- SummarizeVariantsWeekwise(gisaid_NYC)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NYC.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - New York City","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_NYC) state_month_counts$State <- \"NYC\" state_month_prevalence <- CountsToPrevalence(state_month_counts) 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NYC.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - New York City","text":"Look cases 2023:","code":"voc_to_keep <- gisaid_NYC_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/NYC_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- confirmed %>% filter(MonthYear > \"April 2023\") %>% group_by(WeekYear) %>% summarise(n = ceiling(mean(daily_cases, na.rm = T))) %>% arrange(WeekYear) %>% rename(WeekYearCollected = WeekYear) gisaid_NYC_subset <- gisaid_NYC %>% filter(MonthYearCollected > \"April 2023\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_NYC_subset) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 1) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long) 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**
\", date_breaks = \"30 days\") ## `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)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NewYork.html","id":"get-variants-data-for-ny-state","dir":"Articles","previous_headings":"","what":"Get variants data for NY state","title":"Animation of projected weekly cases - New York State","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_usa <- gisaid_metadata %>% filter(Country == \"USA\") %>% filter(Host == \"Human\") # format metadata gisaid_usa <- FormatGISAIDMetadata(gisaid_usa) gisaid_usa <- gisaid_usa %>% arrange(State, MonthYearCollected) %>% filter(pangolin_lineage != \"Unknown\") gisaid_NY <- gisaid_usa %>% filter(State == \"New York\") vocs <- GetVOCs() custom_voc_mapping <- list( `JN.1` = \"JN.1\", `JN.1.*` = \"JN.1\", `HV.1` = \"HV.1\", `HV.1.*` = \"HV.1\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_NY <- gisaid_NY %>% filter(pangolin_lineage != \"None\") gisaid_NY <- CollapseLineageToVOCs( variant_df = gisaid_NY, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NewYork.html","id":"get-weekly-cases-for-new-york","dir":"Articles","previous_headings":"","what":"Get weekly cases for New York","title":"Animation of projected weekly cases - New York State","text":"","code":"confirmed <- covid19(country = \"USA\", level = 2) %>% filter(administrative_area_level_2 == \"New York\") %>% select(date, confirmed) %>% filter(!is.na(confirmed)) #> We have invested a lot of time and effort in creating COVID-19 Data #> Hub, please cite the following when using it: #> #> Guidotti, E., Ardia, D., (2020), \"COVID-19 Data Hub\", Journal of Open #> Source Software 5(51):2376, doi: 10.21105/joss.02376 #> #> The implementation details and the latest version of the data are #> described in: #> #> Guidotti, E., (2022), \"A worldwide epidemiological database for #> COVID-19 at fine-grained spatial resolution\", Sci Data 9(1):112, doi: #> 10.1038/s41597-022-01245-1 #> To print citations in BibTeX format use: #> > print(citation('COVID19'), bibtex=TRUE) #> #> To hide this message use 'verbose = FALSE'. confirmed$daily_cases <- c(confirmed$confirmed[1], diff(confirmed$confirmed)) confirmed$WeekYear <- tsibble::yearweek(confirmed$date) confirmed$MonthYear <- GetMonthYear(confirmed$date) confirmed_subset_dateweekwise_long <- confirmed %>% group_by(WeekYear) %>% summarise(n = ceiling(mean(daily_cases, na.rm = T))) %>% arrange(WeekYear) %>% rename(WeekYearCollected = WeekYear) gisaid_NY_weekwise <- SummarizeVariantsWeekwise(gisaid_NY)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NewYork.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - New York State","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_NY) state_month_counts$State <- \"New York\" state_month_prevalence <- CountsToPrevalence(state_month_counts) 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NewYork.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - New York State","text":"Look cases february, 2022 :","code":"voc_to_keep <- gisaid_NY_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"28 days\") gganimate::anim_save(filename = here::here(\"docs/articles/NY_animated.gif\"), animation = the_anim) confirmed$MonthYear <- GetMonthYear(confirmed$date) confirmed_subset_dateweekwise_long <- confirmed %>% filter(MonthYear > \"December 2022\") %>% group_by(WeekYear) %>% summarise(n = sum(daily_cases)) %>% arrange(WeekYear) %>% rename(WeekYearCollected = WeekYear) gisaid_NY <- gisaid_NY %>% filter(MonthYearCollected > \"December 2022\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_NY) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/NY_animated_2023.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Singapore.html","id":"get-variants-data-for-singapore","dir":"Articles","previous_headings":"","what":"Get variants data for Singapore","title":"Animation of projected weekly cases - Singapore","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_singapore <- gisaid_metadata %>% filter(Country == \"Singapore\") %>% filter(Host == \"Human\") # format metadata gisaid_singapore <- FormatGISAIDMetadata(gisaid_singapore) gisaid_singapore <- gisaid_singapore %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_singapore <- gisaid_singapore %>% filter(pangolin_lineage != \"None\") gisaid_singapore <- CollapseLineageToVOCs( variant_df = gisaid_singapore, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Singapore.html","id":"get-weekly-cases-for-singapore","dir":"Articles","previous_headings":"","what":"Get weekly cases for Singapore","title":"Animation of projected weekly cases - Singapore","text":"","code":"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, Singapore) 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, Singapore) 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_singapore_weekwise <- SummarizeVariantsWeekwise(gisaid_singapore)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Singapore.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Singapore","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_singapore) state_month_counts$State <- \"Singapore\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Singapore.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Singapore","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_singapore_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Singapore_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_singapore_subset <- gisaid_singapore %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_singapore_weekwise <- SummarizeVariantsWeekwise(gisaid_singapore_subset) voc_to_keep <- gisaid_singapore_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Singapore_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_singapore_subset <- gisaid_singapore %>% filter(MonthYearCollected > \"October 2022\") gisaid_singapore_weekwise <- SummarizeVariantsWeekwise(gisaid_singapore_subset) voc_to_keep <- gisaid_singapore_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Singapore_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_singapore_subset <- gisaid_singapore %>% filter(MonthYearCollected > \"June 2023\") gisaid_singapore_weekwise <- SummarizeVariantsWeekwise(gisaid_singapore_subset) voc_to_keep <- gisaid_singapore_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Singapore_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Switzerland.html","id":"get-variants-data-for-switzerland","dir":"Articles","previous_headings":"","what":"Get variants data for Switzerland","title":"Animation of projected weekly cases - Switzerland","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_Switzerland <- gisaid_metadata %>% filter(Country == \"Switzerland\") %>% filter(Host == \"Human\") # format metadata gisaid_Switzerland <- FormatGISAIDMetadata(gisaid_Switzerland) gisaid_Switzerland <- gisaid_Switzerland %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_Switzerland <- gisaid_Switzerland %>% filter(pangolin_lineage != \"None\") gisaid_Switzerland <- CollapseLineageToVOCs( variant_df = gisaid_Switzerland, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Switzerland.html","id":"get-weekly-cases-for-switzerland","dir":"Articles","previous_headings":"","what":"Get weekly cases for Switzerland","title":"Animation of projected weekly cases - Switzerland","text":"","code":"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, Switzerland) 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, Switzerland) 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_Switzerland_weekwise <- SummarizeVariantsWeekwise(gisaid_Switzerland)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Switzerland.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Switzerland","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_Switzerland) state_month_counts$State <- \"Switzerland\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Switzerland.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Switzerland","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_Switzerland_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Switzerland_weekwise <- gisaid_Switzerland_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Switzerland_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Switzerland_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Switzerland_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Switzerland by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Switzerland_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_Switzerland_subset <- gisaid_Switzerland %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_Switzerland_weekwise <- SummarizeVariantsWeekwise(gisaid_Switzerland_subset) voc_to_keep <- gisaid_Switzerland_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Switzerland_weekwise <- gisaid_Switzerland_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Switzerland_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Switzerland_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Switzerland_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Switzerland by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Switzerland_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_Switzerland_subset <- gisaid_Switzerland %>% filter(MonthYearCollected > \"October 2022\") gisaid_Switzerland_weekwise <- SummarizeVariantsWeekwise(gisaid_Switzerland_subset) voc_to_keep <- gisaid_Switzerland_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Switzerland_weekwise <- gisaid_Switzerland_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Switzerland_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Switzerland_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Switzerland_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Switzerland by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Switzerland_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_Switzerland_subset <- gisaid_Switzerland %>% filter(MonthYearCollected > \"June 2023\") gisaid_Switzerland_weekwise <- SummarizeVariantsWeekwise(gisaid_Switzerland_subset) voc_to_keep <- gisaid_Switzerland_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Switzerland_weekwise <- gisaid_Switzerland_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Switzerland_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Switzerland_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Switzerland_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Switzerland by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Switzerland_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-UK.html","id":"get-variants-data-for-united-kingdom","dir":"Articles","previous_headings":"","what":"Get variants data for United Kingdom","title":"Animation of projected weekly cases - United Kingdom","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_United_Kingdom <- gisaid_metadata %>% filter(Country == \"United Kingdom\") %>% filter(Host == \"Human\") # format metadata gisaid_United_Kingdom <- FormatGISAIDMetadata(gisaid_United_Kingdom) gisaid_United_Kingdom <- gisaid_United_Kingdom %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_United_Kingdom <- gisaid_United_Kingdom %>% filter(pangolin_lineage != \"None\") gisaid_United_Kingdom <- CollapseLineageToVOCs( variant_df = gisaid_United_Kingdom, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-UK.html","id":"get-weekly-cases-for-united-kingdom","dir":"Articles","previous_headings":"","what":"Get weekly cases for United Kingdom","title":"Animation of projected weekly cases - United Kingdom","text":"","code":"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, United.Kingdom) 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, United.Kingdom) colnames(confirmed)[2] <- c(\"cases\") confirmed$cases[is.na(confirmed$cases)] <- 0 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_United_Kingdom_weekwise <- SummarizeVariantsWeekwise(gisaid_United_Kingdom)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-UK.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - United Kingdom","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_United_Kingdom) state_month_counts$State <- \"United Kingdom\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-UK.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - United Kingdom","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_United_Kingdom_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_United_Kingdom_weekwise <- gisaid_United_Kingdom_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) United_Kingdom_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_United_Kingdom_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(United_Kingdom_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in United Kingdom by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/United_Kingdom_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_United_Kingdom_subset <- gisaid_United_Kingdom %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_United_Kingdom_weekwise <- SummarizeVariantsWeekwise(gisaid_United_Kingdom_subset) voc_to_keep <- gisaid_United_Kingdom_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_United_Kingdom_weekwise <- gisaid_United_Kingdom_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) United_Kingdom_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_United_Kingdom_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(United_Kingdom_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in United Kingdom by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"90 days\") gganimate::anim_save(filename = here::here(\"docs/articles/United_Kingdom_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_United_Kingdom_subset <- gisaid_United_Kingdom %>% filter(MonthYearCollected > \"October 2022\") gisaid_United_Kingdom_weekwise <- SummarizeVariantsWeekwise(gisaid_United_Kingdom_subset) voc_to_keep <- gisaid_United_Kingdom_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_United_Kingdom_weekwise <- gisaid_United_Kingdom_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) United_Kingdom_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_United_Kingdom_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(United_Kingdom_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in United Kingdom by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"90 days\") gganimate::anim_save(filename = here::here(\"docs/articles/United_Kingdom_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_United_Kingdom_subset <- gisaid_United_Kingdom %>% filter(MonthYearCollected > \"June 2023\") gisaid_United_Kingdom_weekwise <- SummarizeVariantsWeekwise(gisaid_United_Kingdom_subset) voc_to_keep <- gisaid_United_Kingdom_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_United_Kingdom_weekwise <- gisaid_United_Kingdom_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) United_Kingdom_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_United_Kingdom_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(United_Kingdom_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in United Kingdom by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/United_Kingdom_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-USA.html","id":"get-variants-data-for-usa","dir":"Articles","previous_headings":"","what":"Get variants data for USA","title":"Animation of projected weekly cases - USA","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_22.qs\") gisaid_usa <- gisaid_metadata %>% filter(Country == \"USA\") %>% filter(Host == \"Human\") # format metadata gisaid_usa <- FormatGISAIDMetadata(gisaid_usa) gisaid_usa <- gisaid_usa %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_usa <- gisaid_usa %>% filter(pangolin_lineage != \"None\") gisaid_usa <- CollapseLineageToVOCs( variant_df = gisaid_usa, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-USA.html","id":"get-weekly-cases-for-usa","dir":"Articles","previous_headings":"","what":"Get weekly cases for USA","title":"Animation of projected weekly cases - USA","text":"","code":"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, United.States) 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, United.States) 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_usa_weekwise <- SummarizeVariantsWeekwise(gisaid_usa)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-USA.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - USA","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_usa) state_month_counts$State <- \"USA\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-USA.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - USA","text":"Look cases 2022, Look cases 2023","code":"voc_to_keep <- gisaid_usa_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_usa_weekwise <- gisaid_usa_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) usa_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_usa_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(usa_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in USA by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/USA_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_usa_subset <- gisaid_usa %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_usa_weekwise <- SummarizeVariantsWeekwise(gisaid_usa_subset) voc_to_keep <- gisaid_usa_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_usa_weekwise <- gisaid_usa_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) usa_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_usa_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(usa_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in USA by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/USA_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_usa_subset <- gisaid_usa %>% filter(MonthYearCollected > \"October 2022\") gisaid_usa_weekwise <- SummarizeVariantsWeekwise(gisaid_usa_subset) voc_to_keep <- gisaid_usa_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_usa_weekwise <- gisaid_usa_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) usa_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_usa_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(usa_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in USA by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"90 days\") gganimate::anim_save(filename = here::here(\"docs/articles/USA_animated_2023.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Saket Choudhary. Maintainer.","code":""},{"path":"http://saket-choudhary.me/covmuller/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Choudhary S (2024). covmuller: tool model COVID19 variant prevalence using data GISAID. R package version 0.1.2.0007, https://saketkc.github.io/covmuller.","code":"@Manual{, title = {covmuller: A tool to model COVID19 variant prevalence using data from GISAID}, author = {Saket Choudhary}, year = {2024}, note = {R package version 0.1.2.0007}, url = {https://saketkc.github.io/covmuller}, }"},{"path":"http://saket-choudhary.me/covmuller/index.html","id":"covmuller","dir":"","previous_headings":"","what":"A tool to model COVID19 variant prevalence using data from GISAID","title":"A tool to model COVID19 variant prevalence using data from GISAID","text":"Covmuller R-package designed analysis sequencing metadata deposited GISAID.","code":""},{"path":"http://saket-choudhary.me/covmuller/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"A tool to model COVID19 variant prevalence using data from GISAID","text":"Covmuller currently supports following features: Read preprocess metadata file downloaded GISAID: Vignette Plot variant prevalence: Vignette India USA Canada UK Australia SouthAfrica India New York state South Africa United Kingdom USA New York City (USA) Delhi (India) Mumbai (India) Maharashtra (India) Pune (India)","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanAmericanStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean states from the USA — CleanAmericanStates","title":"Clean states from the USA — CleanAmericanStates","text":"Clean states USA","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanAmericanStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean states from the USA — CleanAmericanStates","text":"","code":"CleanAmericanStates(states)"},{"path":"http://saket-choudhary.me/covmuller/reference/CleanAmericanStates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean states from the USA — CleanAmericanStates","text":"state vector state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanAmericanStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean states from the USA — CleanAmericanStates","text":"vector cleaned state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanCanadaStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean states from Canada — CleanCanadaStates","title":"Clean states from Canada — CleanCanadaStates","text":"Clean states Canada","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanCanadaStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean states from Canada — CleanCanadaStates","text":"","code":"CleanCanadaStates(states)"},{"path":"http://saket-choudhary.me/covmuller/reference/CleanCanadaStates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean states from Canada — CleanCanadaStates","text":"state vector state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanCanadaStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean states from Canada — CleanCanadaStates","text":"vector cleaned state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanIndianStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Indian States — CleanIndianStates","title":"Clean Indian States — CleanIndianStates","text":"Clean Indian States","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanIndianStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Indian States — CleanIndianStates","text":"","code":"CleanIndianStates(states)"},{"path":"http://saket-choudhary.me/covmuller/reference/CleanIndianStates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Indian States — CleanIndianStates","text":"state vector state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanIndianStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Indian States — CleanIndianStates","text":"vector cleaned state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanSouthAfricanStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean states from South Africa — CleanSouthAfricanStates","title":"Clean states from South Africa — CleanSouthAfricanStates","text":"Clean states South Africa","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanSouthAfricanStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean states from South Africa — CleanSouthAfricanStates","text":"","code":"CleanSouthAfricanStates(states)"},{"path":"http://saket-choudhary.me/covmuller/reference/CleanSouthAfricanStates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean states from South Africa — CleanSouthAfricanStates","text":"state vector state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanSouthAfricanStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean states from South Africa — CleanSouthAfricanStates","text":"vector cleaned state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CollapseLineageToVOCs.html","id":null,"dir":"Reference","previous_headings":"","what":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","title":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","text":"Collpase pangolin lineage list VOCs","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CollapseLineageToVOCs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","text":"","code":"CollapseLineageToVOCs( variant_df, vocs = GetVOCs(), custom_voc_mapping = NULL, summarize = TRUE )"},{"path":"http://saket-choudhary.me/covmuller/reference/CollapseLineageToVOCs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","text":"variant_df dataframe \"pangolin_lineage\" column vocs named list VOC (variant concernt) name key list lineages VOC. method replace lineages VOC name. custom_voc_mapping named vector custom mapping naming lineages. See example.","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CollapseLineageToVOCs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","text":"dataframe new column \"lineage_collpased\".","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CombineSequencedCases.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","title":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","text":"Create combined dataframe sequenced cases confirmed cases","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CombineSequencedCases.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","text":"","code":"CombineSequencedCases( cases_sequenced, confirmed_long, prune_oversequenced = TRUE, month.min = NULL, month.max = NULL, max.percent = 100 )"},{"path":"http://saket-choudhary.me/covmuller/reference/CombineSequencedCases.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","text":"cases_sequenced long dataframe per state sequenced cases prune_oversequenced Whether round percentages 100 100. Default TRUE cases_total long dataframe total monthly cases","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CombineSequencedCases.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","text":"combined dataframe case load sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CountsToPrevalence.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert monthwise counts to prevalence — CountsToPrevalence","title":"Convert monthwise counts to prevalence — CountsToPrevalence","text":"Convert monthwise counts prevalence","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CountsToPrevalence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert monthwise counts to prevalence — CountsToPrevalence","text":"","code":"CountsToPrevalence(variant_df)"},{"path":"http://saket-choudhary.me/covmuller/reference/CountsToPrevalence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert monthwise counts to prevalence — CountsToPrevalence","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CountsToPrevalence.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert monthwise counts to prevalence — CountsToPrevalence","text":"dataframe monthwise prevalence variants","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CovmullerTheme.html","id":null,"dir":"Reference","previous_headings":"","what":"Set them — CovmullerTheme","title":"Set them — CovmullerTheme","text":"Set ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CovmullerTheme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set them — CovmullerTheme","text":"","code":"CovmullerTheme()"},{"path":"http://saket-choudhary.me/covmuller/reference/FilterGISAIDIndia.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter GISAID India Metadata for India — FilterGISAIDIndia","title":"Filter GISAID India Metadata for India — FilterGISAIDIndia","text":"Filter GISAID India Metadata India","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FilterGISAIDIndia.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter GISAID India Metadata for India — FilterGISAIDIndia","text":"","code":"FilterGISAIDIndia(gisaid_metadata_all)"},{"path":"http://saket-choudhary.me/covmuller/reference/FilterGISAIDIndia.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter GISAID India Metadata for India — FilterGISAIDIndia","text":"gisaid_metadata_all dataframe GISAID metadata","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FilterGISAIDIndia.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter GISAID India Metadata for India — FilterGISAIDIndia","text":"dataframe Indian entries Human date known","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FixDate.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix date format — FixDate","title":"Fix date format — FixDate","text":"Fix date format","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FixDate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix date format — FixDate","text":"","code":"FixDate(datecol, datefmt = \"%Y-%m-%d\")"},{"path":"http://saket-choudhary.me/covmuller/reference/FormatGISAIDMetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","title":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","text":"Format metadata.tar.x file downloaded GISAID missing columns","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FormatGISAIDMetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","text":"","code":"FormatGISAIDMetadata( df, collection_col = \"Collection date\", submission_col = \"Submission date\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/FormatGISAIDMetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","text":"df GISAID metadata dataframe collection_col Name column representing date collection (Collection date) submission_col Name column representing date submission (Submission date)","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FormatGISAIDMetadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","text":"data frame following extra columns: DateCollected, MonthYearCollected, YearCollected, MonthCollected, WeekCollected DateCollectedNumeric, MonthYearCollectedNumeric DateSubmitted, MonthYearSubmitted, YearSubmitted, MonthSubmitted, WeekSubmitted DateSubmittedNumeric, MonthYearSubmittedNumeric","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GeocodeAddress.html","id":null,"dir":"Reference","previous_headings":"","what":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","title":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","text":"Geocode given address get latitude, longitude Gooogle","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GeocodeAddress.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","text":"","code":"GeocodeAddress(address, api.key = NULL, restrict.to = NULL)"},{"path":"http://saket-choudhary.me/covmuller/reference/GeocodeAddress.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","text":"address String address geocode api.key API key Google Maps restrict.Country name search restricted , Currently supports 'India'","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GeocodeAddress.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","text":"dataframe geocoded address","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetFiletype.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine filetype — GetFiletype","title":"Determine filetype — GetFiletype","text":"Determine filetype","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetFiletype.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine filetype — GetFiletype","text":"","code":"GetFiletype(path)"},{"path":"http://saket-choudhary.me/covmuller/reference/GetFiletype.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine filetype — GetFiletype","text":"path Path file","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetFiletype.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine filetype — GetFiletype","text":"Extension file","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesCumulative.html","id":null,"dir":"Reference","previous_headings":"","what":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","title":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","text":"Get daily confirmed cases India","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesCumulative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","text":"","code":"GetIndiaConfirmedCasesCumulative( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesCumulative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesCumulative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","text":"data frame containing daily cases state","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesMonthlyLong.html","id":null,"dir":"Reference","previous_headings":"","what":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","title":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","text":"Get India monthwose cases long","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesMonthlyLong.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","text":"","code":"GetIndiaConfirmedCasesMonthlyLong( url = \"http://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\", level = \"State\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesMonthlyLong.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesMonthlyLong.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","text":"data frame containing monthly cases state long form","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesWeeklyLong.html","id":null,"dir":"Reference","previous_headings":"","what":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","title":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","text":"Get India weekwise cases long","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesWeeklyLong.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","text":"","code":"GetIndiaConfirmedCasesWeeklyLong( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\", level = \"State\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesWeeklyLong.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesWeeklyLong.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","text":"data frame containing monthly cases state long form","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyCasesCumulative.html","id":null,"dir":"Reference","previous_headings":"","what":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","title":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","text":"Get daily cases India given status type","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyCasesCumulative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","text":"","code":"GetIndiaDailyCasesCumulative( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\", status = \"Confirmed\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyCasesCumulative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","text":"url URL fetch data status One \"Confirmed\", \"Recovered\", \"Deceased\"","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyCasesCumulative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","text":"data frame containing daily cases state","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyData.html","id":null,"dir":"Reference","previous_headings":"","what":"Get daily statewise data for India — GetIndiaDailyData","title":"Get daily statewise data for India — GetIndiaDailyData","text":"'Status' column one 'Confirmed', 'Deceased' 'Recovered'","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get daily statewise data for India — GetIndiaDailyData","text":"","code":"GetIndiaDailyData( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get daily statewise data for India — GetIndiaDailyData","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get daily statewise data for India — GetIndiaDailyData","text":"data frame containing daily cases state","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDeceasedCasesCumulative.html","id":null,"dir":"Reference","previous_headings":"","what":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","title":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","text":"Get daily deceased cases India","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDeceasedCasesCumulative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","text":"","code":"GetIndiaDeceasedCasesCumulative( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDeceasedCasesCumulative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDeceasedCasesCumulative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","text":"data frame containing daily cases state","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaHospitalization.html","id":null,"dir":"Reference","previous_headings":"","what":"Get hospitalization data for India — GetIndiaHospitalization","title":"Get hospitalization data for India — GetIndiaHospitalization","text":"Get hospitalization data India","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaHospitalization.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get hospitalization data for India — GetIndiaHospitalization","text":"","code":"GetIndiaHospitalization(url = \"\")"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndianStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a list of Indian name states — GetIndianStates","title":"Get a list of Indian name states — GetIndianStates","text":"Get list Indian name states","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndianStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a list of Indian name states — GetIndianStates","text":"","code":"GetIndianStates()"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndianStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a list of Indian name states — GetIndianStates","text":"list state abbreviation key full name value","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetMonthYear.html","id":null,"dir":"Reference","previous_headings":"","what":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","title":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","text":"Get MonthYear (zoo) dataframe string formatted data column","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetMonthYear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","text":"","code":"GetMonthYear(datecol, datefmt = \"%Y-%m-%d\")"},{"path":"http://saket-choudhary.me/covmuller/reference/GetMonthYear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","text":"datecol vector string formatted dates datefmt Format date (default Y-m-d)","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetMonthYear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","text":"vector dates converted MonthYear format (zoo::.yearmon)","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetVOCs.html","id":null,"dir":"Reference","previous_headings":"","what":"Get variants of concern — GetVOCs","title":"Get variants of concern — GetVOCs","text":"Get variants concern","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetVOCs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get variants of concern — GetVOCs","text":"","code":"GetVOCs()"},{"path":"http://saket-choudhary.me/covmuller/reference/GetVOCs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get variants of concern — GetVOCs","text":"list variants concern pangolin lineage","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotSequencedPropHeatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","title":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","text":"Plot heatmap cases sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotSequencedPropHeatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","text":"","code":"PlotSequencedPropHeatmap(df)"},{"path":"http://saket-choudhary.me/covmuller/reference/PlotSequencedPropHeatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","text":"cases_and_shared dataframe containing counts confirmed cases sequenced cases","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotSequencedPropHeatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","text":"heatmap total percentage cases sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotTotalHeatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","title":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","text":"Plot heatmap total cases/sequences","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotTotalHeatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","text":"","code":"PlotTotalHeatmap(df, color_legend = \"Total cases\")"},{"path":"http://saket-choudhary.me/covmuller/reference/PlotTotalHeatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","text":"cases_and_shared dataframe containing counts confirmed cases sequenced cases (column named 'value')","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotTotalHeatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","text":"heatmap total cases/sequences","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceInstrument.html","id":null,"dir":"Reference","previous_headings":"","what":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","title":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","text":"Read instrument metadata GISAID batch downloads","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceInstrument.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","text":"","code":"ReadAuspiceInstrument(path)"},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceInstrument.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","text":"path Path list directories \"sequence.tsv\" inside subdirector","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceInstrument.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","text":"dataframe instrument related metadata","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceMetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","title":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","text":"Read metadata GISAID batch downloads","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceMetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","text":"","code":"ReadAuspiceMetadata(path)"},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceMetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","text":"path Path list directories \"sequence.tsv\" inside subdirector","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceMetadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","text":"dataframe collated metadata","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadGISAIDMetada.html","id":null,"dir":"Reference","previous_headings":"","what":"Read metadata downloaded from GISAID — ReadGISAIDMetada","title":"Read metadata downloaded from GISAID — ReadGISAIDMetada","text":"Read metadata downloaded GISAID","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadGISAIDMetada.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read metadata downloaded from GISAID — ReadGISAIDMetada","text":"","code":"ReadGISAIDMetada(path, showProgress = FALSE, ...)"},{"path":"http://saket-choudhary.me/covmuller/reference/ReadGISAIDMetada.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read metadata downloaded from GISAID — ReadGISAIDMetada","text":"path Path tar.xz metadata.txt downloaded GISAID showProgress Whether print progress bars fread ... parameters data.table::fread","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadGISAIDMetada.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read metadata downloaded from GISAID — ReadGISAIDMetada","text":"data frame parsed metadata extra columns","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SanitizeColumn.html","id":null,"dir":"Reference","previous_headings":"","what":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","title":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","text":"function removes: 1. Commas space 2. Hyphen space 3. Multiple dots single space 4. Multiple spacies single space 5. NA \"UNKNOWN\"","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SanitizeColumn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","text":"","code":"SanitizeColumn(col)"},{"path":"http://saket-choudhary.me/covmuller/reference/SanitizeColumn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","text":"col String vector","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SanitizeColumn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","text":"string vector sanitized entries","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsDatewise.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize the total number of variants per week — SummarizeVariantsDatewise","title":"Summarize the total number of variants per week — SummarizeVariantsDatewise","text":"Summarize total number variants per week","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsDatewise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize the total number of variants per week — SummarizeVariantsDatewise","text":"","code":"SummarizeVariantsDatewise(variant_df, by_state = FALSE)"},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsDatewise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize the total number of variants per week — SummarizeVariantsDatewise","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsDatewise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize the total number of variants per week — SummarizeVariantsDatewise","text":"dataframe monthwise counts variant sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsMonthwise.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","title":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","text":"Summarize total number variants per month","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsMonthwise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","text":"","code":"SummarizeVariantsMonthwise(variant_df, by_state = FALSE)"},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsMonthwise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsMonthwise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","text":"dataframe monthwise counts variant sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsWeekwise.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","title":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","text":"Summarize total number variants per week","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsWeekwise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","text":"","code":"SummarizeVariantsWeekwise(variant_df, by_state = FALSE)"},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsWeekwise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsWeekwise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","text":"dataframe monthwise counts variant sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthCountrywise.html","id":null,"dir":"Reference","previous_headings":"","what":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","title":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","text":"Get total sequenced samples per country","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthCountrywise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","text":"","code":"TotalSequencesPerMonthCountrywise(variant_df, rename_country_as_state = TRUE)"},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthCountrywise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthCountrywise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","text":"dataframe sequencing statistics per country","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthStatewise.html","id":null,"dir":"Reference","previous_headings":"","what":"Get total number of sequenced samples per month in a Country — TotalSequencesPerMonthStatewise","title":"Get total number of sequenced samples per month in a Country — TotalSequencesPerMonthStatewise","text":"Get total number sequenced samples per month Country","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthStatewise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get total number of sequenced samples per month in a Country — TotalSequencesPerMonthStatewise","text":"","code":"TotalSequencesPerMonthStatewise(variant_df, drop_country = FALSE)"},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthStatewise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get total number of sequenced samples per month in a Country — TotalSequencesPerMonthStatewise","text":"dataframe sequencing statistics per state per country","code":""}]
+[{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"get-cases-data","dir":"Articles","previous_headings":"","what":"Get cases data","title":"Introduction to covmuller","text":"use covid19bharat.org get tally daily confirmed cases summarize monthly level.","code":"indian_state_cases <- GetIndiaConfirmedCasesMonthlyLong() india_cases <- indian_state_cases %>% filter(State == \"India\") %>% filter(value > 1) head(india_cases) #> MonthYear State value type #> 1 Mar 2020 India 1635 Confirmed #> 2 Apr 2020 India 33232 Confirmed #> 3 May 2020 India 155781 Confirmed #> 4 Jun 2020 India 395044 Confirmed #> 5 Jul 2020 India 1111273 Confirmed #> 6 Aug 2020 India 1990350 Confirmed"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"plot-cases-for-india","dir":"Articles","previous_headings":"Get cases data","what":"Plot cases for India","title":"Introduction to covmuller","text":"easy visualize monthly case counts bar plot:","code":"p1 <- BarPlot(india_cases, ylabel = \"Cases per month\", label_si = TRUE, title = \"Total cases per month - India\", caption = \"**Source: covid19bharat.org**
\") p1"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"read-variant-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Read variant data from GISAID","title":"Introduction to covmuller","text":"utilize GISAID data look prevalence variants. access data, GISAID requires registration.","code":"current_date <- \"2024_01_25\" fpath.tar <- paste0(\"~/data/epicov/metadata_tsv_\", current_date, \".tar.xz\") fpath.qs <- paste0(\"~/data/epicov/metadata_tsv_\", current_date, \".qs\") if (file.exists(fpath.qs)) { gisaid_metadata <- qs::qread(file = fpath.qs) } else { gisaid_metadata <- ReadGISAIDMetada(path = fpath.tar) qs::qsave(gisaid_metadata, fpath.qs) }"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"plot-total-sequenced-cases","dir":"Articles","previous_headings":"Read variant data from GISAID","what":"Plot total sequenced cases","title":"Introduction to covmuller","text":"can look absolute number cases sequenced country filtering information metadata made available GISAID (includes countries). , visualize total sequenced cases coming India:","code":"gisaid_india <- FilterGISAIDIndia(gisaid_metadata_all = gisaid_metadata) country_seq_stats <- TotalSequencesPerMonthCountrywise(gisaid_india, rename_country_as_state = TRUE) p2 <- BarPlot(country_seq_stats, ylabel = \"Sequenced per month\", color = \"slateblue1\", label_si = TRUE, title = \"Total sequences deposited to GISAID from India\", caption = \"**Source: gisaid.org **
\") p2"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"overall-how-much-has-india-sequenced-over-months","dir":"Articles","previous_headings":"Read variant data from GISAID","what":"Overall, how much has India sequenced over months?","title":"Introduction to covmuller","text":"absolute numbers informative, useful metric proportion cases (cases sequenced total cases) getting sequenced. look proportion cases sequenced India course pandemic:","code":"# india_cases_long <- GetIndiaConfirmedCasesMonthlyLong() %>% filter(State == \"India\") GetIndiaCases <- function() { data <- read.csv(\"https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/cases_deaths/new_cases.csv\") confirmed <- data %>% select(date, India) colnames(confirmed)[2] <- c(\"cases\") confirmed$MonthYear <- GetMonthYear(confirmed$date) confirmed_subset_weekwise <- confirmed %>% group_by(MonthYear) %>% summarise(value = sum(cases, na.rm = T)) %>% arrange(MonthYear) } india_cases_long <- GetIndiaCases() india_cases_long$State <- \"India\" india_cases_long$type <- \"Confirmed\" india_sequencing_proportion <- CombineSequencedCases( cases_sequenced = country_seq_stats, confirmed_long = india_cases_long ) p3 <- BarPlot(india_sequencing_proportion, yaxis = \"percent_sequenced_collected\", ylabel = \"% deposited to GISAID\", color = \"yellowgreen\", title = \"Proportion of cases deposited to GISAID from India\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") p3"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"plot-proportion-of-cases-that-been-deposited-from-each-state","dir":"Articles","previous_headings":"Read variant data from GISAID","what":"Plot proportion of cases that been deposited from each state","title":"Introduction to covmuller","text":"can break proportion sequenced cases state level:","code":"state_seq_stats <- TotalSequencesPerMonthStatewise(gisaid_india, drop_country = TRUE) seq_stats <- rbind(country_seq_stats, state_seq_stats) state_cases_long <- GetIndiaConfirmedCasesMonthlyLong() india_sequencing_proportion <- CombineSequencedCases( cases_sequenced = seq_stats, confirmed_long = state_cases_long, month.min = \"Jan 2022\", month.max = \"Feb 2023\", max.percent = 5 ) india_sequencing_proportion$State <- factor( x = india_sequencing_proportion$State, levels = as.character(GetIndianStates()) ) p4 <- PlotSequencedPropHeatmap(india_sequencing_proportion) # p4"},{"path":"http://saket-choudhary.me/covmuller/articles/Introduction.html","id":"plot-prevalence","dir":"Articles","previous_headings":"","what":"Plot Prevalence","title":"Introduction to covmuller","text":"Finally, look prevalence variants variants concern (VOCs): animated version prevalence plot, check VariantAnimation.","code":"india_month_counts <- SummarizeVariantsMonthwise(gisaid_india) india_month_counts$State <- \"India\" india_month_prevalence <- CountsToPrevalence(india_month_counts) vocs <- GetVOCs() custom_voc_mapping <- list( `JN.1` = \"JN.1\", `JN.1.*` = \"JN.1\", `HV.1` = \"HV.1\", `HV.1.*` = \"HV.1\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) india_month_prevalence <- CollapseLineageToVOCs( variant_df = india_month_prevalence, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE ) p5 <- StackedBarPlotPrevalence(india_month_prevalence) p5"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Australia.html","id":"get-variants-data-for-australia","dir":"Articles","previous_headings":"","what":"Get variants data for Australia","title":"Animation of projected weekly cases - Australia","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_Australia <- gisaid_metadata %>% filter(Country == \"Australia\") %>% filter(Host == \"Human\") # format metadata gisaid_Australia <- FormatGISAIDMetadata(gisaid_Australia) gisaid_Australia <- gisaid_Australia %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_Australia <- gisaid_Australia %>% filter(pangolin_lineage != \"None\") gisaid_Australia <- CollapseLineageToVOCs( variant_df = gisaid_Australia, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Australia.html","id":"get-weekly-cases-for-australia","dir":"Articles","previous_headings":"","what":"Get weekly cases for Australia","title":"Animation of projected weekly cases - Australia","text":"","code":"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, Australia) 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, Australia) 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_Australia_weekwise <- SummarizeVariantsWeekwise(gisaid_Australia)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Australia.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Australia","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_Australia) state_month_counts$State <- \"Australia\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Australia.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Australia","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_Australia_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Australia_weekwise <- gisaid_Australia_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Australia_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Australia_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Australia_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Australia by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Australia_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_Australia_subset <- gisaid_Australia %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_Australia_weekwise <- SummarizeVariantsWeekwise(gisaid_Australia_subset) voc_to_keep <- gisaid_Australia_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Australia_weekwise <- gisaid_Australia_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Australia_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Australia_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Australia_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Australia by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Australia_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_Australia_subset <- gisaid_Australia %>% filter(MonthYearCollected > \"October 2022\") gisaid_Australia_weekwise <- SummarizeVariantsWeekwise(gisaid_Australia_subset) voc_to_keep <- gisaid_Australia_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Australia_weekwise <- gisaid_Australia_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Australia_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Australia_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Australia_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Australia by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Australia_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_Australia_subset <- gisaid_Australia %>% filter(MonthYearCollected > \"June 2023\") gisaid_Australia_weekwise <- SummarizeVariantsWeekwise(gisaid_Australia_subset) voc_to_keep <- gisaid_Australia_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Australia_weekwise <- gisaid_Australia_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Australia_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Australia_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Australia_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Australia by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Australia_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Brazil.html","id":"get-variants-data-for-brazil","dir":"Articles","previous_headings":"","what":"Get variants data for Brazil","title":"Animation of projected weekly cases - Brazil","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.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 )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Brazil.html","id":"get-weekly-cases-for-brazil","dir":"Articles","previous_headings":"","what":"Get weekly cases for Brazil","title":"Animation of projected weekly cases - Brazil","text":"","code":"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)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Brazil.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Brazil","text":"","code":"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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Brazil.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Brazil","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Brazil_animated.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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Brazil_animated_2021.gif\"), animation = the_anim) 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Brazil_animated_2023.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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Brazil_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Germany.html","id":"get-variants-data-for-germany","dir":"Articles","previous_headings":"","what":"Get variants data for Germany","title":"Animation of projected weekly cases - Germany","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_germany <- gisaid_metadata %>% filter(Country == \"Germany\") %>% filter(Host == \"Human\") # format metadata gisaid_germany <- FormatGISAIDMetadata(gisaid_germany) gisaid_germany <- gisaid_germany %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_germany <- gisaid_germany %>% filter(pangolin_lineage != \"None\") gisaid_germany <- CollapseLineageToVOCs( variant_df = gisaid_germany, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Germany.html","id":"get-weekly-cases-for-germany","dir":"Articles","previous_headings":"","what":"Get weekly cases for Germany","title":"Animation of projected weekly cases - Germany","text":"","code":"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, Germany) 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, Germany) 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_germany_weekwise <- SummarizeVariantsWeekwise(gisaid_germany)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Germany.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Germany","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_germany) state_month_counts$State <- \"Germany\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Germany.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Germany","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_germany_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Germany_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_germany_subset <- gisaid_germany %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_germany_weekwise <- SummarizeVariantsWeekwise(gisaid_germany_subset) voc_to_keep <- gisaid_germany_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Germany_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_germany_subset <- gisaid_germany %>% filter(MonthYearCollected > \"October 2022\") gisaid_germany_weekwise <- SummarizeVariantsWeekwise(gisaid_germany_subset) voc_to_keep <- gisaid_germany_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Germany_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_germany_subset <- gisaid_germany %>% filter(MonthYearCollected > \"June 2023\") gisaid_germany_weekwise <- SummarizeVariantsWeekwise(gisaid_germany_subset) voc_to_keep <- gisaid_germany_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Germany_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"get-variants-data-for-india","dir":"Articles","previous_headings":"","what":"Get variants data for India","title":"Animation of projected weekly cases - India","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_india <- FilterGISAIDIndia(gisaid_metadata_all = gisaid_metadata) vocs <- GetVOCs() custom_voc_mapping <- list( `JN.1` = \"JN.1\", `JN.1.*` = \"JN.1\", `HV.1` = \"HV.1\", `HV.1.*` = \"HV.1\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_india <- gisaid_india %>% filter(pangolin_lineage != \"None\") %>% filter(pangolin_lineage != \"Unassigned\") gisaid_india$District <- stringr::str_to_title(gisaid_india$District) gisaid_india$City <- stringr::str_to_title(gisaid_india$City) gisaid_india$custom_city <- gisaid_india$City gisaid_india$custom_city[gisaid_india$custom_city == \"\"] <- gisaid_india$District[gisaid_india$custom_city == \"\"] gisaid_india$custom_city <- stringr::str_to_title(gisaid_india$custom_city) gisaid_india <- CollapseLineageToVOCs( variant_df = gisaid_india, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE ) gisaid_india_all <- gisaid_india"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - India","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_india) state_month_counts$State <- \"India\" state_month_prevalence <- CountsToPrevalence(state_month_counts) 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"get-weekly-cases-for-india","dir":"Articles","previous_headings":"","what":"Get weekly cases for India","title":"Animation of projected weekly cases - India","text":"","code":"GetIndiaCases <- function() { data <- read.csv(\"https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/cases_deaths/new_cases.csv\") confirmed <- data %>% select(date, India) 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_subset_dateweekwise_long_india <- GetIndiaCases() gisaid_india_weekwise <- SummarizeVariantsWeekwise(gisaid_india)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - India","text":"Look cases January, 2022 : Look cases last months: Look cases last months:","code":"voc_to_keep <- gisaid_india_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() 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) 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 = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long_india <- GetIndiaCases() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_india <- gisaid_india %>% filter(MonthYearCollected > \"Dec 2021\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_india) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) 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**
\", date_breaks = \"90 days\") # , trans_y=\"log10\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long_india <- GetIndiaCases() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W12\")) gisaid_india <- gisaid_india %>% filter(MonthYearCollected >= \"Mar 2022\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_india) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) 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**
\", date_breaks = \"90 days\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated_2022.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long_india <- GetIndiaCases() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_india <- gisaid_india %>% filter(MonthYearCollected >= \"Dec 2022\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_india) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) 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**
\", date_breaks = \"30 days\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated_latest.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long_india <- GetIndiaCases() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_india <- gisaid_india %>% filter(MonthYearCollected >= \"June 2023\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_india) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 10) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long_india) 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**
\", date_breaks = \"30 days\") gganimate::anim_save(filename = here::here(\"docs/articles/IN_animated_2023.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-India.html","id":"jn-1-variant","dir":"Articles","previous_headings":"Project weekly cases to variant prevalence data from GISAID","what":"JN.1 variant","title":"Animation of projected weekly cases - India","text":"many cases JN.1 variant deposited GISAID across states?","code":"jn.1 <- gisaid_india_all %>% filter(lineage_collapsed %in% c(\"JN.1\")) jn.1.grouped <- jn.1 %>% group_by(State) %>% tally() jn.1.grouped <- jn.1.grouped %>% filter(!State %in% c(\"Unknown\", \"Unassigned\")) %>% arrange(desc(n)) jn.1.grouped$State <- factor(jn.1.grouped$State, levels = jn.1.grouped$State) ggplot(jn.1.grouped, aes(State, n, label = n)) + # , color= \"#4682b4\" geom_col(position = \"identity\", fill = \"#4682b4\") + geom_bar_text(stat = \"identity\") + xlab(\"\") + ylab(\"Number of JN.1 samples deposited\") + scale_x_discrete(guide = guide_axis(angle = 90)) + labs( title = \"Number of JN.1 samples deposited to GISAID from India\", caption = paste0(\"**Source: gisaid.org**
\", Sys.Date()) )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NYC.html","id":"get-variants-data-for-ny-state","dir":"Articles","previous_headings":"","what":"Get variants data for NY state","title":"Animation of projected weekly cases - New York City","text":"","code":"counties <- c(\"New York\", \"New York City\", \"New York County\", \"Queens County\", \"Bronx County\", \"Bronx\", \"Brooklyn\", \"Manhattan\", \"Queens\", \"Richmond County\") gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_usa <- gisaid_metadata %>% filter(Country == \"USA\") %>% filter(Host == \"Human\") # format metadata gisaid_usa <- FormatGISAIDMetadata(gisaid_usa) gisaid_usa <- gisaid_usa %>% arrange(State, MonthYearCollected) %>% filter(pangolin_lineage != \"Unknown\") gisaid_NY <- gisaid_usa %>% filter(State == \"New York\") gisaid_NYC <- gisaid_NY %>% filter(District %in% counties) vocs <- GetVOCs() custom_voc_mapping <- list( `JN.1` = \"JN.1\", `JN.1.*` = \"JN.1\", `HV.1` = \"HV.1\", `HV.1.*` = \"HV.1\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_NYC <- gisaid_NYC %>% filter(pangolin_lineage != \"None\") gisaid_NYC <- CollapseLineageToVOCs( variant_df = gisaid_NYC, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NYC.html","id":"get-weekly-cases-for-new-york","dir":"Articles","previous_headings":"","what":"Get weekly cases for New York","title":"Animation of projected weekly cases - New York City","text":"","code":"confirmed <- read_csv(\"https://raw.githubusercontent.com/nychealth/coronavirus-data/master/trends/data-by-day.csv\") %>% select(date_of_interest, CASE_COUNT) colnames(confirmed) <- c(\"date\", \"daily_cases\") confirmed$WeekYear <- tsibble::yearweek(confirmed$date) confirmed$MonthYear <- GetMonthYear(confirmed$date, datefmt = \"%m/%d/%Y\") confirmed_subset_dateweekwise_long <- confirmed %>% group_by(WeekYear) %>% summarise(n = ceiling(mean(daily_cases, na.rm = T))) %>% arrange(WeekYear) %>% rename(WeekYearCollected = WeekYear) gisaid_NYC_weekwise <- SummarizeVariantsWeekwise(gisaid_NYC)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NYC.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - New York City","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_NYC) state_month_counts$State <- \"NYC\" state_month_prevalence <- CountsToPrevalence(state_month_counts) 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NYC.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - New York City","text":"Look cases 2023:","code":"voc_to_keep <- gisaid_NYC_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/NYC_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- confirmed %>% filter(MonthYear > \"April 2023\") %>% group_by(WeekYear) %>% summarise(n = ceiling(mean(daily_cases, na.rm = T))) %>% arrange(WeekYear) %>% rename(WeekYearCollected = WeekYear) gisaid_NYC_subset <- gisaid_NYC %>% filter(MonthYearCollected > \"April 2023\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_NYC_subset) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 1) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long) 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**
\", date_breaks = \"30 days\") ## `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)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NewYork.html","id":"get-variants-data-for-ny-state","dir":"Articles","previous_headings":"","what":"Get variants data for NY state","title":"Animation of projected weekly cases - New York State","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_usa <- gisaid_metadata %>% filter(Country == \"USA\") %>% filter(Host == \"Human\") # format metadata gisaid_usa <- FormatGISAIDMetadata(gisaid_usa) gisaid_usa <- gisaid_usa %>% arrange(State, MonthYearCollected) %>% filter(pangolin_lineage != \"Unknown\") gisaid_NY <- gisaid_usa %>% filter(State == \"New York\") vocs <- GetVOCs() custom_voc_mapping <- list( `JN.1` = \"JN.1\", `JN.1.*` = \"JN.1\", `HV.1` = \"HV.1\", `HV.1.*` = \"HV.1\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_NY <- gisaid_NY %>% filter(pangolin_lineage != \"None\") gisaid_NY <- CollapseLineageToVOCs( variant_df = gisaid_NY, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NewYork.html","id":"get-weekly-cases-for-new-york","dir":"Articles","previous_headings":"","what":"Get weekly cases for New York","title":"Animation of projected weekly cases - New York State","text":"","code":"confirmed <- covid19(country = \"USA\", level = 2) %>% filter(administrative_area_level_2 == \"New York\") %>% select(date, confirmed) %>% filter(!is.na(confirmed)) #> We have invested a lot of time and effort in creating COVID-19 Data #> Hub, please cite the following when using it: #> #> Guidotti, E., Ardia, D., (2020), \"COVID-19 Data Hub\", Journal of Open #> Source Software 5(51):2376, doi: 10.21105/joss.02376 #> #> The implementation details and the latest version of the data are #> described in: #> #> Guidotti, E., (2022), \"A worldwide epidemiological database for #> COVID-19 at fine-grained spatial resolution\", Sci Data 9(1):112, doi: #> 10.1038/s41597-022-01245-1 #> To print citations in BibTeX format use: #> > print(citation('COVID19'), bibtex=TRUE) #> #> To hide this message use 'verbose = FALSE'. confirmed$daily_cases <- c(confirmed$confirmed[1], diff(confirmed$confirmed)) confirmed$WeekYear <- tsibble::yearweek(confirmed$date) confirmed$MonthYear <- GetMonthYear(confirmed$date) confirmed_subset_dateweekwise_long <- confirmed %>% group_by(WeekYear) %>% summarise(n = ceiling(mean(daily_cases, na.rm = T))) %>% arrange(WeekYear) %>% rename(WeekYearCollected = WeekYear) gisaid_NY_weekwise <- SummarizeVariantsWeekwise(gisaid_NY)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NewYork.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - New York State","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_NY) state_month_counts$State <- \"New York\" state_month_prevalence <- CountsToPrevalence(state_month_counts) 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-NewYork.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - New York State","text":"Look cases february, 2022 :","code":"voc_to_keep <- gisaid_NY_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"28 days\") gganimate::anim_save(filename = here::here(\"docs/articles/NY_animated.gif\"), animation = the_anim) confirmed$MonthYear <- GetMonthYear(confirmed$date) confirmed_subset_dateweekwise_long <- confirmed %>% filter(MonthYear > \"December 2022\") %>% group_by(WeekYear) %>% summarise(n = sum(daily_cases)) %>% arrange(WeekYear) %>% rename(WeekYearCollected = WeekYear) gisaid_NY <- gisaid_NY %>% filter(MonthYearCollected > \"December 2022\") gisaid_weekwise <- SummarizeVariantsWeekwise(gisaid_NY) voc_to_keep <- gisaid_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_weekwise <- gisaid_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_weekwise, confirmed_subset_dateweekwise_long) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/NY_animated_2023.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Singapore.html","id":"get-variants-data-for-singapore","dir":"Articles","previous_headings":"","what":"Get variants data for Singapore","title":"Animation of projected weekly cases - Singapore","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_singapore <- gisaid_metadata %>% filter(Country == \"Singapore\") %>% filter(Host == \"Human\") # format metadata gisaid_singapore <- FormatGISAIDMetadata(gisaid_singapore) gisaid_singapore <- gisaid_singapore %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_singapore <- gisaid_singapore %>% filter(pangolin_lineage != \"None\") gisaid_singapore <- CollapseLineageToVOCs( variant_df = gisaid_singapore, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Singapore.html","id":"get-weekly-cases-for-singapore","dir":"Articles","previous_headings":"","what":"Get weekly cases for Singapore","title":"Animation of projected weekly cases - Singapore","text":"","code":"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, Singapore) 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, Singapore) 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_singapore_weekwise <- SummarizeVariantsWeekwise(gisaid_singapore)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Singapore.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Singapore","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_singapore) state_month_counts$State <- \"Singapore\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Singapore.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Singapore","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_singapore_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Singapore_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_singapore_subset <- gisaid_singapore %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_singapore_weekwise <- SummarizeVariantsWeekwise(gisaid_singapore_subset) voc_to_keep <- gisaid_singapore_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Singapore_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_singapore_subset <- gisaid_singapore %>% filter(MonthYearCollected > \"October 2022\") gisaid_singapore_weekwise <- SummarizeVariantsWeekwise(gisaid_singapore_subset) voc_to_keep <- gisaid_singapore_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Singapore_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_singapore_subset <- gisaid_singapore %>% filter(MonthYearCollected > \"June 2023\") gisaid_singapore_weekwise <- SummarizeVariantsWeekwise(gisaid_singapore_subset) voc_to_keep <- gisaid_singapore_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() 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) 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**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Singapore_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Switzerland.html","id":"get-variants-data-for-switzerland","dir":"Articles","previous_headings":"","what":"Get variants data for Switzerland","title":"Animation of projected weekly cases - Switzerland","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_Switzerland <- gisaid_metadata %>% filter(Country == \"Switzerland\") %>% filter(Host == \"Human\") # format metadata gisaid_Switzerland <- FormatGISAIDMetadata(gisaid_Switzerland) gisaid_Switzerland <- gisaid_Switzerland %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_Switzerland <- gisaid_Switzerland %>% filter(pangolin_lineage != \"None\") gisaid_Switzerland <- CollapseLineageToVOCs( variant_df = gisaid_Switzerland, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Switzerland.html","id":"get-weekly-cases-for-switzerland","dir":"Articles","previous_headings":"","what":"Get weekly cases for Switzerland","title":"Animation of projected weekly cases - Switzerland","text":"","code":"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, Switzerland) 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, Switzerland) 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_Switzerland_weekwise <- SummarizeVariantsWeekwise(gisaid_Switzerland)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Switzerland.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - Switzerland","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_Switzerland) state_month_counts$State <- \"Switzerland\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-Switzerland.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - Switzerland","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_Switzerland_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Switzerland_weekwise <- gisaid_Switzerland_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Switzerland_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Switzerland_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Switzerland_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Switzerland by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Switzerland_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_Switzerland_subset <- gisaid_Switzerland %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_Switzerland_weekwise <- SummarizeVariantsWeekwise(gisaid_Switzerland_subset) voc_to_keep <- gisaid_Switzerland_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Switzerland_weekwise <- gisaid_Switzerland_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Switzerland_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Switzerland_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Switzerland_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Switzerland by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"100 days\") gganimate::anim_save(filename = here::here(\"docs/articles/Switzerland_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_Switzerland_subset <- gisaid_Switzerland %>% filter(MonthYearCollected > \"October 2022\") gisaid_Switzerland_weekwise <- SummarizeVariantsWeekwise(gisaid_Switzerland_subset) voc_to_keep <- gisaid_Switzerland_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Switzerland_weekwise <- gisaid_Switzerland_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Switzerland_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Switzerland_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Switzerland_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Switzerland by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Switzerland_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_Switzerland_subset <- gisaid_Switzerland %>% filter(MonthYearCollected > \"June 2023\") gisaid_Switzerland_weekwise <- SummarizeVariantsWeekwise(gisaid_Switzerland_subset) voc_to_keep <- gisaid_Switzerland_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_Switzerland_weekwise <- gisaid_Switzerland_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) Switzerland_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_Switzerland_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(Switzerland_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in Switzerland by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/Switzerland_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-UK.html","id":"get-variants-data-for-united-kingdom","dir":"Articles","previous_headings":"","what":"Get variants data for United Kingdom","title":"Animation of projected weekly cases - United Kingdom","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_United_Kingdom <- gisaid_metadata %>% filter(Country == \"United Kingdom\") %>% filter(Host == \"Human\") # format metadata gisaid_United_Kingdom <- FormatGISAIDMetadata(gisaid_United_Kingdom) gisaid_United_Kingdom <- gisaid_United_Kingdom %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_United_Kingdom <- gisaid_United_Kingdom %>% filter(pangolin_lineage != \"None\") gisaid_United_Kingdom <- CollapseLineageToVOCs( variant_df = gisaid_United_Kingdom, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-UK.html","id":"get-weekly-cases-for-united-kingdom","dir":"Articles","previous_headings":"","what":"Get weekly cases for United Kingdom","title":"Animation of projected weekly cases - United Kingdom","text":"","code":"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, United.Kingdom) 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, United.Kingdom) colnames(confirmed)[2] <- c(\"cases\") confirmed$cases[is.na(confirmed$cases)] <- 0 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_United_Kingdom_weekwise <- SummarizeVariantsWeekwise(gisaid_United_Kingdom)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-UK.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - United Kingdom","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_United_Kingdom) state_month_counts$State <- \"United Kingdom\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-UK.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - United Kingdom","text":"Look cases 2022, Look cases 2023 Look cases past weeks","code":"voc_to_keep <- gisaid_United_Kingdom_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_United_Kingdom_weekwise <- gisaid_United_Kingdom_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) United_Kingdom_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_United_Kingdom_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(United_Kingdom_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in United Kingdom by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/United_Kingdom_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_United_Kingdom_subset <- gisaid_United_Kingdom %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_United_Kingdom_weekwise <- SummarizeVariantsWeekwise(gisaid_United_Kingdom_subset) voc_to_keep <- gisaid_United_Kingdom_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_United_Kingdom_weekwise <- gisaid_United_Kingdom_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) United_Kingdom_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_United_Kingdom_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(United_Kingdom_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in United Kingdom by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"90 days\") gganimate::anim_save(filename = here::here(\"docs/articles/United_Kingdom_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_United_Kingdom_subset <- gisaid_United_Kingdom %>% filter(MonthYearCollected > \"October 2022\") gisaid_United_Kingdom_weekwise <- SummarizeVariantsWeekwise(gisaid_United_Kingdom_subset) voc_to_keep <- gisaid_United_Kingdom_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_United_Kingdom_weekwise <- gisaid_United_Kingdom_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) United_Kingdom_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_United_Kingdom_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(United_Kingdom_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in United Kingdom by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"90 days\") gganimate::anim_save(filename = here::here(\"docs/articles/United_Kingdom_animated_2023.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2023 W23\")) gisaid_United_Kingdom_subset <- gisaid_United_Kingdom %>% filter(MonthYearCollected > \"June 2023\") gisaid_United_Kingdom_weekwise <- SummarizeVariantsWeekwise(gisaid_United_Kingdom_subset) voc_to_keep <- gisaid_United_Kingdom_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_United_Kingdom_weekwise <- gisaid_United_Kingdom_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) United_Kingdom_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_United_Kingdom_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(United_Kingdom_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in United Kingdom by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\") gganimate::anim_save(filename = here::here(\"docs/articles/United_Kingdom_animated_2024.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-USA.html","id":"get-variants-data-for-usa","dir":"Articles","previous_headings":"","what":"Get variants data for USA","title":"Animation of projected weekly cases - USA","text":"","code":"gisaid_metadata <- qs::qread(\"~/data/epicov/metadata_tsv_2024_01_25.qs\") gisaid_usa <- gisaid_metadata %>% filter(Country == \"USA\") %>% filter(Host == \"Human\") # format metadata gisaid_usa <- FormatGISAIDMetadata(gisaid_usa) gisaid_usa <- gisaid_usa %>% 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\", `B.1` = \"B.1\", `B.1.1.306` = \"B.1\", `B.1.1.306.*` = \"B.1\", `B.1.1.326` = \"B.1\", `B.1.36.29` = \"B.1\", `B.1.560` = \"B.1\", `B.1.1` = \"B.1\", `B.1.210` = \"B.1\", `B.1.36.8` = \"B.1\", `B.1.36` = \"B.1\", `B.1.36.*` = \"B.1\" ) gisaid_usa <- gisaid_usa %>% filter(pangolin_lineage != \"None\") gisaid_usa <- CollapseLineageToVOCs( variant_df = gisaid_usa, vocs = vocs, custom_voc_mapping = custom_voc_mapping, summarize = FALSE )"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-USA.html","id":"get-weekly-cases-for-usa","dir":"Articles","previous_headings":"","what":"Get weekly cases for USA","title":"Animation of projected weekly cases - USA","text":"","code":"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, United.States) 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, United.States) 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_usa_weekwise <- SummarizeVariantsWeekwise(gisaid_usa)"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-USA.html","id":"distribution-of-variants","dir":"Articles","previous_headings":"","what":"Distribution of variants","title":"Animation of projected weekly cases - USA","text":"","code":"state_month_counts <- SummarizeVariantsMonthwise(gisaid_usa) state_month_counts$State <- \"USA\" 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"},{"path":"http://saket-choudhary.me/covmuller/articles/VariantAnimation-USA.html","id":"project-weekly-cases-to-variant-prevalence-data-from-gisaid","dir":"Articles","previous_headings":"","what":"Project weekly cases to variant prevalence data from GISAID","title":"Animation of projected weekly cases - USA","text":"Look cases 2022, Look cases 2023","code":"voc_to_keep <- gisaid_usa_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_usa_weekwise <- gisaid_usa_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) usa_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_usa_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(usa_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in USA by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/USA_animated.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2021 W35\")) gisaid_usa_subset <- gisaid_usa %>% filter(MonthYearCollected > \"Oct 2021\") gisaid_usa_weekwise <- SummarizeVariantsWeekwise(gisaid_usa_subset) voc_to_keep <- gisaid_usa_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_usa_weekwise <- gisaid_usa_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) usa_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_usa_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(usa_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in USA by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"120 days\") gganimate::anim_save(filename = here::here(\"docs/articles/USA_animated_2021.gif\"), animation = the_anim) confirmed_subset_dateweekwise_long <- GetCasesLong() %>% filter(WeekYearCollected >= tsibble::yearweek(\"2022 W35\")) gisaid_usa_subset <- gisaid_usa %>% filter(MonthYearCollected > \"October 2022\") gisaid_usa_weekwise <- SummarizeVariantsWeekwise(gisaid_usa_subset) voc_to_keep <- gisaid_usa_weekwise %>% group_by(lineage_collapsed) %>% summarise(n_sum = sum(n)) %>% filter(n_sum > 50) %>% pull(lineage_collapsed) %>% unique() gisaid_usa_weekwise <- gisaid_usa_weekwise %>% filter(lineage_collapsed %in% voc_to_keep) usa_cases_pred_prob_sel_long <- FitMultinomWeekly(gisaid_usa_weekwise, confirmed_subset_dateweekwise_long) the_anim <- PlotVariantPrevalenceAnimated(usa_cases_pred_prob_sel_long, title = \"Estimated cases (weekly average) in USA by variant\", caption = \"**Source: gisaid.org and ourworldindata.org/coronavirus**
\", date_breaks = \"90 days\") gganimate::anim_save(filename = here::here(\"docs/articles/USA_animated_2023.gif\"), animation = the_anim)"},{"path":"http://saket-choudhary.me/covmuller/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Saket Choudhary. Maintainer.","code":""},{"path":"http://saket-choudhary.me/covmuller/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Choudhary S (2024). covmuller: tool model COVID19 variant prevalence using data GISAID. R package version 0.1.2.0007, https://saketkc.github.io/covmuller.","code":"@Manual{, title = {covmuller: A tool to model COVID19 variant prevalence using data from GISAID}, author = {Saket Choudhary}, year = {2024}, note = {R package version 0.1.2.0007}, url = {https://saketkc.github.io/covmuller}, }"},{"path":"http://saket-choudhary.me/covmuller/index.html","id":"covmuller","dir":"","previous_headings":"","what":"A tool to model COVID19 variant prevalence using data from GISAID","title":"A tool to model COVID19 variant prevalence using data from GISAID","text":"Covmuller R-package designed analysis sequencing metadata deposited GISAID.","code":""},{"path":"http://saket-choudhary.me/covmuller/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"A tool to model COVID19 variant prevalence using data from GISAID","text":"Covmuller currently supports following features: Read preprocess metadata file downloaded GISAID: Vignette Plot variant prevalence: Vignette India USA Canada UK Australia SouthAfrica India New York state South Africa United Kingdom USA New York City (USA) Delhi (India) Mumbai (India) Maharashtra (India) Pune (India)","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanAmericanStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean states from the USA — CleanAmericanStates","title":"Clean states from the USA — CleanAmericanStates","text":"Clean states USA","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanAmericanStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean states from the USA — CleanAmericanStates","text":"","code":"CleanAmericanStates(states)"},{"path":"http://saket-choudhary.me/covmuller/reference/CleanAmericanStates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean states from the USA — CleanAmericanStates","text":"state vector state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanAmericanStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean states from the USA — CleanAmericanStates","text":"vector cleaned state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanCanadaStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean states from Canada — CleanCanadaStates","title":"Clean states from Canada — CleanCanadaStates","text":"Clean states Canada","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanCanadaStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean states from Canada — CleanCanadaStates","text":"","code":"CleanCanadaStates(states)"},{"path":"http://saket-choudhary.me/covmuller/reference/CleanCanadaStates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean states from Canada — CleanCanadaStates","text":"state vector state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanCanadaStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean states from Canada — CleanCanadaStates","text":"vector cleaned state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanIndianStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean Indian States — CleanIndianStates","title":"Clean Indian States — CleanIndianStates","text":"Clean Indian States","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanIndianStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean Indian States — CleanIndianStates","text":"","code":"CleanIndianStates(states)"},{"path":"http://saket-choudhary.me/covmuller/reference/CleanIndianStates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean Indian States — CleanIndianStates","text":"state vector state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanIndianStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean Indian States — CleanIndianStates","text":"vector cleaned state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanSouthAfricanStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Clean states from South Africa — CleanSouthAfricanStates","title":"Clean states from South Africa — CleanSouthAfricanStates","text":"Clean states South Africa","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanSouthAfricanStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Clean states from South Africa — CleanSouthAfricanStates","text":"","code":"CleanSouthAfricanStates(states)"},{"path":"http://saket-choudhary.me/covmuller/reference/CleanSouthAfricanStates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Clean states from South Africa — CleanSouthAfricanStates","text":"state vector state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CleanSouthAfricanStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Clean states from South Africa — CleanSouthAfricanStates","text":"vector cleaned state names","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CollapseLineageToVOCs.html","id":null,"dir":"Reference","previous_headings":"","what":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","title":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","text":"Collpase pangolin lineage list VOCs","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CollapseLineageToVOCs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","text":"","code":"CollapseLineageToVOCs( variant_df, vocs = GetVOCs(), custom_voc_mapping = NULL, summarize = TRUE )"},{"path":"http://saket-choudhary.me/covmuller/reference/CollapseLineageToVOCs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","text":"variant_df dataframe \"pangolin_lineage\" column vocs named list VOC (variant concernt) name key list lineages VOC. method replace lineages VOC name. custom_voc_mapping named vector custom mapping naming lineages. See example.","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CollapseLineageToVOCs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collpase pangolin lineage a list of VOCs — CollapseLineageToVOCs","text":"dataframe new column \"lineage_collpased\".","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CombineSequencedCases.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","title":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","text":"Create combined dataframe sequenced cases confirmed cases","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CombineSequencedCases.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","text":"","code":"CombineSequencedCases( cases_sequenced, confirmed_long, prune_oversequenced = TRUE, month.min = NULL, month.max = NULL, max.percent = 100 )"},{"path":"http://saket-choudhary.me/covmuller/reference/CombineSequencedCases.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","text":"cases_sequenced long dataframe per state sequenced cases prune_oversequenced Whether round percentages 100 100. Default TRUE cases_total long dataframe total monthly cases","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CombineSequencedCases.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a combined dataframe of sequenced cases and confirmed cases — CombineSequencedCases","text":"combined dataframe case load sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CountsToPrevalence.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert monthwise counts to prevalence — CountsToPrevalence","title":"Convert monthwise counts to prevalence — CountsToPrevalence","text":"Convert monthwise counts prevalence","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CountsToPrevalence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert monthwise counts to prevalence — CountsToPrevalence","text":"","code":"CountsToPrevalence(variant_df)"},{"path":"http://saket-choudhary.me/covmuller/reference/CountsToPrevalence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert monthwise counts to prevalence — CountsToPrevalence","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CountsToPrevalence.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert monthwise counts to prevalence — CountsToPrevalence","text":"dataframe monthwise prevalence variants","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CovmullerTheme.html","id":null,"dir":"Reference","previous_headings":"","what":"Set them — CovmullerTheme","title":"Set them — CovmullerTheme","text":"Set ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/CovmullerTheme.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set them — CovmullerTheme","text":"","code":"CovmullerTheme()"},{"path":"http://saket-choudhary.me/covmuller/reference/FilterGISAIDIndia.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter GISAID India Metadata for India — FilterGISAIDIndia","title":"Filter GISAID India Metadata for India — FilterGISAIDIndia","text":"Filter GISAID India Metadata India","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FilterGISAIDIndia.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter GISAID India Metadata for India — FilterGISAIDIndia","text":"","code":"FilterGISAIDIndia(gisaid_metadata_all)"},{"path":"http://saket-choudhary.me/covmuller/reference/FilterGISAIDIndia.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter GISAID India Metadata for India — FilterGISAIDIndia","text":"gisaid_metadata_all dataframe GISAID metadata","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FilterGISAIDIndia.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter GISAID India Metadata for India — FilterGISAIDIndia","text":"dataframe Indian entries Human date known","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FixDate.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix date format — FixDate","title":"Fix date format — FixDate","text":"Fix date format","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FixDate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix date format — FixDate","text":"","code":"FixDate(datecol, datefmt = \"%Y-%m-%d\")"},{"path":"http://saket-choudhary.me/covmuller/reference/FormatGISAIDMetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","title":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","text":"Format metadata.tar.x file downloaded GISAID missing columns","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FormatGISAIDMetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","text":"","code":"FormatGISAIDMetadata( df, collection_col = \"Collection date\", submission_col = \"Submission date\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/FormatGISAIDMetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","text":"df GISAID metadata dataframe collection_col Name column representing date collection (Collection date) submission_col Name column representing date submission (Submission date)","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/FormatGISAIDMetadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Format metadata.tar.x file downloaded from GISAID with some missing columns — FormatGISAIDMetadata","text":"data frame following extra columns: DateCollected, MonthYearCollected, YearCollected, MonthCollected, WeekCollected DateCollectedNumeric, MonthYearCollectedNumeric DateSubmitted, MonthYearSubmitted, YearSubmitted, MonthSubmitted, WeekSubmitted DateSubmittedNumeric, MonthYearSubmittedNumeric","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GeocodeAddress.html","id":null,"dir":"Reference","previous_headings":"","what":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","title":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","text":"Geocode given address get latitude, longitude Gooogle","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GeocodeAddress.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","text":"","code":"GeocodeAddress(address, api.key = NULL, restrict.to = NULL)"},{"path":"http://saket-choudhary.me/covmuller/reference/GeocodeAddress.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","text":"address String address geocode api.key API key Google Maps restrict.Country name search restricted , Currently supports 'India'","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GeocodeAddress.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Geocode a given address to get its latitude, longitude from Gooogle — GeocodeAddress","text":"dataframe geocoded address","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetFiletype.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine filetype — GetFiletype","title":"Determine filetype — GetFiletype","text":"Determine filetype","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetFiletype.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine filetype — GetFiletype","text":"","code":"GetFiletype(path)"},{"path":"http://saket-choudhary.me/covmuller/reference/GetFiletype.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine filetype — GetFiletype","text":"path Path file","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetFiletype.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Determine filetype — GetFiletype","text":"Extension file","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesCumulative.html","id":null,"dir":"Reference","previous_headings":"","what":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","title":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","text":"Get daily confirmed cases India","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesCumulative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","text":"","code":"GetIndiaConfirmedCasesCumulative( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesCumulative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesCumulative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get daily confirmed cases for India — GetIndiaConfirmedCasesCumulative","text":"data frame containing daily cases state","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesMonthlyLong.html","id":null,"dir":"Reference","previous_headings":"","what":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","title":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","text":"Get India monthwose cases long","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesMonthlyLong.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","text":"","code":"GetIndiaConfirmedCasesMonthlyLong( url = \"http://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\", level = \"State\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesMonthlyLong.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesMonthlyLong.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get India monthwose cases long — GetIndiaConfirmedCasesMonthlyLong","text":"data frame containing monthly cases state long form","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesWeeklyLong.html","id":null,"dir":"Reference","previous_headings":"","what":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","title":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","text":"Get India weekwise cases long","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesWeeklyLong.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","text":"","code":"GetIndiaConfirmedCasesWeeklyLong( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\", level = \"State\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesWeeklyLong.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaConfirmedCasesWeeklyLong.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get India weekwise cases long — GetIndiaConfirmedCasesWeeklyLong","text":"data frame containing monthly cases state long form","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyCasesCumulative.html","id":null,"dir":"Reference","previous_headings":"","what":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","title":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","text":"Get daily cases India given status type","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyCasesCumulative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","text":"","code":"GetIndiaDailyCasesCumulative( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\", status = \"Confirmed\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyCasesCumulative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","text":"url URL fetch data status One \"Confirmed\", \"Recovered\", \"Deceased\"","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyCasesCumulative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get daily cases for India for a given status type — GetIndiaDailyCasesCumulative","text":"data frame containing daily cases state","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyData.html","id":null,"dir":"Reference","previous_headings":"","what":"Get daily statewise data for India — GetIndiaDailyData","title":"Get daily statewise data for India — GetIndiaDailyData","text":"'Status' column one 'Confirmed', 'Deceased' 'Recovered'","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get daily statewise data for India — GetIndiaDailyData","text":"","code":"GetIndiaDailyData( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get daily statewise data for India — GetIndiaDailyData","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDailyData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get daily statewise data for India — GetIndiaDailyData","text":"data frame containing daily cases state","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDeceasedCasesCumulative.html","id":null,"dir":"Reference","previous_headings":"","what":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","title":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","text":"Get daily deceased cases India","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDeceasedCasesCumulative.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","text":"","code":"GetIndiaDeceasedCasesCumulative( url = \"https://saketkc.github.io/covid19bharat_data//csv/latest/state_wise_daily.csv\" )"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDeceasedCasesCumulative.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","text":"url URL fetch data ","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaDeceasedCasesCumulative.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get daily deceased cases for India — GetIndiaDeceasedCasesCumulative","text":"data frame containing daily cases state","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaHospitalization.html","id":null,"dir":"Reference","previous_headings":"","what":"Get hospitalization data for India — GetIndiaHospitalization","title":"Get hospitalization data for India — GetIndiaHospitalization","text":"Get hospitalization data India","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndiaHospitalization.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get hospitalization data for India — GetIndiaHospitalization","text":"","code":"GetIndiaHospitalization(url = \"\")"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndianStates.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a list of Indian name states — GetIndianStates","title":"Get a list of Indian name states — GetIndianStates","text":"Get list Indian name states","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndianStates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a list of Indian name states — GetIndianStates","text":"","code":"GetIndianStates()"},{"path":"http://saket-choudhary.me/covmuller/reference/GetIndianStates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a list of Indian name states — GetIndianStates","text":"list state abbreviation key full name value","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetMonthYear.html","id":null,"dir":"Reference","previous_headings":"","what":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","title":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","text":"Get MonthYear (zoo) dataframe string formatted data column","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetMonthYear.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","text":"","code":"GetMonthYear(datecol, datefmt = \"%Y-%m-%d\")"},{"path":"http://saket-choudhary.me/covmuller/reference/GetMonthYear.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","text":"datecol vector string formatted dates datefmt Format date (default Y-m-d)","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetMonthYear.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get MonthYear (zoo) from a dataframe string formatted data column — GetMonthYear","text":"vector dates converted MonthYear format (zoo::.yearmon)","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetVOCs.html","id":null,"dir":"Reference","previous_headings":"","what":"Get variants of concern — GetVOCs","title":"Get variants of concern — GetVOCs","text":"Get variants concern","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/GetVOCs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get variants of concern — GetVOCs","text":"","code":"GetVOCs()"},{"path":"http://saket-choudhary.me/covmuller/reference/GetVOCs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get variants of concern — GetVOCs","text":"list variants concern pangolin lineage","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotSequencedPropHeatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","title":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","text":"Plot heatmap cases sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotSequencedPropHeatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","text":"","code":"PlotSequencedPropHeatmap(df)"},{"path":"http://saket-choudhary.me/covmuller/reference/PlotSequencedPropHeatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","text":"cases_and_shared dataframe containing counts confirmed cases sequenced cases","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotSequencedPropHeatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot heatmap of cases sequenced — PlotSequencedPropHeatmap","text":"heatmap total percentage cases sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotTotalHeatmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","title":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","text":"Plot heatmap total cases/sequences","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotTotalHeatmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","text":"","code":"PlotTotalHeatmap(df, color_legend = \"Total cases\")"},{"path":"http://saket-choudhary.me/covmuller/reference/PlotTotalHeatmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","text":"cases_and_shared dataframe containing counts confirmed cases sequenced cases (column named 'value')","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/PlotTotalHeatmap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot heatmap of total cases/sequences — PlotTotalHeatmap","text":"heatmap total cases/sequences","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceInstrument.html","id":null,"dir":"Reference","previous_headings":"","what":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","title":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","text":"Read instrument metadata GISAID batch downloads","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceInstrument.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","text":"","code":"ReadAuspiceInstrument(path)"},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceInstrument.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","text":"path Path list directories \"sequence.tsv\" inside subdirector","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceInstrument.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read instrument metadata from GISAID batch downloads — ReadAuspiceInstrument","text":"dataframe instrument related metadata","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceMetadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","title":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","text":"Read metadata GISAID batch downloads","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceMetadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","text":"","code":"ReadAuspiceMetadata(path)"},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceMetadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","text":"path Path list directories \"sequence.tsv\" inside subdirector","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadAuspiceMetadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read all metadata from GISAID batch downloads — ReadAuspiceMetadata","text":"dataframe collated metadata","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadGISAIDMetada.html","id":null,"dir":"Reference","previous_headings":"","what":"Read metadata downloaded from GISAID — ReadGISAIDMetada","title":"Read metadata downloaded from GISAID — ReadGISAIDMetada","text":"Read metadata downloaded GISAID","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadGISAIDMetada.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read metadata downloaded from GISAID — ReadGISAIDMetada","text":"","code":"ReadGISAIDMetada(path, showProgress = FALSE, ...)"},{"path":"http://saket-choudhary.me/covmuller/reference/ReadGISAIDMetada.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read metadata downloaded from GISAID — ReadGISAIDMetada","text":"path Path tar.xz metadata.txt downloaded GISAID showProgress Whether print progress bars fread ... parameters data.table::fread","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/ReadGISAIDMetada.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read metadata downloaded from GISAID — ReadGISAIDMetada","text":"data frame parsed metadata extra columns","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SanitizeColumn.html","id":null,"dir":"Reference","previous_headings":"","what":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","title":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","text":"function removes: 1. Commas space 2. Hyphen space 3. Multiple dots single space 4. Multiple spacies single space 5. NA \"UNKNOWN\"","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SanitizeColumn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","text":"","code":"SanitizeColumn(col)"},{"path":"http://saket-choudhary.me/covmuller/reference/SanitizeColumn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","text":"col String vector","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SanitizeColumn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sanitize a vector to remove special characters and convert it to tile — SanitizeColumn","text":"string vector sanitized entries","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsDatewise.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize the total number of variants per week — SummarizeVariantsDatewise","title":"Summarize the total number of variants per week — SummarizeVariantsDatewise","text":"Summarize total number variants per week","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsDatewise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize the total number of variants per week — SummarizeVariantsDatewise","text":"","code":"SummarizeVariantsDatewise(variant_df, by_state = FALSE)"},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsDatewise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize the total number of variants per week — SummarizeVariantsDatewise","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsDatewise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize the total number of variants per week — SummarizeVariantsDatewise","text":"dataframe monthwise counts variant sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsMonthwise.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","title":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","text":"Summarize total number variants per month","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsMonthwise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","text":"","code":"SummarizeVariantsMonthwise(variant_df, by_state = FALSE)"},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsMonthwise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsMonthwise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize the total number of variants per month — SummarizeVariantsMonthwise","text":"dataframe monthwise counts variant sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsWeekwise.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","title":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","text":"Summarize total number variants per week","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsWeekwise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","text":"","code":"SummarizeVariantsWeekwise(variant_df, by_state = FALSE)"},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsWeekwise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/SummarizeVariantsWeekwise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize the total number of variants per week — SummarizeVariantsWeekwise","text":"dataframe monthwise counts variant sequenced","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthCountrywise.html","id":null,"dir":"Reference","previous_headings":"","what":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","title":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","text":"Get total sequenced samples per country","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthCountrywise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","text":"","code":"TotalSequencesPerMonthCountrywise(variant_df, rename_country_as_state = TRUE)"},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthCountrywise.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","text":"variant_df dataframe","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthCountrywise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get total sequenced samples per country — TotalSequencesPerMonthCountrywise","text":"dataframe sequencing statistics per country","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthStatewise.html","id":null,"dir":"Reference","previous_headings":"","what":"Get total number of sequenced samples per month in a Country — TotalSequencesPerMonthStatewise","title":"Get total number of sequenced samples per month in a Country — TotalSequencesPerMonthStatewise","text":"Get total number sequenced samples per month Country","code":""},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthStatewise.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get total number of sequenced samples per month in a Country — TotalSequencesPerMonthStatewise","text":"","code":"TotalSequencesPerMonthStatewise(variant_df, drop_country = FALSE)"},{"path":"http://saket-choudhary.me/covmuller/reference/TotalSequencesPerMonthStatewise.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get total number of sequenced samples per month in a Country — TotalSequencesPerMonthStatewise","text":"dataframe sequencing statistics per state per country","code":""}]