Population of Europe by Country

From Opasnet
Jump to: navigation, search



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

Show results


See also

Keywords

Population, Europe, growth rate.

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>