Make Population Pyramid

Preparation

Cut the following incantations and paste on R script window, and run, in turn.

Step 0. - Install a package (pyramid) for making population pyramid

Step 1. - Call the package

Step 2. -  Read a population data. For a example, Japanese population data, "pop.japan.txt"

 

Make a population pyramid. For example, for 2020 population

2020 Japanese population pyramid

"pop.japan.txt" data file contains 1947-2020 population data.

Make 1947 Japanese population pyramid

1947 Japanese population pyramid

 

Look at other countries

Retruning to Step 2. -, we can see the following in a line.

Change pop.japan.txt. to any file name you choose from the table below. For example,

and, run the script that is given below. You can make 1959 Belarus population pyramid.

You can make population pyramid of the following country by selecting one name files and rewriting the script in this way.

 

Several countries' population file

CountryFile namePeri. yearsCountryFile namePeri. years
Belaruspop.belarus.txt1959-2019Latviapop.latvia.txt1959-2020
Estoniapop.estonia.txt1959-2020Lithuaniapop.lithuania.txt1959-2020
Finlandpop.finland.txt1878-2021New Zelandpop.newzeland.txt1948-2014
Francepop.france.txt1816-2019Polandpop.poland.txt1958-2020
Hong Kongpop.hongkong.txt1986-2020Russiapop.russia.txt1959-2015
Hungarypop.hungary.txt1950-2018Swedenpop.sweden.txt1751-2020
Icelandpop.iceland.txt1838-2019Taiwanpop.taiwan.txt1970-2020
Irelandpop.ireland.txt1950-2018USApop.usa.txt1933-2020
Japanpop.japan.txt1947-2020   

Source :http://www.mortality.org/