← pakdata

Pakistan economy and society: annual World Bank WDI indicators, 1960-2025

66 rowstarget: gdp_growth_pct CC BY 4.0snapshot 2026.11

Source: World Bank (World Development Indicators, API source 2)

Get it: pakdata (Python) · Hugging Face · Kaggle · CSV

Load it

pip install pakdata

from pakdata import load_pak_economy
X, y = load_pak_economy(return_X_y=True)

More ways (pandas, Polars, DuckDB, PyTorch, R, Excel, JavaScript): usage guide.

Data card

.. _pak_economy_dataset: Pakistan economy and society: annual World Bank WDI indicators, 1960-2025 -------------------------------------------------------------------------- **Data Set Characteristics:** :Number of Instances: 66 (one row per calendar year, 1960-2025) :Number of Attributes: 53 columns besides the target: ``year`` + 52 indicators. 47 are features by default, because 6 GDP-level/derived columns are excluded to prevent leakage. :Default target: ``gdp_growth_pct`` (real GDP growth, annual %; missing for 1960) :Time coverage: 1960-2025. Coverage differs by indicator (see the non-missing counts below) :Geographic coverage: Pakistan (national totals; ISO3 PAK) :Source: World Bank, World Development Indicators (WDI), https://data.worldbank.org/ , retrieved through the API https://api.worldbank.org/v2/country/PAK/indicator/<CODE>?format=json (WDI database last updated 2026-11-11) :License: Creative Commons Attribution 4.0 International (CC BY 4.0), https://datacatalog.worldbank.org/public-licenses#cc-by . The build script checks each series' ``License_Type`` metadata and includes only series marked CC BY-4.0. :Snapshot: 2026.11 (retrieved 2026-11-29) **Columns** (name, WDI code, non-missing years out of 66): *Identifier / time* - ``year`` (int): calendar year. It is kept as a feature, so you can model trends. *National accounts* - ``gdp_growth_pct`` (NY.GDP.MKTP.KD.ZG, 65): **target**. Real GDP growth, annual %. - ``gdp_current_usd`` (NY.GDP.MKTP.CD, 66): GDP, current US$. *Excluded from features.* - ``gdp_constant_2015_usd`` (NY.GDP.MKTP.KD, 66): GDP, constant 2015 US$. *Excluded*: its year-on-year % change is exactly the target. - ``gdp_per_capita_current_usd`` (NY.GDP.PCAP.CD, 66): GDP per capita, current US$. *Excluded.* - ``gdp_per_capita_constant_2015_usd`` (NY.GDP.PCAP.KD, 66): GDP per capita, constant 2015 US$. *Excluded.* - ``gdp_per_capita_growth_pct`` (NY.GDP.PCAP.KD.ZG, 65): GDP per capita growth, annual %. *Excluded*: approximately the target minus population growth. - ``gni_per_capita_atlas_current_usd`` (NY.GNP.PCAP.CD, 64): GNI per capita, Atlas method, current US$. *Excluded.* - ``gdp_deflator_inflation_pct`` (NY.GDP.DEFL.KD.ZG, 65): inflation, GDP deflator, annual %. - ``agriculture_value_added_pct_gdp`` (NV.AGR.TOTL.ZS, 66): agriculture, forestry and fishing, % of GDP. - ``industry_value_added_pct_gdp`` (NV.IND.TOTL.ZS, 66): industry incl. construction, % of GDP. - ``manufacturing_value_added_pct_gdp`` (NV.IND.MANF.ZS, 66): manufacturing, % of GDP. - ``services_value_added_pct_gdp`` (NV.SRV.TOTL.ZS, 66): services, % of GDP. - ``gross_capital_formation_pct_gdp`` (NE.GDI.TOTL.ZS, 66): investment, % of GDP. - ``gross_domestic_savings_pct_gdp`` (NY.GDS.TOTL.ZS, 66): % of GDP. - ``household_consumption_pct_gdp`` (NE.CON.PRVT.ZS, 66): households and NPISHs final consumption, % of GDP. - ``govt_consumption_pct_gdp`` (NE.CON.GOVT.ZS, 66): general government final consumption, % of GDP. *Prices, money and exchange rate* - ``inflation_cpi_pct`` (FP.CPI.TOTL.ZG, 66): consumer price inflation, annual %. - ``exchange_rate_pkr_per_usd`` (PA.NUS.FCRF, 66): official exchange rate, PKR per US$, period average. - ``broad_money_pct_gdp`` (FM.LBL.BMNY.GD.ZS, 66): broad money, % of GDP. - ``domestic_credit_private_pct_gdp`` (FS.AST.PRVT.GD.ZS, 66): domestic credit to the private sector, % of GDP. - ``lending_interest_rate_pct`` (FR.INR.LEND, 18; 2004-2021): lending interest rate, %. - ``real_interest_rate_pct`` (FR.INR.RINR, 18; 2004-2021): real interest rate, %. *External sector* - ``exports_pct_gdp`` (NE.EXP.GNFS.ZS, 66): exports of goods and services, % of GDP. - ``imports_pct_gdp`` (NE.IMP.GNFS.ZS, 66): imports of goods and services, % of GDP. - ``trade_pct_gdp`` (NE.TRD.GNFS.ZS, 66): exports + imports, % of GDP. - ``remittances_received_current_usd`` (BX.TRF.PWKR.CD.DT, 50; 1976-2025): personal remittances received, current US$. - ``remittances_received_pct_gdp`` (BX.TRF.PWKR.DT.GD.ZS, 50): personal remittances received, % of GDP. - ``fdi_net_inflows_current_usd`` (BX.KLT.DINV.CD.WD, 56): foreign direct investment, net inflows (BoP), current US$. - ``fdi_net_inflows_pct_gdp`` (BX.KLT.DINV.WD.GD.ZS, 56): FDI net inflows, % of GDP. - ``external_debt_stocks_current_usd`` (DT.DOD.DECT.CD, 56): total external debt stocks, current US$. - ``total_reserves_current_usd`` (FI.RES.TOTL.CD, 66): total reserves incl. gold, current US$. - ``current_account_balance_pct_gdp`` (BN.CAB.XOKA.GD.ZS, 50): current account balance, % of GDP. *Labour* - ``unemployment_pct_labour_force`` (SL.UEM.TOTL.ZS, 35; 1991-2025): unemployment, % of labour force (modeled ILO estimate). - ``labour_force_participation_pct`` (SL.TLF.CACT.ZS, 36): labour force participation, % of population aged 15+ (modeled ILO estimate). *Population and health* - ``population_total`` (SP.POP.TOTL, 66): total population, persons. - ``population_growth_pct`` (SP.POP.GROW, 65): annual %. - ``urban_population_pct`` (SP.URB.TOTL.IN.ZS, 66): urban population, % of total. - ``life_expectancy_years`` (SP.DYN.LE00.IN, 65): life expectancy at birth, years. - ``infant_mortality_per_1000_live_births`` (SP.DYN.IMRT.IN, 65). - ``under5_mortality_per_1000_live_births`` (SH.DYN.MORT, 65). - ``fertility_rate_births_per_woman`` (SP.DYN.TFRT.IN, 65). - ``birth_rate_per_1000_people`` (SP.DYN.CBRT.IN, 65): crude birth rate. - ``death_rate_per_1000_people`` (SP.DYN.CDRT.IN, 65): crude death rate. *Education* - ``literacy_rate_adult_pct`` (SE.ADT.LITR.ZS, 16; 1981-2021): adult literacy rate, % of people aged 15+. Very sparse. - ``school_enrollment_primary_gross_pct`` (SE.PRM.ENRR, 44): gross enrolment ratio, primary, %. - ``school_enrollment_secondary_gross_pct`` (SE.SEC.ENRR, 43): gross enrolment ratio, secondary, %. - ``school_enrollment_tertiary_gross_pct`` (SE.TER.ENRR, 37): gross enrolment ratio, tertiary, %. *Energy, environment, infrastructure* - ``access_to_electricity_pct_population`` (EG.ELC.ACCS.ZS, 27; 1998-2024). - ``electric_power_consumption_kwh_per_capita`` (EG.USE.ELEC.KH.PC, 35). - ``co2_emissions_tonnes_per_capita`` (EN.GHG.CO2.PC.CE.AR5, 55; 1970-2024): CO2 excluding LULUCF, t CO2e per person. - ``forest_area_pct_land`` (AG.LND.FRST.ZS, 35): forest area, % of land area. - ``mobile_subscriptions_per_100_people`` (IT.CEL.SETS.P2, 53). - ``internet_users_pct_population`` (IT.NET.USER.ZS, 27; 1990-2024): individuals using the Internet, %. **How it was built:** ``scripts/build_pak_economy.py`` requests each indicator for Pakistan from the WDI API (``source=2``), one request per series with pauses between requests. It reads each series' license metadata and skips any series that is not CC BY 4.0. It then pivots the values to one row per year, sorts by year, and writes the values unchanged (at 10 significant digits). It also records the API's ``lastupdated`` field. If that field differs from the release this card describes (2026-11-11), the script exits with an error so the card can be re-checked. A rebuild against the same WDI release reproduces the file byte for byte (gzip mtime is fixed at 0). It does no interpolation or imputation, and empty cells are missing at the source. Two requested series were dropped: military expenditure (% of GDP, MS.MIL.XPND.GD.ZS), whose license is "SIPRI terms and conditions" rather than CC BY 4.0, and tax revenue (% of GDP, GC.TAX.TOTL.GD.ZS), which has no Pakistan values in this WDI release. **Caveats and known biases:** - **Small n.** There are only 66 rows (65 with a target). Any model with dozens of features will overfit. Use regularisation, few features and honest validation. - **Time-ordered splits only.** Train on earlier years and test on later years, for example with ``sklearn.model_selection.TimeSeriesSplit``. A random K-fold split leaks the future. - **Same-year features are not forecasts.** Same-year indicators such as investment share or inflation are published together with GDP. For genuine forecasting, build lagged features (``df.shift(1)``) and predict year *t* from year *t-1*. - **Leakage guard.** The GDP levels (constant and current US$), GDP per capita levels and growth, and GNI per capita are kept in ``frame`` but excluded from ``X`` for the default target. If you choose another target, check for similar identities yourself. For example, ``trade_pct_gdp`` = ``exports_pct_gdp`` + ``imports_pct_gdp``, and ``remittances_received_pct_gdp`` is the US$ value divided by GDP. - **Structural break in 2000 (nominal GDP base-year splice).** WDI splices Pakistan's rebased nominal GDP series in 2000, so nominal GDP jumps there with no matching real event: ``gdp_current_usd`` rises 58% (6.30e10 -> 9.95e10 US$, 1999 -> 2000), and ``gdp_deflator_inflation_pct`` is **68.0% in 2000** (5.9% in 1999, 6.0% in 2001). That 68% is an artifact of the splice, not real inflation: CPI inflation in 2000 was 4.4%. Every ratio with nominal GDP in the denominator shifts down at the same point, for example ``broad_money_pct_gdp`` 44.8 -> 28.7, ``exports_pct_gdp`` 15.4 -> 9.6 and ``domestic_credit_private_pct_gdp`` 25.5 -> 16.6. Real growth (the target) is unaffected. With deflator inflation or %-of-GDP ratios as features, add a ``year >= 2000`` dummy (or a 2000-only dummy for deflator inflation), fit on 2000+ data only, or use first differences that skip 1999 -> 2000. ``inflation_cpi_pct`` has no such break. - **Unemployment break in 2012 and implausibly low earlier values.** The ILO modelled ``unemployment_pct_labour_force`` series is 0.4-0.8% for 1991-2011 (minimum 0.398 in 2007), then jumps to 3.7% in 2012. It reaches about 5-6% only from 2019. Pakistan's Labour Force Surveys reported roughly 5-6% unemployment throughout the 2000s, so treat the pre-2012 values as unreliable. Use this column only from 2012 onward, or do not use it as a feature. - **Missing target and sparse columns.** ``gdp_growth_pct`` is missing for 1960, so ``return_X_y=True`` gives 66 rows with one NaN in ``y``. Drop it before fitting: ``mask = y.notna(); X, y = X[mask], y[mask]``. Many sparse columns (interest rates, literacy, electricity access, internet, unemployment) are entirely NaN in early ``TimeSeriesSplit`` training folds. ``SimpleImputer`` then drops them with a warning and the fold has fewer columns. Use ``SimpleImputer(keep_empty_features=True)``, restrict to well-covered columns, or start the data in a later year. Late-starting series such as ``internet_users_pct_population`` and ``mobile_subscriptions_per_100_people`` are near zero in the few early training years they cover. ``StandardScaler`` then divides by a tiny standard deviation, and later test years get z-scores in the thousands, which wrecks linear models (Ridge CV R^2 in the -1e8 range on one fold). Drop such columns for linear models, start in a later year, or use tree models. - **Revisions.** WDI revises historical values (rebasing, new census data), so later snapshots can differ. The 2025 values are the most recent and the most likely to be revised. - **Pakistan's fiscal year** runs from July to June. WDI assigns national-accounts data to the calendar year in which the fiscal year ends (FY2024/25 -> 2025). - Several series are **modelled or interpolated by the source**, not measured every year: ILO unemployment and participation, UN population estimates, mortality, and life expectancy. The literacy, enrolment and electricity-access data come from irregular surveys and censuses. - Pre-1971 figures refer to the territory of present-day Pakistan as defined by WDI. - The values in US$ are nominal. Use ``exchange_rate_pkr_per_usd`` and the inflation columns when comparing values across decades. **Suggested tasks:** 1. *Beginner, regression:* predict ``gdp_growth_pct`` from the same year's structure (investment share, inflation, trade share) with ``Ridge``. Use a time-ordered split (train up to 2009, test 2010+) and compare the result with a "predict the training mean" baseline. 2. *Intermediate, forecasting:* build lag-1/lag-2 features and forecast next year's growth with ``TimeSeriesSplit``. Compare against the naive persistence forecast (growth_t = growth_t-1). 3. *Regression on another target:* model ``inflation_cpi_pct`` (``target="inflation_cpi_pct"``) from lagged broad money, exchange-rate changes and imports. 4. *Exploration / clustering:* standardise the indicators and cluster the years (KMeans, k = 3-5) or run PCA, to see whether the decades separate into distinct economic regimes. **Citation / attribution:** World Bank, World Development Indicators (WDI), Pakistan (PAK), https://data.worldbank.org/ , retrieved 2026-11-29 via https://api.worldbank.org/v2 (WDI last updated 2026-11-11). Licensed under CC BY 4.0 (https://datacatalog.worldbank.org/public-licenses#cc-by). Changes: indicators selected, renamed to snake_case and pivoted to one row per year by pakdata. Unemployment and labour-force participation are modeled ILO estimates; CO2 emissions come from EDGAR via WDI.

Cite

World Bank, World Development Indicators (WDI), Pakistan (PAK), https://data.worldbank.org/ , retrieved 2026-11-29 via https://api.worldbank.org/v2 (WDI last updated 2026-11-11). Licensed under CC BY 4.0 (https://datacatalog.worldbank.org/public-licenses#cc-by). Changes: indicators selected, renamed to snake_case and pivoted to one row per year by pakdata. Unemployment and labour-force participation are modeled ILO estimates; CO2 emissions come from EDGAR via WDI.
Packaged by pakdata, DOI 10.5281/zenodo.24662545.