Total Consumption
Get the Total Consumption for a variety of countries over time from the Global Macro Database (GMDB). Total Consumption is the total amount of money spent by households on consumer goods and services.
The level is annual and expressed in millions of national currency, so levels are not comparable across countries with different currencies, but growth rates are.
Data comes from the Global Macro Database (GMDB), further information about the variable can be found within https://www.globalmacrodata.com/documentation.html
Also known as: household consumption, private consumption.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Total Consumption for you. Just ask in plain English.
Calculate the Total Consumption in Python
The Total Consumption is available in the Economics module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_total_consumption as shown below.
from financetoolkit import Economics
economics = Economics(start_date='2018-01-01')
total_consumption = economics.get_total_consumption()
total_consumption.loc[:, ['Netherlands', 'France', 'Poland']]
Which returns:
| Netherlands | France | Poland | |
|---|---|---|---|
| 2018 | 542949 | 1.84554e+06 | 1.64362e+06 |
| 2019 | 566538 | 1.888e+06 | 1.75043e+06 |
| 2020 | 558446 | 1.82958e+06 | 1.78522e+06 |
| 2021 | 606798 | 1.95042e+06 | 1.99581e+06 |
| 2022 | 679345 | 2.087e+06 | 2.36461e+06 |
| 2023 | 735272 | 2.2254e+06 | 2.60968e+06 |
| 2024 | 776464 | 2.29617e+06 | 2.80908e+06 |
| 2025 | 804450 | 2.3712e+06 | 3.03317e+06 |
Parameters
get_total_consumption accepts the following parameters:
- countries (list[str] | str | None, optional): A list of countries or a single country to include in the results. Defaults to None.
- inflation_adjusted (bool, optional): Whether to return the inflation adjusted data. Defaults to False.
- 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. Defaults to False.
- lag (int, optional): The number of periods to lag the growth data. Defaults to 1.
- 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.
Related Government
The Economics module page introduces the module, and the sidebar lists all of its functions.