File:COVID-CFR-by-age-CN-KR-ES-IT-20200416-nolegend.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 512 × 410 pixels, file size: 20 KB)

Captions

Captions

COVID-19 case fatality rates by age group in China, South Korea, Italy and Spain based on data available on 16 April 2020

Summary

[edit]
 
The source code of this SVG is invalid due to an error.
 
This W3C-invalid chart was created with R.
Description
English: Crude COVID-19 case fatality rates (number of known cases divided by number of deaths) by age group. Data for countries:
  •  
    China - until 11 February 2020, source: China CDC Weekly [1]
  •  
    South Korea - until 15 April 2020, source: Korea Centers for Disease Control and Prevention [2]
  •  
    Spain - until 16 April 2020, source: Ministry of Health [3]
  •  
    Italy - until 16 April 2020, source: Italian National Institute of Health [4]
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 code

library(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.7, 2.5,  9.7, 22.2),
  spain=c(0.2, 0.3, 0.3, 0.3, 0.6, 1.3, 4.5, 14.2, 100*(4659+2012)/(19931+8130)),
  italy=c(0.1, 0.0, 0.1, 0.3, 0.9, 2.5, 9.5, 24.1, 100*(8070+2455)/(26706+9813))
)
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

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero 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.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current22:31, 21 April 2020Thumbnail for version as of 22:31, 21 April 2020512 × 410 (20 KB)Attomir (talk | contribs)another aspect ratio change
22:29, 21 April 2020Thumbnail for version as of 22:29, 21 April 2020512 × 384 (20 KB)Attomir (talk | contribs)smaller height
21:53, 21 April 2020Thumbnail for version as of 21:53, 21 April 2020512 × 512 (20 KB)Attomir (talk | contribs)bigger font
21:23, 21 April 2020Thumbnail for version as of 21:23, 21 April 2020512 × 410 (20 KB)Attomir (talk | contribs)Uploaded own work with UploadWizard

The following page uses this file:

Metadata