Population of Finland: Difference between revisions

From Opasnet
Jump to navigation Jump to search
 
(36 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Population characteristics]]
[[Category: CLAIH]]
[[Category:Contains R code]]
[[Category:Code under inspection]]
{{variable|moderator = Virpi Kollanus}}
{{variable|moderator = Virpi Kollanus}}


[[Category: CLAIH]]
==Question==
 
What is the population size and age structure of the population of Finland? What is the life expectancy in the population?
 
==Answer==
 
<t2b name="Population" index="Age,Observation" locations="Result" unit="#">
0-4|267686
5-9|309010
10-14|305538
15-64|3430848
65-79|902127
80+|302710
</t2b>
 
== Rationale ==
 
* [http://pxweb2.stat.fi/database/StatFin/vrm/vaerak/vaerak_fi.asp Statistics of Finland]
* Population of Finland in the end of 2018
 
=== Data===
 
In 2017, the life expectancy for children born was 78.7 years for males and 84.2 years for females.
 
=== Formula ===
 
'''Total population in Finland
 
<rcode name="population" embed=1>
 
# This is code Op_en2949/population on page [[Population of Finland]]
library(OpasnetUtils)
 
# Read population data 2018 from Statistics Finland
# Run this code on your computer to get the data in the answer.
#vae <- re#ad.csv("https://pxnet2.stat.fi:443/PXWeb/sq/ac3373d0-e303-4c67-b32a-73c6d26df809", skip=2, fileEncoding="ISO-8859-1")
#vae$Ikä <- as.numeric(gsub(" -","",as.character(vae$Ikä)))
 
#population <-data.frame(Age=c("0-4", "5-9", "10-14", "15-24", "25-64", "65-79", "80+", "Total population", "Females", "Males"),
#                        N.of.people=c(
#                          sum(vae$X2018[vae$Ikä>=0 & vae$Ikä <5]), # Age 0-4
#                          sum(vae$X2018[vae$Ikä>=5 & vae$Ikä <10]), # Age 5-9
#                                        sum(vae$X2018[vae$Ikä>=10 & vae$Ikä <15]), # Age 5-14
#                                        sum(vae$X2018[vae$Ikä>=15 & vae$Ikä <25]), # Age 15-24
#                                        sum(vae$X2018[vae$Ikä>=25 & vae$Ikä <65]), # Age 25-64
#                                        sum(vae$X2018[vae$Ikä>=65 & vae$Ikä <80]), # Age 65-79
#                                        sum(vae$X2018[vae$Ikä>=80 & vae$Ikä <101]), # Age 80+
#                                        sum(vae$X2018), # Total population
#                                        sum(vae$X2018[vae$Sukupuoli=="Naiset"]), #Females
#                                        sum(vae$X2018[!(vae$Sukupuoli=="Naiset")]) #Non female
#                                        )
#                          )
 
# Save the data presented in the table on this page as an ovariable


== Scope ==
population <- Ovariable(
  "population",
  ddata="Op_en2949", subset="Population"
)


Describes the population number in Finland.
objects.store(population)
cat("Ovariable population stored.\n")
</rcode>


'''Dimensions and boundaries'''
'''Population parameters per municipality


*Time
<rcode graphics="1" variables="
**Year 2009
name:year|description:Which year (1980-2010)?|default:2010|
**Year 2030
name:parameter|description:Which parameter to show?|type:selection|default:'Luonnollinen väestönlisäys'|options:'Elävänä syntyneet';Elävänä syntyneet;'Kuolleet';Kuolleet;'Luonnollinen väestönlisäys';Luonnollinen väestönlisäys;'Kuntien välinen tulomuutto';Kuntien välinen tulomuutto;'Kuntien välinen lähtömuutto';Kuntien välinen lähtömuutto;'Kuntien välinen nettomuutto';Kuntien välinen nettomuutto;'Nettosiirtolaisuus';Nettosiirtolaisuus;'Kokonaisnettomuutto';Kokonaisnettomuutto;'Väestönlisäys';Väestönlisäys;'Väkiluvun korjaus';Väkiluvun korjaus;'Kokonaismuutos';Kokonaismuutos;'Väkiluku';Väkiluku
*Spatial
">
**250*250 m grids?
# (C) 2011 Leo Lahti <leo.lahti[at]iki.fi> All rights reserved.
*Age
# License: FreeBSD, http://en.wikipedia.org/wiki/BSD_licenses
**1-year interval
*Gender
**Male
**Female


== Definition ==
# Tama esimerkki on testattu sorvi-paketin versiolla 0.1.23


=== Data ===
# Esimerkki Suomen kuntatason vaestonkasvutilastojen (Tilastokeskus)
# visualisoinnista Maanmittauslaitoksen karttadatalla (vuonna 2010)


*[http://pxweb2.stat.fi/database/StatFin/vrm/vaerak/vaerak_fi.asp Statistics of Finland]
# Lataa kirjastoja
library(sorvi)
library(OpasnetBaseUtils)


=== Causality ===
###############################################


# Lue Suomen kuntarajat SpatialPolygon-muodossa
# (C) Maanmittauslaitos 2011
# http://www.maanmittauslaitos.fi/aineistot-palvelut/digitaaliset-tuotteet/ilmaiset-aineistot/hankinta
data(MML)
sp <- MML[["1_milj_Shape_etrs_shape"]][["kunta1_p"]]


=== Unit ===
#################################################


Persons
# Lue kuntatason vaestonkasvutiedot tilastokeskuksen StatFin-tietokannasta
# http://www.stat.fi/tup/statfin/index.html
# PC Axis-muodossa
px <- statfin.px("vrm/synt/080_synt_tau_203_fi.px")
# statfin.px-funktio käyttää soRvin read.px-funktiota hakemaan dataa URLista, joka alkaa "http://pxweb2.stat.fi/database/StatFin/"
# URLin loppuosa pitää antaa statfin.px:lle parametrina.
# Poimi taulukosta halutut tiedot
# pxs <- subset(as.data.frame(px), Väestönmuutos.ja.väkiluku == "Luonnollinen väestönlisäys" & Vuosi == year)
pxs <- subset(as.data.frame(px), Väestönmuutos.ja.väkiluku == parameter & Vuosi == year)
# Putsaa data
vaestonkasvu <- preprocess.px(pxs)


=== Formula ===
################################################


Algebra or other explicit methods if possible
# Lisaa tiedot karttaobjektiin
(e.g. [[Analytica]] code between the <nowiki>''<anacode></anacode>''</nowiki> delimiters).
sp@data$vaestonkasvu <- vaestonkasvu$dat[match(sp$Kunta.FI, vaestonkasvu$Alue)]
# Korvaa puuttuvat arvot nollalla
sp[["vaestonkasvu"]][is.na(sp[["vaestonkasvu"]])] <- 0


== Result ==
################################################


# Maarittele varipaletti
my.palette <- colorRampPalette(c("blue", "white", "red"), space = "rgb")
ncol <- 40 # Number of colors


Based on [[WHO mortality data]].
#################################################


{| {{prettytable}}
# Piirra kuva
|+ Population of Finland, year 2006.
varname <- "vaestonkasvu"
|----
int <- max(abs(sp[[varname]]))
! Age group
q <- spplot(sp, varname,
! Male
      col.regions = my.palette(ncol),
! Female
      main = paste(parameter, year, sep=" "),
|----
      colorkey = TRUE,
| All ages
      lwd = .4,
| 2.578046e+006
      col = "black",
| 2.688222e+006
      at = seq(0 - int, 0 + int, length = ncol)
|----
)
| 0
| 2.9679e+004
| 2.8585e+004
|----
| 1
| 2.9589e+004
| 2.8317e+004
|----
| 2
| 2.9389e+004
| 2.8145e+004
|----
| 3
| 2.8895e+004
| 2.7655e+004
|----
| 4
| 2.8819e+004
| 2.7468e+004
|----
| 5-9
| 1.48775e+005
| 1.42543e+005
|----
| 10-14
| 1.66242e+005
| 1.59946e+005
|----
| 15-19
| 1.65131e+005
| 1.58014e+005
|----
| 20-24
| 1.70285e+005
| 1.62685e+005
|----
| 25-29
| 1.69301e+005
| 1.6177e+005
|----
| 30-34
| 1.603e+005
| 1.51989e+005
|----
| 35-39
| 1.741e+005
| 1.67997e+005
|----
| 40-44
| 1.91361e+005
| 1.85532e+005
|----
| 45-49
| 1.90173e+005
| 1.87035e+005
|----
| 50-54
| 1.96544e+005
| 1.96084e+005
|----
| 55-59
| 2.06127e+005
| 2.07356e+005
|----
| 60-64
| 1.49366e+005
| 1.56139e+005
|----
| 65-69
| 1.17412e+005
| 1.33354e+005
|----
| 70-74
| 9.1169e+004
| 1.14678e+005
|----
| 75-79
| 7.1905e+004
| 1.09699e+005
|----
| 80-84
| 4.1144e+004
| 8.4416e+004
|----
| 85-89
| 1.6463e+004
| 4.6117e+004
|----
| 90-94
| 4986
| 1.8407e+004
|----
| 95 &amp;+
| 898
| 4297
|----
| Unknown
| 0
| 0
|----
|}


{| {{prettytable}}
print(q)
|+ '''Population of Finland during the H1N1 pandemic and related narcolepsy cluster (~2009-2010?)<ref name="THL report">Kansallisen
</rcode>
narkolepsiatyöryhmän
väliraportti 31.1.2011</ref>'''
! Age group !! Population
|----
| 0-4 || 298114
|----
| 5-9 || 287786
|----
| 10-14 || 302423
|----
| 15-19 || 334636
|----
| 20-24 || 324472
|----
| 25-29 || 344634
|----
| 30-34 || 337970
|----
| 35-39 || 310768
|----
| 40-44 || 358754
|----
| 45-49 || 378341
|----
| 50-54 || 378037
|----
| 55-59 || 388165
|----
| 60-64 || 396886
|----
| 65-69 || 258319
|----
| 70-74 || 225043
|----
| 75-79 || 179671
|----
| 80- || 247408
|----
| All || 5351427
|----
|}


==See also==
==See also==


[http://en.opasnet.org/w/File:Population_of_Finalnd_2008.xls Population 2008 with one year intervals male/female, excel sheet]
* [http://en.opasnet.org/w/File:Population_of_Finalnd_2008.xls Population 2008 with one year intervals male/female, excel sheet]
 
* www.stat.fi ->  [http://pxweb2.stat.fi/Dialog/varval.asp?ma=050_vaerak_tau_104_fi&ti=V%E4est%F6+i%E4n+%281%2Dv%2E%29+ja+sukupuolen+mukaan+alueittain+1980+%2D+2008&path=../Database/StatFin/vrm/vaerak/&lang=3&multilang=fi PX Web database]
www.stat.fi ->  [http://pxweb2.stat.fi/Dialog/varval.asp?ma=050_vaerak_tau_104_fi&ti=V%E4est%F6+i%E4n+%281%2Dv%2E%29+ja+sukupuolen+mukaan+alueittain+1980+%2D+2008&path=../Database/StatFin/vrm/vaerak/&lang=3&multilang=fi PX Web database]


==References==
==References==
Will appear here automatically, if cited above using the ''<nowiki><ref></ref></nowiki>'' tags.
Additional references can also be listed here.


<references/>
<references/>

Latest revision as of 05:56, 28 August 2019



Question

What is the population size and age structure of the population of Finland? What is the life expectancy in the population?

Answer

Population(#)
ObsAgeResult
10-4267686
25-9309010
310-14305538
415-643430848
565-79902127
680+302710

Rationale

Data

In 2017, the life expectancy for children born was 78.7 years for males and 84.2 years for females.

Formula

Total population in Finland

+ Show code

Population parameters per municipality

Which year (1980-2010)?:

Which parameter to show?:

+ Show code

See also

References