diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/code/RhysWarham Feb2024.R b/_posts/2024-09-01-wonderful-wednesdays-february-2024/code/RhysWarham Feb2024.R new file mode 100644 index 0000000..341280d --- /dev/null +++ b/_posts/2024-09-01-wonderful-wednesdays-february-2024/code/RhysWarham Feb2024.R @@ -0,0 +1,104 @@ +library(tidyverse) +library(haven) +library(ggplot2) +library(readr) + +### Bring in data + +# Replacing missing counts with 0 assuming no deaths on dates where +# no deaths reported for purpose of this plot +# Also some negative numbers of deaths reported in plot, assuming +# the negative sign added in error for purpose of this plot +df_raw <- read_csv("WHO-COVID-19-global-data.csv") %>% + select(Date_reported, WHO_region, New_deaths) %>% + mutate(New_deaths = ifelse(is.na(New_deaths), 0, abs(New_deaths))) + +# Numeric variable for dates in order +# Dataset contains 211 unique dates repeated across 240 countries +df_raw$date_n <- rep(c(1:211), times=240) + +# Total counts by region and overall +df_reg <- aggregate(df_raw$New_deaths, + by=list(df_raw$date_n, df_raw$WHO_region), + FUN=sum) +df_total <- aggregate(df_raw$New_deaths, + by=list(df_raw$date_n), + FUN=sum) + +### Function for plot + +covid_plot <- function(Region, text_y, cap_text){ + + # Data for other regions - ggplot below will stack + # this and data for region to get overall counts + # (Update - later fill these additional regions in white + # so now somewhat redundant) + df_filt <- df_raw %>% filter(WHO_region != Region) + + df_other <- aggregate(df_filt$New_deaths, + by=list(df_filt$date_n), + FUN=sum) %>% + mutate(Group.2 = "Other") + + # Data for region of interest + df_red <- df_reg %>% filter(Group.2 == Region) + + df <- rbind(df_red, df_other) %>% + mutate(Group.2_n = as.factor(if_else(Group.2 == "Other", 1, 2))) + + outplot <- + ggplot() + + geom_area(data= df, aes(x = Group.1, y = x, + group = Group.2_n, fill = Group.2_n)) + + scale_x_continuous(breaks = c(0, 53, 105, 157, 211), + labels=c("05/01/2020", "03/01/2021", + "02/01/2022", "01/01/2023", "14/01/2024")) + + scale_fill_manual(values = c("white", "red")) + + geom_line(data = df_total, mapping = aes(x = Group.1, y = x)) + + theme_bw() + + theme( + plot.title.position = "plot", + panel.border = element_blank(), + panel.grid.major.x = element_blank(), + panel.grid.minor.x = element_blank(), + panel.grid.minor.y = element_blank(), + axis.line.x = element_line(colour = "black"), + axis.ticks.y = element_blank(), + axis.text.x = element_text(margin = margin(t = 5, unit = "pt")), + axis.title.x = element_blank(), + axis.title.y = element_blank(), + legend.position = "none" + ) + + geom_segment(aes(x = 14+6/7, y = 0, xend = 14+6/7, yend = 80000), + linetype=2) + + labs(title = "Weekly COVID Deaths", + caption = cap_text) + + annotate(geom="text", x=78, y=90000, label="TOTAL", + size=4, fontface=2) + + annotate(geom="text", x=78, y=text_y, label = Region, + size=4, fontface=2, color = "red") + + annotate(geom="text", x=14+6/7, y=82500, label=" WHO Declares Pandemic", + size=3, fontface=3) + + return(outplot) + + +} + +AFRO_plot <- covid_plot(Region = "AFRO", text_y = 7500, + cap_text = "AFRO = African Region") + +AMRO_plot <- covid_plot(Region = "AMRO", text_y = 40000, + cap_text = "AMRO = Region of the Americas") + +EMRO_plot <- covid_plot(Region = "EMRO", text_y = 7500, + cap_text = "EMRO = Eastern Mediterranean Region") + +EURO_plot <- covid_plot(Region = "EURO", text_y = 25000, + cap_text = "EURO = European Region") + +SEARO_plot <- covid_plot(Region = "SEARO", text_y = 35000, + cap_text = "SEARO = South-East Asian Region") + +WPRO_plot <- covid_plot(Region = "WPRO", text_y = 7500, + cap_text = "WPRO = Western Pacific Region") diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/code/app - Steve Mallett.R b/_posts/2024-09-01-wonderful-wednesdays-february-2024/code/app - Steve Mallett.R new file mode 100644 index 0000000..7d905f3 --- /dev/null +++ b/_posts/2024-09-01-wonderful-wednesdays-february-2024/code/app - Steve Mallett.R @@ -0,0 +1,62 @@ +library(shiny) +library(tidyverse) + +trts <- c("Experimental", "Standard of Care") + +ui <- fluidPage( + + titlePanel("Old Faithful Geyser Data"), + + sidebarLayout( + sidebarPanel( + checkboxGroupInput("trt", "Select Treatment", trts) + ), + + mainPanel( + plotOutput("myPlot") + ) + ) +) + +server <- function(input, output) { + + df <- read.csv2("./data/ww eortc qlq-c30 missing.csv", sep=",") %>% + pivot_longer(cols=starts_with("WEEK"), names_to = "AVISIT", values_to = "AVAL") %>% + mutate(AVAL=as.numeric(AVAL)) %>% + select(USUBJID, ARM, LASTVIS, AGE:AVAL) %>% + # group_by(ARM, LASTVIS, AVISIT) %>% + summarize(AVAL = mean(AVAL, na.rm=TRUE)) + # mutate(LASTVISC=as.factor(paste("Week", sprintf("%02.f", LASTVIS))), + # AVISITN = as.numeric(gsub("WEEK","",AVISIT))) %>% + # mutate(LASTVISC=fct_reorder(LASTVISC, LASTVIS)) + # + output$myPlot <- renderPlot({ + + df2 <- df %>% + filter(ARM == input$trt) + + f <- input$trt + f + + ggplot(data=df2, aes(x=AVISITN, y=AVAL, group=LASTVISC, color=ARM)) + + geom_line() + + geom_point() + + scale_color_discrete(type=c("#1b9e77", "#d95f02")) + + theme( + # plot.background = element_rect(fill="white"), + # panel.background = element_rect(fill="white"), + # legend.background = element_rect(fill="black"), + # legend.box.background = element_rect(fill="black"), + # legend.key = element_blank(), + legend.text = element_text(colour="grey"), + panel.grid = element_line(colour="lightgrey"), + panel.grid.minor = element_blank(), + strip.background = element_blank(), + plot.title=element_text(colour = "grey", size = 14, face = "bold"), + strip.text = element_text(colour = "grey50", size = 10), + axis.text = element_text(angle = 90)) + }) +} + +# Run the application +shinyApp(ui = ui, server = server) diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/AFRO.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/AFRO.png new file mode 100644 index 0000000..bff1d3a Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/AFRO.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/AMRO.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/AMRO.png new file mode 100644 index 0000000..89903d8 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/AMRO.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/EMRO.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/EMRO.png new file mode 100644 index 0000000..d5a6ed4 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/EMRO.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/EURO.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/EURO.png new file mode 100644 index 0000000..e0b4087 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/EURO.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/SEARO.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/SEARO.png new file mode 100644 index 0000000..16ea956 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/SEARO.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/Steve_Mallett_WW_022024 - Steve Mallett.docx b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/Steve_Mallett_WW_022024 - Steve Mallett.docx new file mode 100644 index 0000000..8e42b2d Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/Steve_Mallett_WW_022024 - Steve Mallett.docx differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/WPRO.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/WPRO.png new file mode 100644 index 0000000..dddba8c Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/WPRO.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/covid.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/covid.png new file mode 100644 index 0000000..edfc962 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/covid.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_I.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_I.png new file mode 100644 index 0000000..1d51194 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_I.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II.png new file mode 100644 index 0000000..08b81c2 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II_updated_1.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II_updated_1.png new file mode 100644 index 0000000..aa3b571 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II_updated_1.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II_updated_2.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II_updated_2.png new file mode 100644 index 0000000..807088d Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_II_updated_2.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_I_updated.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_I_updated.png new file mode 100644 index 0000000..fc27331 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/dlqi_I_updated.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/tendril_plot - Agustin Calatroni.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/tendril_plot - Agustin Calatroni.png new file mode 100644 index 0000000..9a22f64 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/tendril_plot - Agustin Calatroni.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/tendril_plot_updated.png b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/tendril_plot_updated.png new file mode 100644 index 0000000..f95ce96 Binary files /dev/null and b/_posts/2024-09-01-wonderful-wednesdays-february-2024/images/tendril_plot_updated.png differ diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/wonderful-wednesdays-february-2024.Rmd b/_posts/2024-09-01-wonderful-wednesdays-february-2024/wonderful-wednesdays-february-2024.Rmd new file mode 100644 index 0000000..a798708 --- /dev/null +++ b/_posts/2024-09-01-wonderful-wednesdays-february-2024/wonderful-wednesdays-february-2024.Rmd @@ -0,0 +1,251 @@ +--- +title: "Wonderful Wednesdays February 2024" +description: | + Find a plot in a healthcare related publication and improve the visual presentation with only the data available from the publication. +author: + - name: PSI VIS SIG + url: https://www.psiweb.org/sigs-special-interest-groups/visualisation +date: 02-08-2024 +categories: + - Wonderful Wednesdays +base_url: https://vis-sig.github.io/blog +preview: ./images/dlqi_II_updated_2.png +output: + distill::distill_article: + self_contained: false +--- + + +# Improving a plot +Find a plot in a healthcare related publication and improve the visual presentation with only the data available from the publication. + +A description of the challenge can be found [here](https://github.com/VIS-SIG/Wonderful-Wednesdays/tree/master/data/2024/2024-01-10). +A recording of the session can be found [here](https://psiweb.org/vod/item/psi-vissig-wonderful-wednesday-47-improving-a-plot). + + + +## Example 1. AEs + +Original: + +![](./images/tendril_plot - Agustin Calatroni.png) +[high resolution image](./images/tendril_plot - Agustin Calatroni.png) + +Updated version: + +![](./images/tendril_plot - Agustin Calatroni.png) +The Shiny app can be found [here](https://steve-mallett.shinyapps.io/TendrilPlot/). + +[link to code](#example1 code) + + + + +## Example 2. COVID data + +Original: + +![](./images/covid.png) +[high resolution image](./images/covid.png) + +Updated version: + +![](./images/SEARO.png) +![](./images/WPRO.png) +![](./images/AFRO.png) +![](./images/AMRO.png) +![](./images/EURO.png) +![](./images/EMRO.png) + +The Shiny app can be found [here](https://steve-mallett.shinyapps.io/WWFeb24/). + + + +[link to code](#example2 code) + + +## Example 3. DLQI data I + +Original: + +![](./images/dlqi_I.png) +[high resolution image](./images/dlqi_I.png) + +Updated version: + +![](./images/dlqi_I_updated.png) +[high resolution image](./images/dlqi_I_updated.png) + +[link to code](#example3 code) + + + + +## Example 4. DLQI data II + +Original: + +![](./images/dlqi_II.png) + +[high resolution image](./images/dlqi_II.png) +Source: Figure 2 in Muntyanu A, Gabrielli S, Donovan J, Gooderham M, Guenther L, Hanna S, et al. The burden of alopecia areata: A scoping review focusing on quality of life, mental health and work productivity. J Eur Acad Dermatol Venereol. 2023; 37: 1490–1520. https://doi.org/10.1111/jdv.18926 + +Updated version 1: + +![](./images/dlqi_II_updated_1.png) + +[high resolution image](./images/dlqi_II_updated_1.png) + +Updated version 2: + +![](./images/dlqi_II_updated_2.png) + +[high resolution image](./images/dlqi_II_updated_2.png) + + + +[link to code](#example4 code) + + +# Code + + + + +## Example 1. AEs + +No code available. + +[Back to blog](#example1) + + + + +## Example 2. COVID data + +```{r, echo = TRUE, eval=FALSE} +library(tidyverse) +library(haven) +library(ggplot2) +library(readr) + +### Bring in data + +# Replacing missing counts with 0 assuming no deaths on dates where +# no deaths reported for purpose of this plot +# Also some negative numbers of deaths reported in plot, assuming +# the negative sign added in error for purpose of this plot +df_raw <- read_csv("WHO-COVID-19-global-data.csv") %>% + select(Date_reported, WHO_region, New_deaths) %>% + mutate(New_deaths = ifelse(is.na(New_deaths), 0, abs(New_deaths))) + +# Numeric variable for dates in order +# Dataset contains 211 unique dates repeated across 240 countries +df_raw$date_n <- rep(c(1:211), times=240) + +# Total counts by region and overall +df_reg <- aggregate(df_raw$New_deaths, + by=list(df_raw$date_n, df_raw$WHO_region), + FUN=sum) +df_total <- aggregate(df_raw$New_deaths, + by=list(df_raw$date_n), + FUN=sum) + +### Function for plot + +covid_plot <- function(Region, text_y, cap_text){ + + # Data for other regions - ggplot below will stack + # this and data for region to get overall counts + # (Update - later fill these additional regions in white + # so now somewhat redundant) + df_filt <- df_raw %>% filter(WHO_region != Region) + + df_other <- aggregate(df_filt$New_deaths, + by=list(df_filt$date_n), + FUN=sum) %>% + mutate(Group.2 = "Other") + + # Data for region of interest + df_red <- df_reg %>% filter(Group.2 == Region) + + df <- rbind(df_red, df_other) %>% + mutate(Group.2_n = as.factor(if_else(Group.2 == "Other", 1, 2))) + + outplot <- + ggplot() + + geom_area(data= df, aes(x = Group.1, y = x, + group = Group.2_n, fill = Group.2_n)) + + scale_x_continuous(breaks = c(0, 53, 105, 157, 211), + labels=c("05/01/2020", "03/01/2021", + "02/01/2022", "01/01/2023", "14/01/2024")) + + scale_fill_manual(values = c("white", "red")) + + geom_line(data = df_total, mapping = aes(x = Group.1, y = x)) + + theme_bw() + + theme( + plot.title.position = "plot", + panel.border = element_blank(), + panel.grid.major.x = element_blank(), + panel.grid.minor.x = element_blank(), + panel.grid.minor.y = element_blank(), + axis.line.x = element_line(colour = "black"), + axis.ticks.y = element_blank(), + axis.text.x = element_text(margin = margin(t = 5, unit = "pt")), + axis.title.x = element_blank(), + axis.title.y = element_blank(), + legend.position = "none" + ) + + geom_segment(aes(x = 14+6/7, y = 0, xend = 14+6/7, yend = 80000), + linetype=2) + + labs(title = "Weekly COVID Deaths", + caption = cap_text) + + annotate(geom="text", x=78, y=90000, label="TOTAL", + size=4, fontface=2) + + annotate(geom="text", x=78, y=text_y, label = Region, + size=4, fontface=2, color = "red") + + annotate(geom="text", x=14+6/7, y=82500, label=" WHO Declares Pandemic", + size=3, fontface=3) + + return(outplot) + + +} + +AFRO_plot <- covid_plot(Region = "AFRO", text_y = 7500, + cap_text = "AFRO = African Region") + +AMRO_plot <- covid_plot(Region = "AMRO", text_y = 40000, + cap_text = "AMRO = Region of the Americas") + +EMRO_plot <- covid_plot(Region = "EMRO", text_y = 7500, + cap_text = "EMRO = Eastern Mediterranean Region") + +EURO_plot <- covid_plot(Region = "EURO", text_y = 25000, + cap_text = "EURO = European Region") + +SEARO_plot <- covid_plot(Region = "SEARO", text_y = 35000, + cap_text = "SEARO = South-East Asian Region") + +WPRO_plot <- covid_plot(Region = "WPRO", text_y = 7500, + cap_text = "WPRO = Western Pacific Region") +``` + +[Back to blog](#example2) + + + + +## Example 3. DLQI data I + +No code available. + +[Back to blog](#example3) + + + + +## Example 4. DLQI data II + +No code available. + +[Back to blog](#example4) \ No newline at end of file diff --git a/_posts/2024-09-01-wonderful-wednesdays-february-2024/wonderful-wednesdays-february-2024.html b/_posts/2024-09-01-wonderful-wednesdays-february-2024/wonderful-wednesdays-february-2024.html new file mode 100644 index 0000000..9d4e43b --- /dev/null +++ b/_posts/2024-09-01-wonderful-wednesdays-february-2024/wonderful-wednesdays-february-2024.html @@ -0,0 +1,1709 @@ + + + + +
+ + + + + + + + + + + + + + + +Find a plot in a healthcare related publication and improve the +visual presentation with only the data available from the +publication.
+Find a plot in a healthcare related publication and improve the +visual presentation with only the data available from the +publication.
+A description of the challenge can be found here.
+A recording of the session can be found here.
Original:
+ +Updated version:
+
+The Shiny app can be found here.
Original:
+ +Updated version:
+
+
+
+
+
+
The Shiny app can be found here.
+ + +Original:
+ +Updated version:
+ + + +Original:
+ +high resolution image
+Source: Figure 2 in Muntyanu A, Gabrielli S, Donovan J, Gooderham M,
+Guenther L, Hanna S, et al. The burden of alopecia areata: A scoping
+review focusing on quality of life, mental health and work productivity.
+J Eur Acad Dermatol Venereol. 2023; 37: 1490–1520. https://doi.org/10.1111/jdv.18926
Updated version 1:
+ + +Updated version 2:
+ + + + +No code available.
+ + +library(tidyverse)
+library(haven)
+library(ggplot2)
+library(readr)
+
+### Bring in data
+
+# Replacing missing counts with 0 assuming no deaths on dates where
+# no deaths reported for purpose of this plot
+# Also some negative numbers of deaths reported in plot, assuming
+# the negative sign added in error for purpose of this plot
+df_raw <- read_csv("WHO-COVID-19-global-data.csv") %>%
+ select(Date_reported, WHO_region, New_deaths) %>%
+ mutate(New_deaths = ifelse(is.na(New_deaths), 0, abs(New_deaths)))
+
+# Numeric variable for dates in order
+# Dataset contains 211 unique dates repeated across 240 countries
+df_raw$date_n <- rep(c(1:211), times=240)
+
+# Total counts by region and overall
+df_reg <- aggregate(df_raw$New_deaths,
+ by=list(df_raw$date_n, df_raw$WHO_region),
+ FUN=sum)
+df_total <- aggregate(df_raw$New_deaths,
+ by=list(df_raw$date_n),
+ FUN=sum)
+
+### Function for plot
+
+covid_plot <- function(Region, text_y, cap_text){
+
+ # Data for other regions - ggplot below will stack
+ # this and data for region to get overall counts
+ # (Update - later fill these additional regions in white
+ # so now somewhat redundant)
+ df_filt <- df_raw %>% filter(WHO_region != Region)
+
+ df_other <- aggregate(df_filt$New_deaths,
+ by=list(df_filt$date_n),
+ FUN=sum) %>%
+ mutate(Group.2 = "Other")
+
+ # Data for region of interest
+ df_red <- df_reg %>% filter(Group.2 == Region)
+
+ df <- rbind(df_red, df_other) %>%
+ mutate(Group.2_n = as.factor(if_else(Group.2 == "Other", 1, 2)))
+
+ outplot <-
+ ggplot() +
+ geom_area(data= df, aes(x = Group.1, y = x,
+ group = Group.2_n, fill = Group.2_n)) +
+ scale_x_continuous(breaks = c(0, 53, 105, 157, 211),
+ labels=c("05/01/2020", "03/01/2021",
+ "02/01/2022", "01/01/2023", "14/01/2024")) +
+ scale_fill_manual(values = c("white", "red")) +
+ geom_line(data = df_total, mapping = aes(x = Group.1, y = x)) +
+ theme_bw() +
+ theme(
+ plot.title.position = "plot",
+ panel.border = element_blank(),
+ panel.grid.major.x = element_blank(),
+ panel.grid.minor.x = element_blank(),
+ panel.grid.minor.y = element_blank(),
+ axis.line.x = element_line(colour = "black"),
+ axis.ticks.y = element_blank(),
+ axis.text.x = element_text(margin = margin(t = 5, unit = "pt")),
+ axis.title.x = element_blank(),
+ axis.title.y = element_blank(),
+ legend.position = "none"
+ ) +
+ geom_segment(aes(x = 14+6/7, y = 0, xend = 14+6/7, yend = 80000),
+ linetype=2) +
+ labs(title = "Weekly COVID Deaths",
+ caption = cap_text) +
+ annotate(geom="text", x=78, y=90000, label="TOTAL",
+ size=4, fontface=2) +
+ annotate(geom="text", x=78, y=text_y, label = Region,
+ size=4, fontface=2, color = "red") +
+ annotate(geom="text", x=14+6/7, y=82500, label=" WHO Declares Pandemic",
+ size=3, fontface=3)
+
+ return(outplot)
+
+
+}
+
+AFRO_plot <- covid_plot(Region = "AFRO", text_y = 7500,
+ cap_text = "AFRO = African Region")
+
+AMRO_plot <- covid_plot(Region = "AMRO", text_y = 40000,
+ cap_text = "AMRO = Region of the Americas")
+
+EMRO_plot <- covid_plot(Region = "EMRO", text_y = 7500,
+ cap_text = "EMRO = Eastern Mediterranean Region")
+
+EURO_plot <- covid_plot(Region = "EURO", text_y = 25000,
+ cap_text = "EURO = European Region")
+
+SEARO_plot <- covid_plot(Region = "SEARO", text_y = 35000,
+ cap_text = "SEARO = South-East Asian Region")
+
+WPRO_plot <- covid_plot(Region = "WPRO", text_y = 7500,
+ cap_text = "WPRO = Western Pacific Region")
+
+No code available.
+ + +No code available.
+ +
`,e.githubCompareUpdatesUrl&&(t+=`View all changes to this article since it was first published.`),t+=` + If you see mistakes or want to suggest changes, please create an issue on GitHub.
+ `);const n=e.journal;return'undefined'!=typeof n&&'Distill'===n.title&&(t+=` +Diagrams and text are licensed under Creative Commons Attribution CC-BY 4.0 with the source available on GitHub, unless noted otherwise. The figures that have been reused from other sources don’t fall under this license and can be recognized by a note in their caption: “Figure from …”.
+ `),'undefined'!=typeof e.publishedDate&&(t+=` +For attribution in academic contexts, please cite this work as
+${e.concatenatedAuthors}, "${e.title}", Distill, ${e.publishedYear}.+
BibTeX citation
+${m(e)}+ `),t}var An=Math.sqrt,En=Math.atan2,Dn=Math.sin,Mn=Math.cos,On=Math.PI,Un=Math.abs,In=Math.pow,Nn=Math.LN10,jn=Math.log,Rn=Math.max,qn=Math.ceil,Fn=Math.floor,Pn=Math.round,Hn=Math.min;const zn=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],Bn=['Jan.','Feb.','March','April','May','June','July','Aug.','Sept.','Oct.','Nov.','Dec.'],Wn=(e)=>10>e?'0'+e:e,Vn=function(e){const t=zn[e.getDay()].substring(0,3),n=Wn(e.getDate()),i=Bn[e.getMonth()].substring(0,3),a=e.getFullYear().toString(),d=e.getUTCHours().toString(),r=e.getUTCMinutes().toString(),o=e.getUTCSeconds().toString();return`${t}, ${n} ${i} ${a} ${d}:${r}:${o} Z`},$n=function(e){const t=Array.from(e).reduce((e,[t,n])=>Object.assign(e,{[t]:n}),{});return t},Jn=function(e){const t=new Map;for(var n in e)e.hasOwnProperty(n)&&t.set(n,e[n]);return t};class Qn{constructor(e){this.name=e.author,this.personalURL=e.authorURL,this.affiliation=e.affiliation,this.affiliationURL=e.affiliationURL,this.affiliations=e.affiliations||[]}get firstName(){const e=this.name.split(' ');return e.slice(0,e.length-1).join(' ')}get lastName(){const e=this.name.split(' ');return e[e.length-1]}}class Gn{constructor(){this.title='unnamed article',this.description='',this.authors=[],this.bibliography=new Map,this.bibliographyParsed=!1,this.citations=[],this.citationsCollected=!1,this.journal={},this.katex={},this.publishedDate=void 0}set url(e){this._url=e}get url(){if(this._url)return this._url;return this.distillPath&&this.journal.url?this.journal.url+'/'+this.distillPath:this.journal.url?this.journal.url:void 0}get githubUrl(){return this.githubPath?'https://github.com/'+this.githubPath:void 0}set previewURL(e){this._previewURL=e}get previewURL(){return this._previewURL?this._previewURL:this.url+'/thumbnail.jpg'}get publishedDateRFC(){return Vn(this.publishedDate)}get updatedDateRFC(){return Vn(this.updatedDate)}get publishedYear(){return this.publishedDate.getFullYear()}get publishedMonth(){return Bn[this.publishedDate.getMonth()]}get publishedDay(){return this.publishedDate.getDate()}get publishedMonthPadded(){return Wn(this.publishedDate.getMonth()+1)}get publishedDayPadded(){return Wn(this.publishedDate.getDate())}get publishedISODateOnly(){return this.publishedDate.toISOString().split('T')[0]}get volume(){const e=this.publishedYear-2015;if(1>e)throw new Error('Invalid publish date detected during computing volume');return e}get issue(){return this.publishedDate.getMonth()+1}get concatenatedAuthors(){if(2
tag. We found the following text: '+t);const n=document.createElement('span');n.innerHTML=e.nodeValue,e.parentNode.insertBefore(n,e),e.parentNode.removeChild(e)}}}}).observe(this,{childList:!0})}}var Ti='undefined'==typeof window?'undefined'==typeof global?'undefined'==typeof self?{}:self:global:window,_i=f(function(e,t){(function(e){function t(){this.months=['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'],this.notKey=[',','{','}',' ','='],this.pos=0,this.input='',this.entries=[],this.currentEntry='',this.setInput=function(e){this.input=e},this.getEntries=function(){return this.entries},this.isWhitespace=function(e){return' '==e||'\r'==e||'\t'==e||'\n'==e},this.match=function(e,t){if((void 0==t||null==t)&&(t=!0),this.skipWhitespace(t),this.input.substring(this.pos,this.pos+e.length)==e)this.pos+=e.length;else throw'Token mismatch, expected '+e+', found '+this.input.substring(this.pos);this.skipWhitespace(t)},this.tryMatch=function(e,t){return(void 0==t||null==t)&&(t=!0),this.skipWhitespace(t),this.input.substring(this.pos,this.pos+e.length)==e},this.matchAt=function(){for(;this.input.length>this.pos&&'@'!=this.input[this.pos];)this.pos++;return!('@'!=this.input[this.pos])},this.skipWhitespace=function(e){for(;this.isWhitespace(this.input[this.pos]);)this.pos++;if('%'==this.input[this.pos]&&!0==e){for(;'\n'!=this.input[this.pos];)this.pos++;this.skipWhitespace(e)}},this.value_braces=function(){var e=0;this.match('{',!1);for(var t=this.pos,n=!1;;){if(!n)if('}'==this.input[this.pos]){if(0 =k&&(++x,i=k);if(d[x]instanceof n||d[T-1].greedy)continue;w=T-x,y=e.slice(i,k),v.index-=i}if(v){g&&(h=v[1].length);var S=v.index+h,v=v[0].slice(h),C=S+v.length,_=y.slice(0,S),L=y.slice(C),A=[x,w];_&&A.push(_);var E=new n(o,u?a.tokenize(v,u):v,b,v,f);A.push(E),L&&A.push(L),Array.prototype.splice.apply(d,A)}}}}}return d},hooks:{all:{},add:function(e,t){var n=a.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=a.hooks.all[e];if(n&&n.length)for(var d,r=0;d=n[r++];)d(t)}}},i=a.Token=function(e,t,n,i,a){this.type=e,this.content=t,this.alias=n,this.length=0|(i||'').length,this.greedy=!!a};if(i.stringify=function(e,t,n){if('string'==typeof e)return e;if('Array'===a.util.type(e))return e.map(function(n){return i.stringify(n,t,e)}).join('');var d={type:e.type,content:i.stringify(e.content,t,n),tag:'span',classes:['token',e.type],attributes:{},language:t,parent:n};if('comment'==d.type&&(d.attributes.spellcheck='true'),e.alias){var r='Array'===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(d.classes,r)}a.hooks.run('wrap',d);var l=Object.keys(d.attributes).map(function(e){return e+'="'+(d.attributes[e]||'').replace(/"/g,'"')+'"'}).join(' ');return'<'+d.tag+' class="'+d.classes.join(' ')+'"'+(l?' '+l:'')+'>'+d.content+''+d.tag+'>'},!t.document)return t.addEventListener?(t.addEventListener('message',function(e){var n=JSON.parse(e.data),i=n.language,d=n.code,r=n.immediateClose;t.postMessage(a.highlight(d,a.languages[i],i)),r&&t.close()},!1),t.Prism):t.Prism;var d=document.currentScript||[].slice.call(document.getElementsByTagName('script')).pop();return d&&(a.filename=d.src,document.addEventListener&&!d.hasAttribute('data-manual')&&('loading'===document.readyState?document.addEventListener('DOMContentLoaded',a.highlightAll):window.requestAnimationFrame?window.requestAnimationFrame(a.highlightAll):window.setTimeout(a.highlightAll,16))),t.Prism}();e.exports&&(e.exports=n),'undefined'!=typeof Ti&&(Ti.Prism=n),n.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},n.hooks.add('wrap',function(e){'entity'===e.type&&(e.attributes.title=e.content.replace(/&/,'&'))}),n.languages.xml=n.languages.markup,n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},n.languages.css.atrule.inside.rest=n.util.clone(n.languages.css),n.languages.markup&&(n.languages.insertBefore('markup','tag',{style:{pattern:/(
+
+
+ ${e.map(l).map((e)=>`
`)}}const Mi=`
+d-citation-list {
+ contain: layout style;
+}
+
+d-citation-list .references {
+ grid-column: text;
+}
+
+d-citation-list .references .title {
+ font-weight: 500;
+}
+`;class Oi extends HTMLElement{static get is(){return'd-citation-list'}connectedCallback(){this.hasAttribute('distill-prerendered')||(this.style.display='none')}set citations(e){x(this,e)}}var Ui=f(function(e){var t='undefined'==typeof window?'undefined'!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{}:window,n=function(){var e=/\blang(?:uage)?-(\w+)\b/i,n=0,a=t.Prism={util:{encode:function(e){return e instanceof i?new i(e.type,a.util.encode(e.content),e.alias):'Array'===a.util.type(e)?e.map(a.util.encode):e.replace(/&/g,'&').replace(/e.length)break tokenloop;if(!(y instanceof n)){c.lastIndex=0;var v=c.exec(y),w=1;if(!v&&f&&x!=d.length-1){if(c.lastIndex=i,v=c.exec(e),!v)break;for(var S=v.index+(g?v[1].length:0),C=v.index+v[0].length,T=x,k=i,p=d.length;T
+
+`);class Ni extends ei(Ii(HTMLElement)){renderContent(){if(this.languageName=this.getAttribute('language'),!this.languageName)return void console.warn('You need to provide a language attribute to your
Footnotes
+
+`,!1);class Fi extends qi(HTMLElement){connectedCallback(){super.connectedCallback(),this.list=this.root.querySelector('ol'),this.root.style.display='none'}set footnotes(e){if(this.list.innerHTML='',e.length){this.root.style.display='';for(const t of e){const e=document.createElement('li');e.id=t.id+'-listing',e.innerHTML=t.innerHTML;const n=document.createElement('a');n.setAttribute('class','footnote-backlink'),n.textContent='[\u21A9]',n.href='#'+t.id,e.appendChild(n),this.list.appendChild(e)}}else this.root.style.display='none'}}const Pi=ti('d-hover-box',`
+
+
+