Skip to main content

Data from world bank api

Project description

World Bank Data Api

Income Levels

WB assigns its economies to four income groups: low, lower-middle, upper-middle, and high. The classifications are updated each year on July 1, based on the GNI per capita of the previous calendar year. For example, the updated income classifications for FY2025, based on the GNI per capita of 2023.

GNI measures are expressed in US dollars using conversion factors derived according to the Atlas method. WB's income classification aims to reflect an economy’s level of development, drawing on Atlas GNI per capita as a broadly available indicator of economic capacity.

The classification of countries into income categories has evolved significantly over the period since the late 1980s. In 1987, 30% of reporting countries were classified as low-income and 25% as high-income countries. Jumping to 2023, these overall ratios have shifted down to 12% in the low-income category and up to 40% in the high-income category.

FY LIC LMC UMC HIC Data for Calendar Year
2026 <= 1135 [1136, 4495] [4496, 13935] > 13935 2024
2025 <= 1145 [1146, 4515] [4516, 14005] > 14005 2023
2024 <= 1135 [1136, 4465] [4466, 13845] > 13845 2022
2023 <= 1085 [1086, 4255] [4266, 13205] > 13205 2021
2022 <= 1045 [1046, 4095] [4096, 12695] > 12695 2020
2021 <= 1035 [1036, 4045] [4046, 12535] > 12535 2019
from wbdata import WB
wb = WB()
wb.incomelevels

Lending Types

wb.lendingtypes

Sources

By default, sources are read from local file. To get the latest sources from World Bank API, use:

wb.getsources(False)

Regions

WB groupes its members into one of seven geographic regions:

  • East Asia and Pacific
  • Europe and Central Asia
  • Latin America and the Caribbean
  • Middle East and North Africa
  • North America, South Asia
  • Sub-Saharan Africa

Region info data are read from local file by default. To get the latest regions from World Bank API, use:

wb.getregions(False)

Topics

Topic data are read from local file by default. To get the latest topics from World Bank API, use:

wb.gettopics(False)

Query Economy's Information

name, id, region, incomelevel, lendingtype, capital, longitude, latitude, ...

Parameters used frequently (at least ONE of them):

  • name
  • region
  • incomelevel
  • lendingtype
wb.queryecons(name = 'China')   # info of China
wb.queryecons(region = 'EAS', incomelevel = 'HIC')   # high income economies in East Asia and Pacific

Query Indicators

By default, indicators are queried from local file

wb.queryinds(name = 'GDP Per Capita')

Get Data

wb.getdata('NY.GDP.MKTP.KD', 'CHN', period = '2020:2024')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rhowb-1.0.2-py3-none-any.whl (815.7 kB view details)

Uploaded Python 3

File details

Details for the file rhowb-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: rhowb-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 815.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for rhowb-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f475ccc8cb4e4db90d8a6aac29bc8b5761e6c8a8eadc74e152d7e52e3edf37a
MD5 a385170230faef153b0e08dde632ce87
BLAKE2b-256 48336483231222f88a8d370b35253d42a70269cfcd034f8f605fcca73faf1503

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page