Rule of Law

Source: worldbank.org, 07.12.2025

Year: 2023

Flag Country Value Value change, % Rank
Aruba Aruba 1.27 -0.612% 25
Afghanistan Afghanistan -1.65 -0.615% 191
Angola Angola -1.1 +7.54% 171
Albania Albania -0.164 -0.898% 107
Andorra Andorra 1.48 -0.578% 18
United Arab Emirates United Arab Emirates 0.882 +5.48% 40
Argentina Argentina -0.411 -14.8% 124
Armenia Armenia -0.122 -28% 100
American Samoa American Samoa 1.21 -0.706% 28
Antigua & Barbuda Antigua & Barbuda 0.379 -3.12% 77
Australia Australia 1.52 +0.952% 17
Austria Austria 1.75 +2.48% 7
Azerbaijan Azerbaijan -0.567 -9.43% 140
Burundi Burundi -1.25 -2% 179
Belgium Belgium 1.3 -3.92% 23
Benin Benin -0.506 -15.2% 134
Burkina Faso Burkina Faso -0.742 +21.2% 150
Bangladesh Bangladesh -0.503 -16.5% 133
Bulgaria Bulgaria -0.00686 -93.6% 90
Bahrain Bahrain 0.469 +6.95% 65
Bahamas Bahamas 0.18 +33.5% 86
Bosnia & Herzegovina Bosnia & Herzegovina -0.352 +14.6% 120
Belarus Belarus -1.25 +2.45% 178
Belize Belize -0.636 -11.7% 143
Bermuda Bermuda 0.684 -1.26% 48
Bolivia Bolivia -1.22 -6.31% 177
Brazil Brazil -0.309 +19.7% 115
Barbados Barbados 0.414 +15.2% 72
Brunei Brunei 0.887 -5.02% 39
Bhutan Bhutan 0.668 -0.873% 50
Botswana Botswana 0.39 -15% 74
Central African Republic Central African Republic -1.76 +3.51% 195
Canada Canada 1.47 -5.86% 19
Switzerland Switzerland 1.76 +0.602% 4
Chile Chile 0.625 -9.2% 53
China China -0.0401 -4.85% 92
Côte d’Ivoire Côte d’Ivoire -0.461 -2.7% 129
Cameroon Cameroon -1.04 -0.071% 167
Congo - Kinshasa Congo - Kinshasa -1.67 -0.0627% 192
Congo - Brazzaville Congo - Brazzaville -1.02 -6.4% 164
Colombia Colombia -0.458 +7.13% 128
Comoros Comoros -1.34 +2.03% 184
Cape Verde Cape Verde 0.4 +0.362% 73
Costa Rica Costa Rica 0.389 -10.7% 76
Cuba Cuba -0.453 -1.82% 127
Cayman Islands Cayman Islands 0.722 +0.0991% 45
Cyprus Cyprus 0.628 +10.2% 52
Czechia Czechia 1.14 +3.8% 30
Germany Germany 1.55 +1.25% 15
Djibouti Djibouti -1.13 +2.04% 173
Dominica Dominica 0.625 -14.9% 54
Denmark Denmark 1.91 +0.492% 2
Dominican Republic Dominican Republic -0.129 +37.7% 102
Algeria Algeria -0.678 -18.6% 146
Ecuador Ecuador -0.958 +54.3% 161
Egypt Egypt -0.184 -30.7% 110
Eritrea Eritrea -1.76 -0.621% 196
Spain Spain 0.823 +2.97% 41
Estonia Estonia 1.43 +0.00736% 20
Ethiopia Ethiopia -0.67 +5.4% 145
Finland Finland 1.97 +0.467% 1
Fiji Fiji 0.305 -6.27% 80
France France 1.18 -0.00106% 29
Micronesia (Federated States of) Micronesia (Federated States of) 0.644 -6.62% 51
Gabon Gabon -0.873 +5.94% 158
United Kingdom United Kingdom 1.4 -1.09% 21
Georgia Georgia 0.177 +4.61% 87
Ghana Ghana -0.0996 +25.3% 99
Guinea Guinea -1.11 +1.48% 172
Gambia Gambia -0.374 -17.8% 123
Guinea-Bissau Guinea-Bissau -1.44 -1.21% 187
Equatorial Guinea Equatorial Guinea -1.34 -4.94% 183
Greece Greece 0.213 -34.4% 83
Grenada Grenada 0.605 +8.88% 57
Greenland Greenland 1.68 -0.329% 11
Guatemala Guatemala -1.08 -4.63% 169
Guam Guam 0.948 -22.4% 35
Guyana Guyana -0.342 +9.19% 118
Hong Kong SAR China Hong Kong SAR China 1.29 +1.21% 24
Honduras Honduras -1.1 +7.61% 170
Croatia Croatia 0.361 -1.96% 78
Haiti Haiti -1.36 -1.04% 186
Hungary Hungary 0.427 +1.19% 70
Indonesia Indonesia -0.154 -18.4% 105
India India 0.188 +65.3% 85
Ireland Ireland 1.63 +7% 13
Iran Iran -1.06 +4.26% 168
Iraq Iraq -1.69 -3.24% 194
Iceland Iceland 1.72 +1.07% 8
Israel Israel 0.784 -17% 43
Italy Italy 0.39 +31.4% 75
Jamaica Jamaica -0.175 +146% 109
Jordan Jordan 0.258 +18.6% 81
Japan Japan 1.54 -1.44% 16
Kazakhstan Kazakhstan -0.447 -5.88% 126
Kenya Kenya -0.326 +2.59% 117
Kyrgyzstan Kyrgyzstan -1.17 +2.3% 175
Cambodia Cambodia -0.819 -5.4% 152
Kiribati Kiribati 0.588 -6.07% 59
St. Kitts & Nevis St. Kitts & Nevis 0.48 -4.42% 64
South Korea South Korea 1.25 +7.8% 27
Kuwait Kuwait 0.342 +22.6% 79
Laos Laos -0.833 +3.54% 154
Lebanon Lebanon -1.17 +5.62% 174
Liberia Liberia -1.03 +12.6% 166
Libya Libya -1.77 -1.76% 197
St. Lucia St. Lucia 0.605 -8.63% 56
Liechtenstein Liechtenstein 1.71 -0.423% 9
Sri Lanka Sri Lanka -0.0907 +56.3% 98
Lesotho Lesotho -0.48 +1.42% 132
Lithuania Lithuania 1.27 +19.5% 26
Luxembourg Luxembourg 1.75 -0.909% 6
Latvia Latvia 1.04 +12.9% 32
Macao SAR China Macao SAR China 0.783 -1.01% 44
Morocco Morocco -0.128 -38.3% 101
Monaco Monaco 1.48 -0.578% 18
Moldova Moldova -0.153 -46.7% 104
Madagascar Madagascar -0.975 +2.62% 162
Maldives Maldives -0.0786 -278% 96
Mexico Mexico -0.806 -7.25% 151
Marshall Islands Marshall Islands 0.677 -7.24% 49
North Macedonia North Macedonia -0.168 +73.4% 108
Mali Mali -0.978 -0.478% 163
Malta Malta 0.702 -10.6% 47
Myanmar (Burma) Myanmar (Burma) -1.62 +5.81% 189
Montenegro Montenegro -0.0422 -66.6% 93
Mongolia Mongolia -0.184 -1.76% 111
Mozambique Mozambique -1.03 +0.159% 165
Mauritania Mauritania -0.639 -1.13% 144
Mauritius Mauritius 0.805 +1.13% 42
Malawi Malawi -0.155 -29.9% 106
Malaysia Malaysia 0.572 +1.87% 61
Namibia Namibia 0.445 +7.36% 67
Niger Niger -0.708 +42.2% 149
Nigeria Nigeria -0.888 -2.88% 159
Nicaragua Nicaragua -1.28 -2.5% 182
Netherlands Netherlands 1.64 -0.861% 12
Norway Norway 1.83 +4.15% 3
Nepal Nepal -0.463 +3.23% 130
Nauru Nauru -0.0184 -21.3% 91
New Zealand New Zealand 1.71 -1.43% 10
Oman Oman 0.613 +22.8% 55
Pakistan Pakistan -0.86 +27.9% 157
Panama Panama -0.346 -3.85% 119
Peru Peru -0.538 -2.66% 138
Philippines Philippines -0.418 -19.3% 125
Palau Palau 0.935 -1.83% 36
Papua New Guinea Papua New Guinea -0.54 -12.4% 139
Poland Poland 0.459 +7.15% 66
Puerto Rico Puerto Rico 0.494 -7.06% 63
North Korea North Korea -1.64 -1.18% 190
Portugal Portugal 1.07 -4.01% 31
Paraguay Paraguay -0.582 -1.58% 141
Palestinian Territories Palestinian Territories -0.683 +23% 147
Qatar Qatar 0.933 +1.72% 37
Romania Romania 0.437 +8.43% 68
Russia Russia -1.19 -0.748% 176
Rwanda Rwanda 0.205 +38.9% 84
Saudi Arabia Saudi Arabia 0.415 +43% 71
Sudan Sudan -1.67 +32.9% 193
Senegal Senegal -0.274 +1.81% 113
Singapore Singapore 1.75 -1.41% 5
Solomon Islands Solomon Islands -0.263 +9.2% 112
Sierra Leone Sierra Leone -0.833 +0.239% 155
El Salvador El Salvador -0.369 -50.2% 121
San Marino San Marino 1.48 -15.6% 18
Somalia Somalia -2.21 -3.29% 202
Serbia Serbia -0.0745 -34.6% 95
South Sudan South Sudan -2.14 +4.04% 200
São Tomé & Príncipe São Tomé & Príncipe -0.695 +9.52% 148
Suriname Suriname -0.0623 -51.5% 94
Slovakia Slovakia 0.603 -2.84% 58
Slovenia Slovenia 1.04 +6.99% 33
Sweden Sweden 1.6 -5% 14
Eswatini Eswatini -0.598 -7.39% 142
Seychelles Seychelles 0.433 -6.24% 69
Syria Syria -2.04 -1.64% 199
Chad Chad -1.35 -1.41% 185
Togo Togo -0.527 -4.15% 136
Thailand Thailand 0.245 +272% 82
Tajikistan Tajikistan -1.28 +1.73% 181
Turkmenistan Turkmenistan -1.49 -0.384% 188
Timor-Leste Timor-Leste -0.834 -5.27% 156
Tonga Tonga 0.549 -7.89% 62
Trinidad & Tobago Trinidad & Tobago -0.284 +68.2% 114
Tunisia Tunisia -0.139 +23.3% 103
Turkey Turkey -0.512 +11.4% 135
Tuvalu Tuvalu 1.01 +23.7% 34
Tanzania Tanzania -0.373 -19.2% 122
Uganda Uganda -0.475 +27% 131
Ukraine Ukraine -0.888 -3.23% 160
Uruguay Uruguay 0.718 -6.55% 46
United States United States 1.33 -3.03% 22
Uzbekistan Uzbekistan -0.833 -2.29% 153
St. Vincent & Grenadines St. Vincent & Grenadines 0.572 -11.3% 60
Venezuela Venezuela -2.15 -2.12% 201
U.S. Virgin Islands U.S. Virgin Islands 0.948 -0.906% 35
Vietnam Vietnam -0.0855 -46.1% 97
Vanuatu Vanuatu 0.141 -56.1% 88
Samoa Samoa 0.901 -4.98% 38
Kosovo Kosovo -0.311 -14.7% 116
Yemen Yemen -1.84 -0.7% 198
South Africa South Africa 0.0862 +111% 89
Zambia Zambia -0.529 +2.34% 137
Zimbabwe Zimbabwe -1.28 +3.24% 180

The "Rule of Law: Estimate" is a crucial indicator in assessing the functioning of legal frameworks across various nations. It encompasses a range of principles that ensure fairness, transparency, and accountability within legal systems. The rule of law is fundamentally about maintaining order, protecting individual rights, and providing a framework for the resolution of disputes. In 2023, the median value of this indicator stands at -0.12, reflecting global trends in governance and the balance of power in societies.

The significance of the rule of law cannot be overstated. It forms the backbone of democratic governance and is essential for economic development and social stability. When the rule of law is strong, individuals and businesses feel secure in their rights. This security fosters an environment conducive to investment, drives economic growth, and enhances public trust in institutions. Conversely, a weak rule of law leads to corruption, authoritarianism, and societal unrest. Therefore, monitoring the rule of law serves as a vital barometer for measuring social progression and political health.

This indicator is closely related to other metrics such as political stability, government effectiveness, and the absence of corruption. Countries that score highly on the rule of law are often those that also exhibit high levels of political stability and minimal corruption. Conversely, nations that struggle with the rule of law frequently face challenges in effective government, leading to a vicious cycle of instability and poor governance.

Several factors can influence the state of the rule of law within a country. These factors can include historical contexts, economic conditions, cultural values, and the prevailing political climate. For example, in countries where there is a deep-seated history of authoritarianism, legal systems may be designed more to serve the ruling elite than the general public. Additionally, economic hardships can lead to increased corruption and a disregard for legal processes, as individuals may resort to unlawful means for survival.

To enhance the rule of law, various strategies and solutions can be employed. First, there should be a concerted effort to strengthen judicial independence. An impartial judiciary is crucial for upholding the law without bias, thereby fostering confidence in legal processes. Second, legal education and public awareness campaigns can empower citizens, equipping them with the knowledge to exercise their rights effectively. Third, international cooperation and support can bolster domestic efforts in reforming legal systems, particularly in nations experiencing turmoil and conflict.

Despite its importance, the measurement of the rule of law does have flaws. One critique is the potential bias inherent in how data is collected and interpreted. Different countries have varying standards for what constitutes a rule of law violation, and discrepancies can arise based on political agendas, cultural biases, or even the ways in which data is reported. Furthermore, the complexity of legal systems means the rule of law cannot always be reduced to a single numeric score, as this can obscure significant nuances in local contexts.

The countries leading in the rule of law index in 2023 feature a list dominated by Scandinavia and prosperous democracies. Finland tops the chart with an impressive score of 1.97, illustrating its robust legal system where rights are protected, and government accountability is prioritized. Following Finland, Denmark (1.91), Norway (1.83), Switzerland (1.76), and Singapore (1.75) showcase strong legal frameworks that prioritize fairness and justice, along with effective enforcement mechanisms. These top nations exemplify how comprehensive legal standards can translate into societal well-being and trust in institutions.

Conversely, the bottom dwellers on the index, such as Somalia (-2.21) and Venezuela (-2.15), reflect profound deficiencies in governance and legal infrastructure. These countries suffer from systemic issues like civil unrest, government repression, and a lack of access to justice, which create environments where the rule of law is virtually absent. Such disparities highlight the urgent need for international attention and intervention, particularly in those regions where the legal system has been undermined by conflict or authoritarian rule.

In conclusion, maintaining the rule of law is fundamental to establishing a just society. Its complexities demand careful consideration and action from both national governments and the international community. By fostering stronger legal frameworks, empowering citizens, and ensuring that the justice system operates independently, nations can begin to reverse negative trends and work towards elevating the importance of the rule of law in their respective societies. The 2023 estimates serve as both a warning and a beacon; showcasing successful models while also shedding light on areas desperately in need of reform and support.

                    
# 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 = 'RL.EST'

# 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 <- 'RL.EST'

# 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))