Prevalence of HIV, total (% of population ages 15-49)

Source: worldbank.org, 01.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 0.1 0% 36
Angola Angola 1.5 0% 23
Albania Albania 0.1 0% 36
United Arab Emirates United Arab Emirates 0.1 0% 36
Argentina Argentina 0.4 0% 33
Armenia Armenia 0.3 0% 34
Azerbaijan Azerbaijan 0.1 0% 36
Burundi Burundi 0.9 0% 28
Belgium Belgium 0.2 0% 35
Benin Benin 0.8 0% 29
Burkina Faso Burkina Faso 0.6 0% 31
Bangladesh Bangladesh 0.1 0% 36
Bulgaria Bulgaria 0.1 0% 36
Bahamas Bahamas 0.9 -10% 28
Belarus Belarus 0.4 0% 33
Belize Belize 1.3 0% 25
Bolivia Bolivia 0.4 0% 33
Brazil Brazil 0.6 0% 31
Barbados Barbados 1 0% 27
Bhutan Bhutan 0.2 0% 35
Botswana Botswana 16.4 -4.65% 4
Central African Republic Central African Republic 3.4 -2.86% 14
Chile Chile 0.6 0% 31
Côte d’Ivoire Côte d’Ivoire 1.8 -5.26% 20
Cameroon Cameroon 2.6 -7.14% 16
Congo - Kinshasa Congo - Kinshasa 0.6 0% 31
Congo - Brazzaville Congo - Brazzaville 4.1 +2.5% 12
Colombia Colombia 0.5 0% 32
Comoros Comoros 0.1 0% 36
Cape Verde Cape Verde 0.9 0% 28
Costa Rica Costa Rica 0.5 0% 32
Cuba Cuba 0.6 0% 31
Czechia Czechia 0.1 0% 36
Denmark Denmark 0.1 0% 36
Dominican Republic Dominican Republic 1 0% 27
Algeria Algeria 0.1 0% 36
Ecuador Ecuador 0.4 0% 33
Egypt Egypt 0.1 0% 36
Eritrea Eritrea 0.4 -20% 33
Spain Spain 0.2 0% 35
Estonia Estonia 0.7 0% 30
Ethiopia Ethiopia 0.8 0% 29
Fiji Fiji 0.3 0% 34
France France 0.3 0% 34
Gabon Gabon 2.9 -3.33% 15
Georgia Georgia 0.3 0% 34
Ghana Ghana 1.7 0% 21
Guinea Guinea 1.4 -6.67% 24
Gambia Gambia 1.4 -6.67% 24
Guinea-Bissau Guinea-Bissau 2.4 -4% 17
Equatorial Guinea Equatorial Guinea 6.7 0% 9
Greece Greece 0.2 0% 35
Guatemala Guatemala 0.2 0% 35
Guyana Guyana 1.5 0% 23
Honduras Honduras 0.2 0% 35
Croatia Croatia 0.1 0% 36
Haiti Haiti 1.7 0% 21
Indonesia Indonesia 0.3 -25% 34
India India 0.2 0% 35
Iran Iran 0.1 0% 36
Iraq Iraq 0.1 0% 36
Iceland Iceland 0.1 0% 36
Italy Italy 0.2 0% 35
Jamaica Jamaica 1.3 0% 25
Jordan Jordan 0.1 0% 36
Kenya Kenya 3.7 -5.13% 13
Kyrgyzstan Kyrgyzstan 0.3 +50% 34
Cambodia Cambodia 0.5 0% 32
Kuwait Kuwait 0.1 0% 36
Laos Laos 0.4 0% 33
Lebanon Lebanon 0.1 0% 36
Liberia Liberia 1 0% 27
Libya Libya 0.2 0% 35
Sri Lanka Sri Lanka 0.1 0% 36
Lesotho Lesotho 19.3 -4.46% 2
Lithuania Lithuania 0.2 0% 35
Luxembourg Luxembourg 0.2 0% 35
Latvia Latvia 0.7 0% 30
Morocco Morocco 0.1 0% 36
Moldova Moldova 0.9 0% 28
Madagascar Madagascar 0.4 0% 33
Maldives Maldives 0.1 0% 36
Mexico Mexico 0.4 0% 33
North Macedonia North Macedonia 0.1 0% 36
Mali Mali 0.9 0% 28
Malta Malta 0.2 0% 35
Myanmar (Burma) Myanmar (Burma) 0.9 0% 28
Montenegro Montenegro 0.1 0% 36
Mongolia Mongolia 0.1 0% 36
Mozambique Mozambique 11.6 -2.52% 5
Mauritania Mauritania 0.3 0% 34
Malawi Malawi 7.1 -5.33% 8
Malaysia Malaysia 0.3 0% 34
Namibia Namibia 11 -3.51% 6
Niger Niger 0.2 0% 35
Nicaragua Nicaragua 0.3 0% 34
Nepal Nepal 0.1 0% 36
New Zealand New Zealand 0.1 0% 36
Oman Oman 0.1 0% 36
Pakistan Pakistan 0.2 0% 35
Panama Panama 1 0% 27
Peru Peru 0.4 0% 33
Philippines Philippines 0.3 +50% 34
Papua New Guinea Papua New Guinea 1 0% 27
Portugal Portugal 0.5 0% 32
Paraguay Paraguay 0.5 0% 32
Qatar Qatar 0.1 0% 36
Romania Romania 0.1 0% 36
Rwanda Rwanda 2.3 -4.17% 18
Saudi Arabia Saudi Arabia 0.1 0% 36
Sudan Sudan 0.1 0% 36
Senegal Senegal 0.3 0% 34
Sierra Leone Sierra Leone 1.4 0% 24
El Salvador El Salvador 0.5 0% 32
Serbia Serbia 0.1 0% 36
South Sudan South Sudan 1.9 -5% 19
São Tomé & Príncipe São Tomé & Príncipe 0.4 -20% 33
Suriname Suriname 1.6 0% 22
Slovakia Slovakia 0.1 0% 36
Slovenia Slovenia 0.1 0% 36
Eswatini Eswatini 25.9 -3.36% 1
Syria Syria 0.1 0% 36
Chad Chad 1 -9.09% 27
Togo Togo 1.7 -5.56% 21
Thailand Thailand 1.1 0% 26
Tajikistan Tajikistan 0.2 0% 35
Timor-Leste Timor-Leste 0.2 0% 35
Trinidad & Tobago Trinidad & Tobago 1 -9.09% 27
Tunisia Tunisia 0.1 0% 36
Tanzania Tanzania 4.3 -4.44% 11
Uganda Uganda 5.1 -1.92% 10
Uruguay Uruguay 0.6 0% 31
Venezuela Venezuela 0.5 0% 32
Vietnam Vietnam 0.3 0% 34
Yemen Yemen 0.1 0% 36
South Africa South Africa 17.8 -2.2% 3
Zambia Zambia 10.8 -4.42% 7
Zimbabwe Zimbabwe 11 -5.17% 6

The prevalence of HIV, particularly among individuals aged 15 to 49, stands as a critical indicator of public health and social development. As of 2018, this indicator has showcased alarming disparities across the globe, emphasizing both the severity of the epidemic in certain regions and the effectiveness of local health interventions. The median value for global prevalence in this demographic is 0.4%, reflecting a stark contrast to the highlighted extremes found within various countries.

The importance of monitoring HIV prevalence cannot be overstated. This percentage serves not only as a metric for assessing the HIV epidemic's magnitude but also acts as a lens through which the socio-economic and health frameworks of different populations can be understood. Elevated levels of HIV prevalence can signal underlying issues, such as lack of access to healthcare, ineffective health education programs, and socio-economic instability. Conversely, low prevalence rates may indicate successful public health interventions, increased access to antiretroviral therapy, and robust educational efforts about safe practices.

Countries such as Eswatini (27.3%), Lesotho (23.6%), South Africa (20.4%), Botswana (20.3%), and Zimbabwe (12.7%) emerge among the highest in HIV prevalence within the 15-49 age group, which paints a concerning picture of the Southern African region. These figures suggest a confluence of factors, such as historical socio-economic conditions, the impact of policies, and the cultural context surrounding sexual health. This situation underscores the importance of localized interventions. For instance, Eswatini's exceedingly high prevalence can be partially attributed to a combination of rampant poverty, stigma associated with HIV, and a history of limited healthcare access.

In stark contrast, countries with a prevalence of 0.1%, including Afghanistan, Algeria, Australia, Bangladesh, and Bosnia & Herzegovina, reflect drastically different socio-cultural and healthcare landscapes. Such low rates might imply effective pre-and post-exposure prophylactic strategies, a strong emphasis on sexual health education, and general access to preventive healthcare services. However, it is essential to scrutinize these rates carefully; they may not necessarily suggest immunity to the epidemic. In regions where data collection might be sparse or stigmatization leads to underreporting, low prevalence figures can be misleading.

The world values panel tracing back to 1990 shows HIV prevalence fluctuating around the 0.3% to 0.8% range until 2018. Despite a slight increase towards the later years, this increment should not lead to complacency but instead act as a catalyst for public health advocacy focusing on prevention and treatment strategies. The historical data underscores both the challenges in containment efforts and the potential areas for intervention. During the early 1990s, HIV was gradually gaining recognition as a significant global health issue; now, with prevalence stabilizing around 0.7% in previous years and slightly enhancing to 0.8% in 2017 and beyond, it remains evident that intensified efforts are still required in various regions.

The multifaceted factors influencing HIV prevalence include economic disparity, education levels, cultural attitudes towards sexual health, and healthcare access. Areas experiencing high rates often have limited healthcare infrastructure, making consistent testing and treatment challenging. Furthermore, societal stigma around HIV leads to decreased testing and a reluctance to seek treatment, compounding the issue. Conversely, wealthier nations or those with robust healthcare systems tend to exhibit lower prevalence rates due to better education, prevention strategies, and treatment pathways.

Effective strategies to combat HIV prevalence need to be comprehensive and multifaceted. This includes scaling up HIV education programs, increasing access to testing, and ensuring the availability of antiretroviral therapy. Strengthening community involvement and fostering an environment that destigmatizes HIV testing and treatment is also crucial. Prevention methods such as Pre-Exposure Prophylaxis (PrEP), condom distribution, and regular HIV screenings could significantly lower new infections, particularly in high-prevalence areas.

Nonetheless, flaws exist in the current approaches to managing HIV prevalence. Many regions lack the necessary resources or political will to implement large-scale preventive measures. Moreover, international aid programs, while beneficial, can sometimes create dependency rather than sustainable healthcare solutions. Adequate training for healthcare workers in these areas is often overlooked, impacting the quality of care and education regarding HIV/AIDS.

In conclusion, the prevalence of HIV among populations aged 15-49 stands as a crucial indicator of health, necessitating immediate and concerted efforts across all levels of society. Whether through enhanced healthcare access, community education, or destigmatization efforts, addressing this public health crisis remains vital for global health progress. The stark contrasts between regions illustrate the complex interplay of factors affecting HIV rates, necessitating nuanced and contextually appropriate strategies to combat HIV effectively in the coming years.

                    
# 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.DYN.AIDS.ZS'

# 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.DYN.AIDS.ZS'

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