COVID-CFR-by-age-CN-KR-ES-IT-latest-nolegend.svg
Size of this PNG preview of this SVG file:
512 × 410 pixels
.
Other resolutions:
300 × 240 pixels
|
600 × 480 pixels
|
959 × 768 pixels
|
1,279 × 1,024 pixels
|
2,558 × 2,048 pixels
.
Summary
Description COVID-CFR-by-age-CN-KR-ES-IT-latest-nolegend.svg |
English:
Crude COVID-19 case fatality rates (number of known cases divided by number of deaths) by age group. Data for countries:
These reports contain number of cases and deaths that were laboratory-confirmed at the date of the report. As not every case is detected (probably most are undetected, and this ratio is different for each country), testing and gathering statistics takes time, and some who are now confirmed will die in the future, this method of CFR calculation is a rather inaccurate. But as it is just the division of two numbers, it can be done quickly with publicly accessible data.
|
Date | |
Source | Own work |
Author | Attomir |
Other versions |
|
Source code
InfoField
|
R codelibrary(ggplot2)
library(tidyr)
ages = c("0-9","10-19","20-29","30-39","40-49","50-59","60-69","70-79","80+")
data = data.frame(group=factor(ages, levels=rev(ages)),
china=c(0.0, 0.2, 0.2, 0.2, 0.4, 1.3, 3.6, 8.0, 14.8),
korea=c(0.0, 0.0, 0.0, 0.1, 0.2, 0.6, 2.3, 9.5, 25.2),
spain=c(0.2, 0.3, 0.2, 0.3, 0.6, 1.4, 4.9, 14.3, 100*(7872+4082)/(37463+18316)),
italy=c(0.3, 0.0, 0.1, 0.3, 0.9, 2.7, 10.6, 25.9, 100*(13233+5641)/(40901+18837))
)
countries = rev(c("china","korea","spain","italy"))
country_colors = rev(c('#d62728','#2ca02c','#ff7f0e','#1f77b4'))
data = gather(data, country, mortality, china, korea, spain, italy)
data$country = factor(data$country, levels=countries)
data$mortality_prc = paste(round(data$mortality,1),"%",sep="")
bar_width = .8
im = ggplot(data=data, aes(x=group, y=mortality, fill=country)) +
geom_bar(stat="identity", width=bar_width, position=position_dodge(bar_width))+
coord_flip()+
geom_text(aes(y=mortality, label=mortality_prc),
hjust=-.2, vjust=.4, size=2.7, position=position_dodge(bar_width))+
scale_fill_manual(values=country_colors) +
xlab("age group") +
ylab("mortality [%]") +
ylim(0, 32)+
theme_minimal() +
theme(
legend.position="none",
axis.title.y=element_text(color = "#888888", size = 12),
axis.title.x=element_text(color = "#888888", size = 12),
axis.text.y=element_text(color = "black", size = 18, face = "bold"),
axis.text.x=element_text(color = "black", size = 18, face = "bold"),
panel.grid.major.y=element_line(colour = "#f0f0f0", size = c(20)),
panel.grid.major.x=element_line(colour = "#888888", size=c(.5,.2,.2,.2)),
panel.grid.minor.x=element_blank(),
)
ggsave(file="plot.svg", plot=im, width=10, height=8)
im
|
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication . | |
The person who associated a work with this deed has dedicated the work to the
public domain
by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.en CC0 Creative Commons Zero, Public Domain Dedication false false |