Difference between revisions of "Population of Europe by Country"
From Testiwiki
(Created page with '{{variable|moderator=|stub=Yes}} == Scope == ===Indices=== *Country *Year **2010, 2020, 2030, 2050 *Sex *Age *Growth rate **high, medium, low == Definition == === Data === …') |
(Added category: 'Data') |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{variable|moderator= | + | [[Category:Person or group]] |
+ | [[Category:Population characteristics]] | ||
+ | [[Category:Europe]] | ||
+ | [[Category:Mega case study]] | ||
+ | {{variable|moderator=Teemu R}} | ||
== Scope == | == Scope == | ||
− | ===Indices=== | + | What is the size of population of Europe by country, divided into subgroups by age and sex? |
+ | |||
+ | === Indices used === | ||
*Country | *Country | ||
− | *Year | + | *Year: 2010, 2020, 2030, 2050 |
− | |||
*Sex | *Sex | ||
*Age | *Age | ||
− | |||
− | |||
== Definition == | == Definition == | ||
Line 17: | Line 20: | ||
=== Data === | === Data === | ||
− | + | ''Main article: [[Population of Europe]].'' | |
+ | |||
+ | * Census data [http://www.integrated-assessment.eu/resource_centre/small_area_population_data] are available on LAU level 2 for the year 2001. | ||
+ | * UN data [http://esa.un.org/unpp/index.asp?panel=2] are available by country for the years 1950 to 2050. | ||
+ | * GWP(Gridded World Population) [http://sedac.ciesin.columbia.edu/gpw/global.jsp] data are available from CIESIN/SEDAC. | ||
+ | * EUROSTAT data [http://epp.eurostat.ec.europa.eu/tgm/table.do?tab=table&init=1&language=de&pcode=tps00002&plugin=1] and projections are available for all required years. | ||
+ | |||
+ | ===Dependencies=== | ||
+ | |||
+ | * Growth rate of population: it may be high, medium, or low. | ||
=== Unit === | === Unit === | ||
− | # | + | <nowiki>#</nowiki> |
+ | |||
+ | === Formula === | ||
+ | |||
+ | ==== Reducing EMEP 50 grid -indexed data to country indexed ==== | ||
+ | |||
+ | Constructed from data in [[Population of Europe]], by summing results for each country using the [[R]] code below. The code requires database functions described [[Opasnet Base Connection for R|here]]. | ||
+ | |||
+ | <nowiki> | ||
+ | locs <- op_baseGetLocs("opasnet_base", "Op_en3017") | ||
+ | countries <- locs[grep("CountryID", locs$ind),3] | ||
+ | i <- 1 | ||
+ | data <- op_baseGetData("opasnet_base", "Op_en3017", include = countries[i]) | ||
+ | data <- data[order(data[,3], data[,4], data[,7], data[,8], data[,9]),] | ||
+ | n <- data[gsub(" ", "", data[,"Age"])=="0-4",] | ||
+ | n <- n[gsub(" ", "", n[,"Rate"])=="h",] | ||
+ | n <- n[gsub(" ", "", n[,"Sex"])=="Female",] | ||
+ | n <- n[gsub(" ", "", n[,"Year"])=="2010",] | ||
+ | n <- nrow(n) | ||
+ | data2 <- data[1:(nrow(data)/n),c("Age","CountryID","Rate","Sex","Year","Result")] | ||
+ | for (j in 1:(nrow(data)/n)) { | ||
+ | data2[j,] <- data.frame(data[j*n-n+1,c("Age","CountryID","Rate","Sex","Year")], sum(data[(j*n-n+1):(j*n),"Result"])) | ||
+ | } | ||
+ | op_baseWrite("opasnet_base", data2, ident = "Op_en4691", name = "Population of Europe by country", unit = "#", objtype_id = 1, | ||
+ | who = "Teemu R", acttype = 4) | ||
+ | for (i in 2:length(countries)) { | ||
+ | data <- op_baseGetData("opasnet_base", "Op_en3017", include = countries[i]) | ||
+ | data <- data[order(data[,3], data[,4], data[,7], data[,8], data[,9]),] | ||
+ | n <- data[gsub(" ", "", data[,"Age"])=="0-4",] | ||
+ | n <- n[gsub(" ", "", n[,"Rate"])=="h",] | ||
+ | n <- n[gsub(" ", "", n[,"Sex"])=="Female",] | ||
+ | n <- n[gsub(" ", "", n[,"Year"])=="2010",] | ||
+ | n <- nrow(n) | ||
+ | data2 <- data[1:(nrow(data)/n),c("Age","CountryID","Rate","Sex","Year","Result")] | ||
+ | for (j in 1:(nrow(data)/n)) { | ||
+ | data2[j,] <- data.frame(data[j*n-n+1,c("Age","CountryID","Rate","Sex","Year")], sum(data[(j*n-n+1):(j*n),"Result"])) | ||
+ | } | ||
+ | op_baseWrite("opasnet_base", data2, ident = "Op_en4691", who = "Teemu R", acttype = 5) | ||
+ | }</nowiki> | ||
+ | |||
+ | ==== Reducing population scenarios to probabilistic interpretation of reality ==== | ||
+ | |||
+ | *Data generated by above code used for simplicity. | ||
+ | *Samples randomly picked from low, medium and high population growth rates with equal probabilities. | ||
+ | |||
+ | <nowiki> | ||
+ | pop <- op_baseGetData("opasnet_base", "Op_en4691", series_id = 596, include = 1367) | ||
+ | #Only data for all ages downloaded to conserve memory | ||
+ | poparray <- DataframeToArray(pop[,c("obs","Age","CountryID","Sex","Year","Rate","Result")]) | ||
+ | poparray[,"EE","Male","2050","m"] <- poparray[,"EE","All","2050","m"] - poparray[,"EE","Female","2050","m"] | ||
+ | poparray[,"EE","All","2050","h"] <- poparray[,"EE","Male","2050","h"] + poparray[,"EE","Female","2050","h"] | ||
+ | #There are some flaws in the original data, these are patched up above | ||
+ | n <- 5000 | ||
+ | finalarray <- array(poparray[,,,,sample(1:3, n, replace = TRUE)], dim = c(dim(poparray)[1:(length(dim(poparray))-1)], n)) | ||
+ | dimnames(finalarray) <- c(dimnames(poparray)[1:4], list(obs = 1:n)) | ||
+ | final <- as.data.frame(as.table(finalarray)) | ||
+ | nrow(final[is.na(final[,"Freq"]),])</nowiki> | ||
== Result == | == Result == | ||
Line 29: | Line 97: | ||
==See also== | ==See also== | ||
+ | ==Keywords== | ||
+ | Population, Europe, growth rate. | ||
==References== | ==References== | ||
<references/> | <references/> | ||
+ | |||
+ | ==Related files== | ||
+ | |||
+ | {{mfiles}} | ||
+ | [[Category:Data]] |
Latest revision as of 22:07, 22 March 2011
This page is a variable.
The page identifier is Op_en4691 |
---|
Moderator:Teemu R (see all) |
Give your opinion to the peer rating of the content of this page. |
Upload data
|
Contents
Scope
What is the size of population of Europe by country, divided into subgroups by age and sex?
Indices used
- Country
- Year: 2010, 2020, 2030, 2050
- Sex
- Age
Definition
Data
Main article: Population of Europe.
- Census data [1] are available on LAU level 2 for the year 2001.
- UN data [2] are available by country for the years 1950 to 2050.
- GWP(Gridded World Population) [3] data are available from CIESIN/SEDAC.
- EUROSTAT data [4] and projections are available for all required years.
Dependencies
- Growth rate of population: it may be high, medium, or low.
Unit
#
Formula
Reducing EMEP 50 grid -indexed data to country indexed
Constructed from data in Population of Europe, by summing results for each country using the R code below. The code requires database functions described here.
locs <- op_baseGetLocs("opasnet_base", "Op_en3017") countries <- locs[grep("CountryID", locs$ind),3] i <- 1 data <- op_baseGetData("opasnet_base", "Op_en3017", include = countries[i]) data <- data[order(data[,3], data[,4], data[,7], data[,8], data[,9]),] n <- data[gsub(" ", "", data[,"Age"])=="0-4",] n <- n[gsub(" ", "", n[,"Rate"])=="h",] n <- n[gsub(" ", "", n[,"Sex"])=="Female",] n <- n[gsub(" ", "", n[,"Year"])=="2010",] n <- nrow(n) data2 <- data[1:(nrow(data)/n),c("Age","CountryID","Rate","Sex","Year","Result")] for (j in 1:(nrow(data)/n)) { data2[j,] <- data.frame(data[j*n-n+1,c("Age","CountryID","Rate","Sex","Year")], sum(data[(j*n-n+1):(j*n),"Result"])) } op_baseWrite("opasnet_base", data2, ident = "Op_en4691", name = "Population of Europe by country", unit = "#", objtype_id = 1, who = "Teemu R", acttype = 4) for (i in 2:length(countries)) { data <- op_baseGetData("opasnet_base", "Op_en3017", include = countries[i]) data <- data[order(data[,3], data[,4], data[,7], data[,8], data[,9]),] n <- data[gsub(" ", "", data[,"Age"])=="0-4",] n <- n[gsub(" ", "", n[,"Rate"])=="h",] n <- n[gsub(" ", "", n[,"Sex"])=="Female",] n <- n[gsub(" ", "", n[,"Year"])=="2010",] n <- nrow(n) data2 <- data[1:(nrow(data)/n),c("Age","CountryID","Rate","Sex","Year","Result")] for (j in 1:(nrow(data)/n)) { data2[j,] <- data.frame(data[j*n-n+1,c("Age","CountryID","Rate","Sex","Year")], sum(data[(j*n-n+1):(j*n),"Result"])) } op_baseWrite("opasnet_base", data2, ident = "Op_en4691", who = "Teemu R", acttype = 5) }
Reducing population scenarios to probabilistic interpretation of reality
- Data generated by above code used for simplicity.
- Samples randomly picked from low, medium and high population growth rates with equal probabilities.
pop <- op_baseGetData("opasnet_base", "Op_en4691", series_id = 596, include = 1367) #Only data for all ages downloaded to conserve memory poparray <- DataframeToArray(pop[,c("obs","Age","CountryID","Sex","Year","Rate","Result")]) poparray[,"EE","Male","2050","m"] <- poparray[,"EE","All","2050","m"] - poparray[,"EE","Female","2050","m"] poparray[,"EE","All","2050","h"] <- poparray[,"EE","Male","2050","h"] + poparray[,"EE","Female","2050","h"] #There are some flaws in the original data, these are patched up above n <- 5000 finalarray <- array(poparray[,,,,sample(1:3, n, replace = TRUE)], dim = c(dim(poparray)[1:(length(dim(poparray))-1)], n)) dimnames(finalarray) <- c(dimnames(poparray)[1:4], list(obs = 1:n)) final <- as.data.frame(as.table(finalarray)) nrow(final[is.na(final[,"Freq"]),])
Result
See also
Keywords
Population, Europe, growth rate.
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>