Difference between revisions of "Mortality in Europe"
From Testiwiki
(Data uploaded using Opasnet Base Import) |
(updated based on Eurostat) |
||
Line 1: | Line 1: | ||
{{variable|moderator= Virpi Kollanus|stub=Yes}} | {{variable|moderator= Virpi Kollanus|stub=Yes}} | ||
− | == | + | == Question == |
− | + | What is the annual mortality rate in Europe per country and ICD10 category? | |
'''Indices | '''Indices | ||
− | *Country | + | *Country (Geo) |
− | *Cause of death | + | *Cause of death (Icd10) |
*Age | *Age | ||
*Sex | *Sex | ||
+ | *Year | ||
+ | *Unit of measurement (Unit) RT means standardised mortality rate. | ||
− | == | + | == Answer == |
+ | |||
+ | Example graphs from the data. [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=FGBT3vMEcUavCJLu] | ||
+ | |||
+ | <rcode graphics=1> | ||
+ | library(OpasnetUtils) | ||
+ | library(ggplot2) | ||
+ | |||
+ | d <- opbase.data("Op_en4635", subset = "d", include = list(Icd10 = c("W65-W74", "X60-X84_Y870", "X85-Y09_Y871"))) | ||
+ | d$Year <- as.factor(d$Year) | ||
+ | d$Result <- as.numeric(as.character(d$Result)) | ||
+ | |||
+ | ggplot(subset(d, Icd10 == "W65-W74"), aes(y = Result, x = Geo, colour = Year))+ geom_point() + labs(title="Drowning per 100000 py") | ||
+ | ggplot(subset(d, Icd10 == "X60-X84_Y870"), aes(y = Result, x = Geo, colour = Year))+ geom_point() + labs(title="Self-harm per 100000 py") | ||
+ | ggplot(subset(d, Icd10 == "X85-Y09_Y871"), aes(y = Result, x = Geo, colour = Year))+ geom_point() + labs(title="Assault per 100000 py") | ||
+ | |||
+ | </rcode> | ||
+ | |||
+ | == Rationale == | ||
=== Data === | === Data === | ||
− | [http:// | + | The main data comes from [http://ec.europa.eu/eurostat/data/database Eurostat] from where the file "Causes of death - standardised death rate per 100 000 inhabitants - annual Data (hlth_cd_asdr)" was downloaded on 12th Jan 2015 and stored in Opasnet base. |
− | + | '''Other data: | |
+ | [http://www.who.int/healthinfo/morttables/en/index.html WHO Mortality Database] | ||
=== Unit === | === Unit === | ||
− | Deaths/year | + | * Standardised incidence (1/100000py) |
+ | * Deaths/year | ||
− | === | + | === Calculations === |
+ | This code was used to manage the data before using the OpasnetBaseImport. | ||
− | + | {{hidden| | |
+ | <pre> | ||
+ | library(reshape2) | ||
+ | library(OpasnetUtils) | ||
+ | d <- read.table("//cesium/jtue$/_Downloads/hlth_cd_asdr.tsv", sep = "\t") | ||
+ | d1 <- strsplit(as.character(d$V1), split = ",") | ||
+ | d1 <- as.data.frame(t(array(unlist(d1), dim = c(length(d1[[1]]), length(d1))))) | ||
+ | colnames(d1) <- c("Unit", "Sex", "Age", "Icd10", "Geo") | ||
+ | colnames(d) <- c("Remove", 2010:1994) | ||
+ | d <- cbind(d1, d) | ||
+ | d$Remove <- NULL | ||
+ | d <- d[2:nrow(d) , ] | ||
+ | d <- melt(d, measure.vars = 6:ncol(d), variable.name = "Year", value.name = "Result") | ||
+ | d$Result <- gsub("[a-z]", "", d$Result) | ||
+ | d$Result[grepl(":", d$Result)] <- NA | ||
+ | d$Result <- as.numeric(d$Result) | ||
+ | d <- dropall(d) | ||
+ | write.csv(d, file = "//cesium/jtue$/_Documents/MortInEurope.csv", row.names = FALSE) | ||
+ | |||
+ | </pre> | ||
+ | }} | ||
==See also== | ==See also== | ||
Line 34: | Line 77: | ||
==References== | ==References== | ||
− | |||
− | |||
− | |||
<references/> | <references/> | ||
− | [[Category:Data]] | + | [[Category:Data]] |
Latest revision as of 12:12, 12 January 2015
This page is a variable.
The page identifier is Op_en4635 |
---|
Moderator:Virpi Kollanus (see all) |
This page is a stub. You may improve it into a full page, and then a rating bar will appear here. |
Upload data
|
Question
What is the annual mortality rate in Europe per country and ICD10 category?
Indices
- Country (Geo)
- Cause of death (Icd10)
- Age
- Sex
- Year
- Unit of measurement (Unit) RT means standardised mortality rate.
Answer
Example graphs from the data. [1]
Rationale
Data
The main data comes from Eurostat from where the file "Causes of death - standardised death rate per 100 000 inhabitants - annual Data (hlth_cd_asdr)" was downloaded on 12th Jan 2015 and stored in Opasnet base.
Other data:
Unit
- Standardised incidence (1/100000py)
- Deaths/year
Calculations
This code was used to manage the data before using the OpasnetBaseImport.
Show details |
---|
library(reshape2) library(OpasnetUtils) d <- read.table("//cesium/jtue$/_Downloads/hlth_cd_asdr.tsv", sep = "\t") d1 <- strsplit(as.character(d$V1), split = ",") d1 <- as.data.frame(t(array(unlist(d1), dim = c(length(d1[[1]]), length(d1))))) colnames(d1) <- c("Unit", "Sex", "Age", "Icd10", "Geo") colnames(d) <- c("Remove", 2010:1994) d <- cbind(d1, d) d$Remove <- NULL d <- d[2:nrow(d) , ] d <- melt(d, measure.vars = 6:ncol(d), variable.name = "Year", value.name = "Result") d$Result <- gsub("[a-z]", "", d$Result) d$Result[grepl(":", d$Result)] <- NA d$Result <- as.numeric(d$Result) d <- dropall(d) write.csv(d, file = "//cesium/jtue$/_Documents/MortInEurope.csv", row.names = FALSE) |