Population is defined as all nationals present in, or temporarily absent from a country, and aliens permanently settled in a country. This indicator shows the number of people that usually live in an area. Growth rates are the annual changes in population resulting from births, deaths and net migration during the year.

Total population includes the following:

  • national armed forces stationed abroad; merchant seamen at sea;
  • diplomatic personnel located abroad;
  • civilian aliens resident in the country;
  • displaced persons resident in the country.

However, it excludes the following:

  • foreign armed forces stationed in the country;
  • foreign diplomatic personnel located in the country;
  • civilian aliens temporarily in the country.

Population projections are a common demographic tool. They provide a basis for other statistical projections, helping governments in their decision making.

The Global Macro Database (GMDB) source returns a single total population series per country, in millions of people. The OECD source additionally breaks the total down by gender, giving a Population, Men and Women series for each country, and reports a plain count of persons rather than millions. Both are annual, and the OECD source uses the historical (observed) series rather than its projections.

See definition: https://data.oecd.org/pop/population.htm

It is also possible to get the data from the Global Macro Database (GMDB) by setting the gmdb_source to True.

Also known as: demographic data, census data.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Population for you. Just ask in plain English.

Calculate the Population in Python

The Population is available in the Economics module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_population_statistics as shown below.

from financetoolkit import Economics

economics = Economics(start_date='2010-01-01', end_date='2019-01-01')

economics.get_population_statistics(countries='Japan')

Which returns:

  Japan
2010 127.594
2011 127.831
2012 127.552
2013 127.333
2014 127.12
2015 126.978
2016 126.96
2017 126.746
2018 126.495
2019 126.221

Parameters

get_population_statistics accepts the following parameters:

  • countries (list[str] | str | None, optional): The countries to include in the data. Defaults to None.
  • gmdb_source (bool | None, optional): Whether to get the data from the Global Macro Database (GMDB).
  • rolling (int, optional): The rolling window size to use for smoothing the data (simple moving average). Defaults to None.
  • trailing (int, optional): The trailing window size to use for summing the data over trailing periods (e.g. a trailing-4-quarter sum). Defaults to None.
  • growth (bool, optional): Whether to return the growth data or the actual data.
  • lag (int, optional): The number of periods to lag the data by.
  • standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
  • rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.

The Economics module page introduces the module, and the sidebar lists all of its functions.

Share