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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rhowb-1.0.3-py3-none-any.whl.
File metadata
- Download URL: rhowb-1.0.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f737c9befeb467c9eb77a4dfc1c71f7acd7595fd89b1cc53aa7c7f9fd78b1a4b
|
|
| MD5 |
15f57e368208266ce7d182c137673bdd
|
|
| BLAKE2b-256 |
ee5d6039e6dd435e0302d47a65cb324b6db4c13d044c229990f9b43aa7d10c78
|