Incidence of HIV, all (per 1,000 uninfected population)

Source: worldbank.org, 03.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 0.03 0% 57
Angola Angola 0.44 -8.33% 26
Albania Albania 0.02 0% 58
Argentina Argentina 0.09 0% 51
Armenia Armenia 0.19 0% 41
Azerbaijan Azerbaijan 0.05 0% 55
Burundi Burundi 0.1 0% 50
Belgium Belgium 0.04 0% 56
Benin Benin 0.11 -21.4% 49
Burkina Faso Burkina Faso 0.08 -11.1% 52
Bangladesh Bangladesh 0.01 0% 59
Bulgaria Bulgaria 0.03 0% 57
Bahamas Bahamas 0.15 -11.8% 45
Belarus Belarus 0.11 -8.33% 49
Belize Belize 0.35 -5.41% 30
Bolivia Bolivia 0.16 -5.88% 44
Brazil Brazil 0.24 0% 38
Barbados Barbados 0.21 -4.55% 40
Bhutan Bhutan 0.08 0% 52
Botswana Botswana 1.92 -11.9% 8
Central African Republic Central African Republic 1.57 -7.1% 10
Chile Chile 0.25 +4.17% 37
Côte d’Ivoire Côte d’Ivoire 0.31 -8.82% 34
Cameroon Cameroon 0.36 -21.7% 29
Congo - Kinshasa Congo - Kinshasa 0.13 -13.3% 47
Congo - Brazzaville Congo - Brazzaville 2.89 +5.09% 6
Colombia Colombia 0.16 -15.8% 44
Comoros Comoros 0.01 0% 59
Cape Verde Cape Verde 0.34 -5.56% 31
Costa Rica Costa Rica 0.14 0% 46
Cuba Cuba 0.18 0% 42
Czechia Czechia 0.02 0% 58
Denmark Denmark 0.01 -50% 59
Dominican Republic Dominican Republic 0.37 -11.9% 28
Algeria Algeria 0.05 0% 55
Ecuador Ecuador 0.11 0% 49
Egypt Egypt 0.05 +25% 55
Eritrea Eritrea 0.06 0% 54
Estonia Estonia 0.1 0% 50
Ethiopia Ethiopia 0.08 -11.1% 52
Fiji Fiji 0.33 +13.8% 32
France France 0.09 0% 51
Gabon Gabon 0.83 -9.78% 13
Georgia Georgia 0.14 0% 46
Ghana Ghana 0.53 -10.2% 23
Guinea Guinea 0.43 -10.4% 27
Gambia Gambia 0.6 -3.23% 19
Guinea-Bissau Guinea-Bissau 0.59 -10.6% 20
Equatorial Guinea Equatorial Guinea 2.94 -2% 5
Greece Greece 0.08 +33.3% 52
Guatemala Guatemala 0.07 0% 53
Guyana Guyana 0.62 0% 18
Honduras Honduras 0.05 -16.7% 55
Croatia Croatia 0.02 0% 58
Haiti Haiti 0.58 0% 21
Indonesia Indonesia 0.09 0% 51
India India 0.05 55
Iran Iran 0.03 0% 57
Iraq Iraq 0.01 0% 59
Iceland Iceland 0.04 0% 56
Italy Italy 0.04 0% 56
Jamaica Jamaica 0.5 -10.7% 24
Jordan Jordan 0.01 0% 59
Kenya Kenya 0.46 -14.8% 25
Kyrgyzstan Kyrgyzstan 0.11 0% 49
Cambodia Cambodia 0.08 0% 52
Laos Laos 0.14 0% 46
Liberia Liberia 0.24 -14.3% 38
Sri Lanka Sri Lanka 0.01 0% 59
Lesotho Lesotho 3.03 -19.2% 4
Lithuania Lithuania 0.06 -14.3% 54
Luxembourg Luxembourg 0.06 -14.3% 54
Latvia Latvia 0.19 0% 41
Morocco Morocco 0.02 0% 58
Moldova Moldova 0.34 0% 31
Madagascar Madagascar 0.3 0% 35
Maldives Maldives 0.01 0% 59
Mexico Mexico 0.16 0% 44
North Macedonia North Macedonia 0.03 0% 57
Mali Mali 0.28 -3.45% 36
Malta Malta 0.09 0% 51
Myanmar (Burma) Myanmar (Burma) 0.21 0% 40
Montenegro Montenegro 0.02 -33.3% 58
Mongolia Mongolia 0.01 0% 59
Mozambique Mozambique 3.2 -20% 2
Mauritania Mauritania 0.12 0% 48
Malawi Malawi 0.81 -16.5% 14
Malaysia Malaysia 0.09 -10% 51
Namibia Namibia 2.39 -11.8% 7
Niger Niger 0.06 0% 54
Nicaragua Nicaragua 0.08 0% 52
Nepal Nepal 0.02 0% 58
New Zealand New Zealand 0.01 0% 59
Oman Oman 0.03 0% 57
Panama Panama 0.32 -3.03% 33
Peru Peru 0.17 -5.56% 43
Philippines Philippines 0.21 +10.5% 40
Papua New Guinea Papua New Guinea 0.65 +4.84% 17
Portugal Portugal 0.06 0% 54
Qatar Qatar 0.04 0% 56
Romania Romania 0.03 0% 57
Rwanda Rwanda 0.24 -11.1% 38
Saudi Arabia Saudi Arabia 0.04 +33.3% 56
Sudan Sudan 0.09 0% 51
Senegal Senegal 0.09 0% 51
Sierra Leone Sierra Leone 0.44 -13.7% 26
El Salvador El Salvador 0.13 0% 47
Serbia Serbia 0.02 0% 58
South Sudan South Sudan 0.79 -5.95% 15
São Tomé & Príncipe São Tomé & Príncipe 0.06 -14.3% 54
Suriname Suriname 0.76 +7.04% 16
Slovakia Slovakia 0.02 0% 58
Eswatini Eswatini 4.1 -20.1% 1
Syria Syria 0.01 0% 59
Chad Chad 0.22 -8.33% 39
Togo Togo 0.28 -12.5% 36
Thailand Thailand 0.13 0% 47
Tajikistan Tajikistan 0.1 -9.09% 50
Timor-Leste Timor-Leste 0.07 -12.5% 53
Tanzania Tanzania 0.54 -20.6% 22
Uganda Uganda 1.21 -5.47% 11
Uruguay Uruguay 0.24 0% 38
Vietnam Vietnam 0.06 -14.3% 54
Yemen Yemen 0.03 0% 57
South Africa South Africa 3.15 -7.08% 3
Zambia Zambia 1.86 -15.1% 9
Zimbabwe Zimbabwe 1.12 -9.68% 12

The incidence of HIV, presented as the number of new cases per 1,000 uninfected individuals in a population, is a critical indicator in understanding the current state of the epidemic. In 2022, the median incidence rate stood at 0.11, a statistical measure that encapsulates the burden of new HIV infections among populations not previously living with the virus. This figure not only represents the ongoing challenges faced by public health systems globally but also serves as a lens through which we can examine broader health dynamics.

The importance of tracking HIV incidence cannot be overstated. It plays a vital role in public health planning, resource allocation, and the evaluation of prevention strategies. By measuring incidence, health officials can assess whether their efforts to curb the virus are effective, facilitating necessary adjustments in policy or funding. Furthermore, it can illuminate disparities between regions, highlighting areas that may require more targeted intervention.

When contextualized alongside other health indicators, the incidence of HIV can reveal both the complexities and intersections of global health. For instance, regions with high HIV incidence often experience concurrent challenges, such as high rates of tuberculosis (TB), sexually transmitted infections (STIs), and inadequate access to healthcare. The interplay of these factors can create a compounded situation that increases vulnerability to HIV infection. Moreover, socio-economic factors such as poverty, stigmatization, and lack of education can contribute to higher rates of HIV incidence, creating a cyclical pattern of poor health and economic disenfranchisement.

The data from 2022 underscores the vast disparity in HIV incidence rates across global regions. Eswatini exhibited the highest rate at 4.1 per 1,000 uninfected individuals, an alarming figure that reflects deep-rooted issues in health systems, social structures, economic stability, and prevention efforts. Following Eswatini, Mozambique (3.2), South Africa (3.15), Lesotho (3.03), and Equatorial Guinea (2.94) also showcased noteworthy incidence rates. These countries are often characterized by factors such as limited healthcare resources, higher prevalence of concurrent infections, and socio-economic challenges, all of which intensify the spread of HIV.

At the other end of the spectrum, the lowest rates were reported in countries such as Bangladesh, Comoros, Denmark, Iraq, and Jordan, all at just 0.01 per 1,000 uninfected population. These countries might benefit from more developed healthcare infrastructures, effective public health initiatives, and lower levels of stigma surrounding HIV. The contrast between the top and bottom quintiles highlights the global inequities that exist in healthcare access and outcomes, showcasing how geography can dictate health destinies.

A historical lens provides even deeper insight into the progression of HIV incidence. From 1990 to 2022, global incidence has shown a downward trend from 0.46 to 0.17 per 1,000 uninfected individuals, indicating improvements in prevention and treatment strategies over the years. However, the stark contrast between historical data and current figures might lead to complacency without acknowledging the need for sustained and intensified efforts in the highest burden settings. The slow but consistent decrease emphasizes the need for ongoing monitoring and adaptation of prevention strategies to ensure they remain effective amidst changing patterns of the epidemic.

Several factors influence HIV incidence, notably the availability and accessibility of preventive measures such as condoms, pre-exposure prophylaxis (PrEP), and awareness campaigns. The level of education regarding safe practices and the social stigma surrounding HIV can also dramatically shape incident rates. Countries that prioritize sexual health education, promote testing and treatment accessibility, and mitigate stigma often see lower rates of new infections.

Strategies to address high levels of HIV incidence must be multi-faceted. They should include evidence-based interventions tailored to the cultural and societal contexts of high-prevalence areas. For instance, integrating HIV prevention within broader sexual health education programs could empower at-risk populations. Enhancing access to testing and treatment, alongside community outreach initiatives aimed at reducing stigma, can also substantially lower incidence rates. Collaboration with local organizations and governments can ensure that strategies are not just globally defined but locally applicable and effective.

Despite these numerous strategies, flaws still exist in the fight against HIV. Funding for HIV prevention and treatment can be erratic, with global attention fluctuating based on other pressing health crises. Structural challenges such as healthcare inequities, political instability, and socio-economic barriers may impede progress. Acknowledging and addressing these flaws is essential to successfully navigate the path forward in reducing HIV incidence further.

In conclusion, the incidence of HIV among uninfected populations serves as a critical metric in the global health landscape. While the median figure in 2022 reflects some progress, the drastic variability across regions illustrates ongoing challenges. Understanding and addressing the complexities surrounding this indicator requires a holistic approach, combining effective strategies, consistent funding, and a commitment to equitable healthcare access. Through concerted efforts, it is possible to continue making strides towards reducing HIV incidence globally.

                    
# 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 = 'SH.HIV.INCD.TL.P3'

# 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 <- 'SH.HIV.INCD.TL.P3'

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