Inflation, consumer prices (annual %)

Source: worldbank.org, 01.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Afghanistan Afghanistan -6.6 +42.1% 158
Angola Angola 28.2 +107% 10
Albania Albania 2.21 -53.5% 105
United Arab Emirates United Arab Emirates 1.66 +2.25% 122
Armenia Armenia 0.27 -86.4% 151
Antigua & Barbuda Antigua & Barbuda 6.2 +22.3% 31
Australia Australia 3.16 -43.5% 74
Austria Austria 2.94 -62.4% 82
Azerbaijan Azerbaijan 2.21 -74.8% 106
Burundi Burundi 20.2 -25% 15
Belgium Belgium 3.14 -22.4% 76
Benin Benin 1.16 -57.6% 135
Burkina Faso Burkina Faso 4.19 +464% 52
Bangladesh Bangladesh 10.5 +5.89% 21
Bulgaria Bulgaria 2.45 -74.1% 97
Bahrain Bahrain 0.92 +1,132% 142
Bahamas Bahamas 0.409 -86.6% 149
Bosnia & Herzegovina Bosnia & Herzegovina 1.69 -72.3% 120
Belarus Belarus 5.79 +15.7% 34
Belize Belize 3.29 -25.1% 69
Bolivia Bolivia 5.1 +97.9% 37
Brazil Brazil 4.37 -4.92% 48
Barbados Barbados -0.462 -105% 157
Brunei Brunei -0.389 -209% 154
Bhutan Bhutan 2.76 -34.7% 91
Botswana Botswana 2.82 -44.4% 89
Canada Canada 2.38 -38.6% 101
Switzerland Switzerland 1.06 -50.3% 138
Chile Chile 4.3 -43.3% 50
China China 0.218 -7.11% 152
Côte d’Ivoire Côte d’Ivoire 3.47 -21% 64
Cameroon Cameroon 4.53 -38.6% 45
Congo - Brazzaville Congo - Brazzaville 3.09 -28.1% 77
Colombia Colombia 6.61 -43.7% 29
Cape Verde Cape Verde 1.05 -71.9% 139
Costa Rica Costa Rica -0.413 -179% 155
Cyprus Cyprus 1.8 -49.2% 117
Czechia Czechia 2.44 -77.2% 98
Germany Germany 2.26 -62.1% 103
Djibouti Djibouti 2.08 +38.9% 110
Dominica Dominica 2.59 -49.1% 95
Denmark Denmark 1.37 -58.5% 129
Dominican Republic Dominican Republic 3.3 -31% 68
Algeria Algeria 4.05 -56.6% 54
Ecuador Ecuador 1.55 -30.2% 127
Egypt Egypt 28.3 -16.6% 9
Spain Spain 2.77 -21.5% 90
Estonia Estonia 3.52 -61.6% 62
Ethiopia Ethiopia 21 -30.4% 14
Finland Finland 1.57 -75% 125
Fiji Fiji 4.51 +92.5% 46
France France 2 -59% 114
Gabon Gabon 1.17 -67.7% 134
United Kingdom United Kingdom 3.27 -51.8% 70
Georgia Georgia 1.11 -55.4% 136
Ghana Ghana 22.8 -40% 13
Guinea Guinea 8.12 +4.08% 26
Gambia Gambia 11.6 -31.9% 20
Guinea-Bissau Guinea-Bissau 3.77 -47% 57
Greece Greece 2.74 -20.9% 93
Grenada Grenada 1.09 -59.7% 137
Guatemala Guatemala 2.87 -53.8% 87
Guyana Guyana 2.9 +2.94% 84
Hong Kong SAR China Hong Kong SAR China 1.73 -17.5% 119
Honduras Honduras 4.61 -30.9% 44
Croatia Croatia 2.97 -62.6% 80
Haiti Haiti 26.9 -26.8% 11
Hungary Hungary 3.7 -78.4% 58
India India 4.95 -12.3% 38
Ireland Ireland 2.11 -66.5% 109
Iran Iran 32.5 -27.2% 6
Iceland Iceland 5.86 -33% 33
Israel Israel 3.06 -27.3% 78
Italy Italy 0.982 -82.5% 141
Jamaica Jamaica 5.41 -16.4% 36
Jordan Jordan 1.56 -25.3% 126
Japan Japan 2.74 -16.2% 94
Kazakhstan Kazakhstan 8.84 -40% 25
Kenya Kenya 4.49 -41.5% 47
South Korea South Korea 2.32 -35.5% 102
Kuwait Kuwait 2.9 -20.4% 85
Laos Laos 23.1 -25.9% 12
Lebanon Lebanon 45.2 -79.6% 4
Libya Libya 2.13 -10.4% 108
St. Lucia St. Lucia -0.11 -103% 153
Sri Lanka Sri Lanka -0.429 -103% 156
Lesotho Lesotho 6.11 -3.73% 32
Lithuania Lithuania 0.716 -92.1% 145
Luxembourg Luxembourg 2.05 -45.2% 112
Latvia Latvia 1.27 -85.8% 132
Morocco Morocco 0.985 -83.8% 140
Moldova Moldova 4.68 -65.1% 41
Maldives Maldives 1.4 -52.2% 128
Mexico Mexico 4.72 -14.6% 40
North Macedonia North Macedonia 3.49 -62.7% 63
Mali Mali 3.21 +55.7% 72
Malta Malta 1.65 -67.6% 123
Montenegro Montenegro 3.34 -61.1% 66
Mongolia Mongolia 6.8 -34.3% 28
Mozambique Mozambique 4.08 -42.8% 53
Mauritania Mauritania 2.49 -49.7% 96
Mauritius Mauritius 3.58 -49.2% 61
Malawi Malawi 32.2 +11.8% 7
Malaysia Malaysia 1.83 -26.3% 116
Namibia Namibia 4.24 -27.9% 51
Niger Niger 9.07 +145% 23
Nigeria Nigeria 33.2 +34.8% 5
Nicaragua Nicaragua 4.62 -44.9% 43
Netherlands Netherlands 3.35 -12.8% 65
Norway Norway 3.15 -43% 75
New Zealand New Zealand 2.92 -49% 83
Pakistan Pakistan 12.6 -58.9% 19
Panama Panama 0.693 -53.4% 146
Peru Peru 2.01 -68.9% 113
Philippines Philippines 3.21 -46.3% 71
Palau Palau 2.23 -82.6% 104
Papua New Guinea Papua New Guinea 0.602 -73.8% 147
Poland Poland 3.79 -67.1% 56
Portugal Portugal 2.42 -44% 99
Paraguay Paraguay 3.84 -17.2% 55
Palestinian Territories Palestinian Territories 53.7 +814% 3
Qatar Qatar 1.27 -58.1% 131
Romania Romania 5.72 -45% 35
Rwanda Rwanda 1.77 -91.1% 118
Saudi Arabia Saudi Arabia 1.69 -27.5% 121
Senegal Senegal 0.805 -86.5% 144
Singapore Singapore 2.39 -50.6% 100
Sierra Leone Sierra Leone 28.6 -39.9% 8
El Salvador El Salvador 0.854 -78.9% 143
San Marino San Marino 1.24 -79.1% 133
Serbia Serbia 4.67 -62.2% 42
South Sudan South Sudan 91.4 +3,738% 1
São Tomé & Príncipe São Tomé & Príncipe 14.4 -32.5% 18
Suriname Suriname 16.2 -68.5% 16
Slovakia Slovakia 2.76 -73.8% 92
Slovenia Slovenia 1.97 -73.6% 115
Sweden Sweden 2.84 -66.8% 88
Seychelles Seychelles 0.312 -130% 150
Chad Chad 8.9 -17.9% 24
Togo Togo 2.87 -45.9% 86
Thailand Thailand 1.37 -83.9% 130
Timor-Leste Timor-Leste 2.06 -75.5% 111
Tonga Tonga 3.18 -49.9% 73
Trinidad & Tobago Trinidad & Tobago 0.527 -88.6% 148
Tunisia Tunisia 7.21 -22.8% 27
Turkey Turkey 58.5 +8.63% 2
Tanzania Tanzania 3.06 -19.5% 79
Uganda Uganda 3.32 -37.9% 67
Ukraine Ukraine 6.5 -49.4% 30
Uruguay Uruguay 4.85 -17.4% 39
United States United States 2.95 -28.3% 81
Uzbekistan Uzbekistan 9.63 -3.3% 22
St. Vincent & Grenadines St. Vincent & Grenadines 3.63 -20.5% 59
Vietnam Vietnam 3.62 +11.3% 60
Samoa Samoa 2.17 -72.6% 107
Kosovo Kosovo 1.62 -67.2% 124
South Africa South Africa 4.36 -28.2% 49
Zambia Zambia 15 +37.7% 17

Inflation, measured as the annual percentage change in consumer prices, is a critical economic indicator that reflects the rate at which the general level of prices for goods and services is rising. Understanding this indicator is essential not only for economists and policymakers but also for businesses and consumers, as it impacts purchasing power, savings, and overall economic health.

Inflation plays a vital role in the economy. Moderate inflation is often seen as a sign of a growing economy, as it typically accompanies increased consumer spending and business investment. However, when inflation becomes too high, it can erode purchasing power, leading to uncertainty in economic decision-making. Consequently, managing inflation is a key priority for central banks, often using monetary policies such as interest rate adjustments to maintain stable economic conditions.

Inflation does not exist in isolation; it intertwines with numerous other economic indicators. For instance, the unemployment rate can be related to inflation through the Phillips curve, which suggests an inverse relationship between unemployment and inflation. Additionally, inflation is closely linked to interest rates; as inflation rises, central banks may increase interest rates to tame it, which in turn affects consumer spending and borrowing costs. Moreover, inflation affects real incomes, pushing up costs for households while potentially making exports less competitive on international markets due to rising consumer prices.

Several factors influence inflation, including demand-pull inflation, cost-push inflation, and built-in inflation. Demand-pull inflation occurs when the demand for goods and services exceeds supply, often seen in a booming economy. Cost-push inflation is a result of rising production costs, such as increases in wages or raw materials, forcing businesses to raise prices. Built-in inflation refers to the cycle of wage increases leading to higher costs for goods and services, further perpetuating inflation. Global factors such as supply chain disruptions, geopolitical events, and monetary policies in major economies can also significantly impact local inflation rates.

To manage inflation effectively, governments and central banks may implement various strategies. Monitoring inflation trends is crucial for informed decision-making. A combination of fiscal policies, such as reducing government spending, and monetary policies, like adjusting interest rates, are typical approaches to combat rising inflation. Additionally, enhancing productivity and increasing the efficiency of supply chains can mitigate cost-push factors contributing to inflation. Long-term solutions may also involve investing in technology and infrastructure to foster sustainable economic growth without triggering excessive inflation.

Despite the strategies to control it, there are flaws and challenges inherent in managing inflation. Policymakers often face a trade-off between controlling inflation and promoting employment and growth. Sudden or aggressive measures to curb inflation can lead to recession, as higher interest rates may stifle borrowing and spending. Furthermore, inflation measurement itself can be contentious; the Consumer Price Index (CPI), commonly used to track inflation, may not accurately represent the experiences of all consumers or sufficiently account for changes in consumption patterns.

In 2023, the global median inflation rate is recorded at 5.64%. This figure illustrates the continuing effects of various pressures on consumer prices post-COVID-19 pandemic, following a noted spike in inflation in 2022, when it reached 7.93%. Among countries, Lebanon stands out with an astronomical inflation rate of 221.34%, indicating extreme economic instability. Such a high rate often suggests severe supply shortages, a collapsing currency, or significant geopolitical turmoil.

Turkey also experiences high inflation at 53.86%, driven by factors that include political instability and currency depreciation, leading to higher costs for imported goods. Suriname, Sierra Leone, and Iran round out the top five areas with inflation rates above 40%, each facing unique economic challenges that contribute to rising prices.

Conversely, the lowest inflation rates are observed in Seychelles (-1.04%), Bahrain (0.07%), China (0.23%), Brunei (0.36%), and Macao SAR China (0.48%). Negative inflation, or deflation, as seen in Seychelles, can indicate lower consumer demand, leading businesses to lower prices in an effort to attract buyers. In these cases, prolonged deflation can be detrimental to an economy, as it might discourage spending and investment.

The historical data on global inflation rates raises a number of observations about its trends. Since the 1980s, the world has experienced significant fluctuations in inflation rates. For example, inflation peaked at 12.44% in 1981, gradually decreasing throughout the years, reaching a low of 1.44% in 2015. The gradual increase in inflation rates observed from 2020 onwards, culminating in the current median rate of 5.64%, reflects not only the economic fallout from the pandemic but also supply chain disruptions, energy crises, and geopolitical tensions impacting global markets.

In conclusion, monitoring inflation rates is pivotal for understanding economic health. Its interplay with various economic indicators highlights the complexity of economic management. Addressing the challenges of inflation requires a multifaceted approach that considers both immediate solutions and long-term strategies to ensure sustainable growth while protecting consumers' purchasing power.

                    
# Install missing packages
import sys
import subprocess

def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])

# Required packages
for package in ['wbdata', 'country_converter']:
try:
__import__(package)
except ImportError:
install(package)

# Import libraries
import wbdata
import country_converter as coco
from datetime import datetime

# Define World Bank indicator code
dataset_code = 'FP.CPI.TOTL.ZG'

# Download data from World Bank API
data = wbdata.get_dataframe({dataset_code: 'value'},
date=(datetime(1960, 1, 1), datetime.today()),
parse_dates=True,
keep_levels=True).reset_index()

# Extract year
data['year'] = data['date'].dt.year

# Convert country names to ISO codes using country_converter
cc = coco.CountryConverter()
data['iso2c'] = cc.convert(names=data['country'], to='ISO2', not_found=None)
data['iso3c'] = cc.convert(names=data['country'], to='ISO3', not_found=None)

# Filter out rows where ISO codes could not be matched — likely not real countries
data = data[data['iso2c'].notna() & data['iso3c'].notna()]

# Sort for calculation
data = data.sort_values(['iso3c', 'year'])

# Calculate YoY absolute and percent change
data['value_change'] = data.groupby('iso3c')['value'].diff()
data['value_change_percent'] = data.groupby('iso3c')['value'].pct_change() * 100

# Calculate ranks (higher GDP per capita = better rank)
data['rank'] = data.groupby('year')['value'].rank(ascending=False, method='dense')

# Calculate rank change from previous year
data['rank_change'] = data.groupby('iso3c')['rank'].diff()

# Select desired columns
final_df = data[['country', 'iso2c', 'iso3c', 'year', 'value',
'value_change', 'value_change_percent', 'rank', 'rank_change']].copy()

# Optional: Add labels as metadata (could be useful for export or UI)
column_labels = {
'country': 'Country name',
'iso2c': 'ISO 2-letter country code',
'iso3c': 'ISO 3-letter country code',
'year': 'Year',
'value': 'GDP per capita (current US$)',
'value_change': 'Year-over-Year change in value',
'value_change_percent': 'Year-over-Year percent change in value',
'rank': 'Country rank by GDP per capita (higher = richer)',
'rank_change': 'Change in rank from previous year'
}

# Display first few rows
print(final_df.head(10))

# Optional: Save to CSV
#final_df.to_csv("gdp_per_capita_cleaned.csv", index=False)
                    
                
                    
# Check and install required packages
required_packages <- c("WDI", "countrycode", "dplyr")

for (pkg in required_packages) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    install.packages(pkg)
  }
}

# Load the necessary libraries
library(WDI)
library(dplyr)
library(countrycode)

# Define the dataset code (World Bank indicator code)
dataset_code <- 'FP.CPI.TOTL.ZG'

# Download data using WDI package
dat <- WDI(indicator = dataset_code)

# Filter only countries using 'is_country' from countrycode
# This uses iso2c to identify whether the entry is a recognized country
dat <- dat %>%
  filter(countrycode(iso2c, origin = 'iso2c', destination = 'country.name', warn = FALSE) %in%
           countrycode::codelist$country.name.en)

# Ensure dataset is ordered by country and year
dat <- dat %>%
  arrange(iso3c, year)

# Rename the dataset_code column to "value" for easier manipulation
dat <- dat %>%
  rename(value = !!dataset_code)

# Calculate year-over-year (YoY) change and percentage change
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(
    value_change = value - lag(value),                              # Absolute change from previous year
    value_change_percent = 100 * (value - lag(value)) / lag(value) # Percent change from previous year
  ) %>%
  ungroup()

# Calculate rank by year (higher value => higher rank)
dat <- dat %>%
  group_by(year) %>%
  mutate(rank = dense_rank(desc(value))) %>% # Rank countries by descending value
  ungroup()

# Calculate rank change (positive = moved up, negative = moved down)
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(rank_change = rank - lag(rank)) %>% # Change in rank compared to previous year
  ungroup()

# Select and reorder final columns
final_data <- dat %>%
  select(
    country,
    iso2c,
    iso3c,
    year,
    value,
    value_change,
    value_change_percent,
    rank,
    rank_change
  )

# Add labels (variable descriptions)
attr(final_data$country, "label") <- "Country name"
attr(final_data$iso2c, "label") <- "ISO 2-letter country code"
attr(final_data$iso3c, "label") <- "ISO 3-letter country code"
attr(final_data$year, "label") <- "Year"
attr(final_data$value, "label") <- "GDP per capita (current US$)"
attr(final_data$value_change, "label") <- "Year-over-Year change in value"
attr(final_data$value_change_percent, "label") <- "Year-over-Year percent change in value"
attr(final_data$rank, "label") <- "Country rank by GDP per capita (higher = richer)"
attr(final_data$rank_change, "label") <- "Change in rank from previous year"

# Print the first few rows of the final dataset
print(head(final_data, 10))