Human Capital Index (HCI), Upper Bound (scale 0-1)

Source: worldbank.org, 19.12.2024

Year: 2020

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 0.413 +1.8% 149
Angola Angola 0.385 +0.502% 164
Albania Albania 0.643 +0.4% 50
United Arab Emirates United Arab Emirates 0.684 -0.634% 43
Argentina Argentina 0.612 -2.45% 69
Armenia Armenia 0.589 -0.474% 82
Antigua & Barbuda Antigua & Barbuda 0.607 +3.26% 71
Australia Australia 0.778 -1.51% 16
Austria Austria 0.757 -2.68% 26
Azerbaijan Azerbaijan 0.591 -8.51% 80
Burundi Burundi 0.406 -0.82% 153
Belgium Belgium 0.769 -0.317% 19
Benin Benin 0.422 +0.89% 145
Burkina Faso Burkina Faso 0.402 +1.55% 154
Bangladesh Bangladesh 0.472 +1.25% 125
Bulgaria Bulgaria 0.625 -8.64% 60
Bahrain Bahrain 0.66 -1.73% 47
Bosnia & Herzegovina Bosnia & Herzegovina 0.588 -6.23% 83
Belarus Belarus 0.71 36
Brazil Brazil 0.556 +0.927% 95
Brunei Brunei 0.634 58
Bhutan Bhutan 0.499 118
Botswana Botswana 0.431 +0.327% 141
Central African Republic Central African Republic 0.321 173
Canada Canada 0.806 -0.288% 5
Switzerland Switzerland 0.766 -1.28% 20
Chile Chile 0.662 -2.04% 46
China China 0.665 +0.957% 45
Côte d’Ivoire Côte d’Ivoire 0.398 +2.86% 156
Cameroon Cameroon 0.418 +1.17% 147
Congo - Kinshasa Congo - Kinshasa 0.385 +0.573% 165
Congo - Brazzaville Congo - Brazzaville 0.44 +0.403% 137
Colombia Colombia 0.616 +1.2% 66
Comoros Comoros 0.434 +0.903% 140
Costa Rica Costa Rica 0.638 +4.62% 56
Cyprus Cyprus 0.764 +0.117% 21
Czechia Czechia 0.762 -1.49% 25
Germany Germany 0.762 -1.64% 23
Dominica Dominica 0.559 -1.14% 94
Denmark Denmark 0.762 -2.21% 24
Dominican Republic Dominican Republic 0.515 -0.8% 112
Algeria Algeria 0.542 +0.516% 101
Ecuador Ecuador 0.603 -0.312% 76
Egypt Egypt 0.508 +0.412% 116
Spain Spain 0.734 -1.2% 30
Estonia Estonia 0.789 +0.29% 12
Ethiopia Ethiopia 0.392 -0.214% 158
Finland Finland 0.805 -2.26% 7
Fiji Fiji 0.521 108
France France 0.771 +0.934% 18
Micronesia (Federated States of) Micronesia (Federated States of) 0.529 +8.76% 103
Gabon Gabon 0.478 +0.316% 123
United Kingdom United Kingdom 0.791 +0.796% 11
Georgia Georgia 0.576 -6.72% 86
Ghana Ghana 0.462 +1.54% 132
Guinea Guinea 0.387 +0.613% 163
Gambia Gambia 0.442 +4.42% 135
Greece Greece 0.7 -0.859% 38
Grenada Grenada 0.577 +4.66% 85
Guatemala Guatemala 0.47 +1.03% 128
Guyana Guyana 0.51 +0.181% 115
Hong Kong SAR China Hong Kong SAR China 0.823 -1.12% 2
Honduras Honduras 0.491 +0.165% 121
Croatia Croatia 0.719 -2.55% 32
Haiti Haiti 0.463 +0.479% 131
Hungary Hungary 0.692 -3.27% 39
Indonesia Indonesia 0.55 +0.166% 96
India India 0.498 +1.84% 119
Ireland Ireland 0.801 -2.66% 9
Iran Iran 0.604 +0.219% 75
Iraq Iraq 0.414 +2.14% 148
Iceland Iceland 0.751 +0.256% 27
Israel Israel 0.745 -3.75% 28
Italy Italy 0.735 -3.32% 29
Jamaica Jamaica 0.548 -0.808% 97
Jordan Jordan 0.564 +1.11% 90
Japan Japan 0.813 -4.2% 3
Kazakhstan Kazakhstan 0.635 -19.6% 57
Kenya Kenya 0.565 +0.914% 89
Kyrgyzstan Kyrgyzstan 0.605 +0.554% 72
Cambodia Cambodia 0.507 +0.198% 117
Kiribati Kiribati 0.517 +4.83% 110
St. Kitts & Nevis St. Kitts & Nevis 0.598 +2.53% 77
South Korea South Korea 0.809 -4.22% 4
Kuwait Kuwait 0.572 -0.297% 88
Laos Laos 0.47 -0.0196% 127
Lebanon Lebanon 0.524 -1.83% 107
Liberia Liberia 0.332 +0.565% 171
St. Lucia St. Lucia 0.615 +2.5% 68
Sri Lanka Sri Lanka 0.604 +0.843% 74
Lesotho Lesotho 0.423 +0.447% 144
Lithuania Lithuania 0.715 -3.1% 34
Luxembourg Luxembourg 0.691 -0.954% 40
Latvia Latvia 0.719 -4.3% 31
Macao SAR China Macao SAR China 0.801 +4.4% 8
Morocco Morocco 0.514 +2.29% 113
Moldova Moldova 0.593 +0.496% 79
Madagascar Madagascar 0.409 +1.61% 151
Mexico Mexico 0.621 +0.34% 62
Marshall Islands Marshall Islands 0.441 +4.95% 136
North Macedonia North Macedonia 0.563 +4.23% 91
Mali Mali 0.329 -0.973% 172
Malta Malta 0.716 +0.157% 33
Myanmar (Burma) Myanmar (Burma) 0.494 +1.3% 120
Montenegro Montenegro 0.641 +1.61% 54
Mongolia Mongolia 0.63 -0.501% 59
Mozambique Mozambique 0.377 +1.98% 168
Mauritania Mauritania 0.406 +2.92% 152
Mauritius Mauritius 0.64 -0.201% 55
Malawi Malawi 0.429 +0.649% 143
Malaysia Malaysia 0.621 -3.71% 63
Namibia Namibia 0.465 +0.277% 129
Niger Niger 0.333 -0.724% 170
Nigeria Nigeria 0.381 +1.8% 166
Nicaragua Nicaragua 0.516 +0.163% 111
Netherlands Netherlands 0.8 -1.38% 10
Norway Norway 0.778 +0.386% 15
Nepal Nepal 0.519 +1.34% 109
Nauru Nauru 0.527 104
New Zealand New Zealand 0.783 +0.463% 13
Oman Oman 0.621 -0.52% 64
Pakistan Pakistan 0.419 +1.86% 146
Panama Panama 0.511 -2.36% 114
Peru Peru 0.616 +1.73% 67
Philippines Philippines 0.531 -5.62% 102
Palau Palau 0.605 +3.76% 73
Papua New Guinea Papua New Guinea 0.444 +1.19% 134
Poland Poland 0.763 -0.82% 22
Portugal Portugal 0.778 -1.84% 17
Paraguay Paraguay 0.542 +0.119% 100
Palestinian Territories Palestinian Territories 0.591 +1.48% 81
Qatar Qatar 0.643 +0.211% 51
Romania Romania 0.596 -1.3% 78
Russia Russia 0.69 -6.5% 41
Rwanda Rwanda 0.392 +0.708% 159
Saudi Arabia Saudi Arabia 0.587 -1.16% 84
Sudan Sudan 0.391 +0.445% 160
Senegal Senegal 0.435 -0.174% 139
Singapore Singapore 0.886 -1.15% 1
Solomon Islands Solomon Islands 0.43 -2.56% 142
Sierra Leone Sierra Leone 0.379 +2.96% 167
El Salvador El Salvador 0.56 +0.354% 93
Serbia Serbia 0.687 -11.1% 42
South Sudan South Sudan 0.334 +0.503% 169
Slovakia Slovakia 0.673 -2.36% 44
Slovenia Slovenia 0.781 -1.89% 14
Sweden Sweden 0.805 -0.908% 6
Eswatini Eswatini 0.39 +0.76% 161
Seychelles Seychelles 0.657 +0.388% 49
Chad Chad 0.317 +0.477% 174
Togo Togo 0.452 +2.79% 133
Thailand Thailand 0.62 -1.34% 65
Tajikistan Tajikistan 0.525 -5.56% 105
Timor-Leste Timor-Leste 0.472 +0.316% 124
Tonga Tonga 0.545 +2.51% 98
Trinidad & Tobago Trinidad & Tobago 0.624 +0.167% 61
Tunisia Tunisia 0.525 +1.42% 106
Turkey Turkey 0.658 +3.35% 48
Tuvalu Tuvalu 0.464 +2% 130
Tanzania Tanzania 0.401 +1.1% 155
Uganda Uganda 0.396 +0.587% 157
Ukraine Ukraine 0.643 -1.79% 52
Uruguay Uruguay 0.608 -0.536% 70
United States United States 0.711 -1.56% 35
Uzbekistan Uzbekistan 0.641 53
St. Vincent & Grenadines St. Vincent & Grenadines 0.545 -0.248% 99
Vietnam Vietnam 0.708 +0.436% 37
Vanuatu Vanuatu 0.47 +2.34% 126
Samoa Samoa 0.56 +5.15% 92
Kosovo Kosovo 0.573 -0.428% 87
Yemen Yemen 0.388 +0.221% 162
South Africa South Africa 0.437 +0.746% 138
Zambia Zambia 0.41 +1.61% 150
Zimbabwe Zimbabwe 0.488 +1.24% 122

The Human Capital Index (HCI) is a compelling metric designed to measure the potential productivity of a country's population based on health and education. Operating on a scale from 0 to 1, the HCI offers a quantitative framework that signifies how well a country enhances its human capital, which is essential for economic growth and sustainability. An HCI score of 0 indicates that a country's population holds no productive capabilities, while a score of 1 reflects maximum potential. The upper bound score of the HCI represents the best attainable scenario, paving the way for comprehensive assessment and benchmarking across different regions and nations.

The importance of the HCI cannot be overstated. It is increasingly becoming a vital tool for policymakers, economists, non-profit organizations, and educational institutions alike. As economies evolve and the labor market becomes more competitive, investing in human capital leads to better economic outcomes, influencing overall productivity, innovation, and growth rates. Moreover, a higher HCI correlates with better health indicators and educational outcomes, linking the well-being of citizens with their capacity to contribute positively to society and the economy.

In examining the relationships between the HCI and other indicators, we find that it is closely tied to economic performance, social stability, and access to resources. For example, nations with high HCI scores like Singapore (0.89), Hong Kong (0.82), Japan (0.81), South Korea (0.81), and Canada (0.81) tend to experience robust economic growth, higher levels of productivity, and greater innovation. These countries often demonstrate significant investments in education, healthcare, and training programs, which are core components assessed by the HCI. In contrast, countries at the lower end of the spectrum, such as Chad (0.32), the Central African Republic (0.32), Mali (0.33), Liberia (0.33), and Niger (0.33), often grapple with stagnated economic development, widespread poverty, and poor health outcomes, limiting their human capital potential.

Several factors affect the Human Capital Index. Access to quality education stands out as a primary determinant; nations that invest heavily in their educational infrastructures—such as school accessibility, quality of teaching, and curriculum adequacy—tend to score higher on the HCI. Furthermore, healthcare accessibility is crucial, encompassing maternal and child health, nutrition, and healthcare services' availability and quality. Socioeconomic factors, including income levels, culture, and governmental policies, play a significant role too. Political stability and effective governance often foster environments that enable the flourishing of human capital through sound management and strategic resource allocation.

To improve HCI scores, countries must implement comprehensive strategies that focus on enhancing both health and education systems. These may involve increasing public spending on education and health, improving infrastructures, and ensuring that marginalized communities have access to essential services. Adult education and lifelong learning initiatives also play a crucial role; investing in the current workforce ensures that individuals remain competitive in a rapidly changing job market. Countries can also look towards adopting innovative educational models and incorporating technology to enhance learning experiences and outcomes.

In addressing flaws and challenges associated with the Human Capital Index, it is essential to consider that while the HCI provides valuable insights, it may not capture all dimensions of human capital effectively. For instance, cultural factors, informal education, and the impact of social networks on human capital development are not adequately reflected in the index. Furthermore, the variability in data collection methods and standards across countries can lead to discrepancies and reduce the comparability of results. Hence, while the HCI is a useful tool, it should be complemented by other qualitative assessments and localized metrics to gain a more nuanced understanding of human capital development.

In summary, the Human Capital Index serves as a crucial barometer for gauging a nation's investment in its people, interlinking education, health, and economic performance. The stark contrast between countries with high scores, like Singapore and those with markedly lower scores, such as Chad, highlights the disparities in human capital development across the globe. Addressing the multifaceted challenges and leveraging strategic investments in health and education can lead to significant improvements in HCI scores, fostering economic resilience and social stability.

                    
# 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 = 'HD.HCI.OVRL.UB'

# 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 <- 'HD.HCI.OVRL.UB'

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