{
  "name": "world-bank-income-groups",
  "title": "World Bank Income Groups",
  "description": "The World Bank's low, lower-middle, upper-middle or high income group for every economy, every year since 1987. Low-income economies fell from 63 in 2002 to 25 now; high-income rose from 53 to 87.",
  "status": "monitored",
  "keywords": [
    "world bank income groups",
    "income classification",
    "low income countries",
    "high income countries",
    "GNI per capita thresholds",
    "country income level",
    "lending categories",
    "developing countries",
    "iso3"
  ],
  "licenses": [
    {
      "name": "CC-BY-4.0",
      "title": "World Bank Terms of Use for Datasets (CC BY 4.0 with additional terms)",
      "path": "https://www.worldbank.org/en/about/legal/terms-of-use-for-datasets"
    }
  ],
  "sources": [
    {
      "title": "World Bank, Historical classification by income, lending, and fragile status (OGHIST.xlsx), World Bank Data Catalog",
      "path": "https://datacatalog.worldbank.org/search/dataset/0037712"
    },
    {
      "title": "World Bank API, country list with income level, region and lending type",
      "path": "https://api.worldbank.org/v2/country?format=json&per_page=400"
    },
    {
      "title": "World Bank, How does the World Bank classify countries?",
      "path": "https://datahelpdesk.worldbank.org/knowledgebase/articles/378834-how-does-the-world-bank-classify-countries"
    }
  ],
  "upkeep": {
    "mode": "living",
    "refresh": "annual",
    "workflow": ".github/workflows/update.yml"
  },
  "resources": [
    {
      "path": "data/income-groups.csv",
      "name": "income-groups",
      "title": "Income group of every economy, by fiscal year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "iso3",
            "type": "string",
            "description": "World Bank economy code. ISO 3166-1 alpha-3 for current economies, except XKX (Kosovo, user-assigned), CHI (Channel Islands) and former economies (CSK, SUN, YUG, YUGf, ANT). Join key to current-classification.csv and other datasets."
          },
          {
            "name": "economy",
            "type": "string",
            "description": "Economy name as the World Bank gives it."
          },
          {
            "name": "fiscal_year",
            "type": "integer",
            "description": "World Bank fiscal year, 1989 to the latest. FY2027 runs from 1 July 2026 to 30 June 2027; the group is fixed on 1 July.",
            "constraints": {
              "minimum": 1989
            }
          },
          {
            "name": "data_year",
            "type": "integer",
            "description": "Calendar year of the GNI per capita the classification was based on: always fiscal_year minus 2 (the year before the 1 July announcement)."
          },
          {
            "name": "income_group",
            "type": "string",
            "description": "Income group in that fiscal year. low, lower-middle, upper-middle or high, by GNI per capita (Atlas method) against the thresholds in thresholds.csv. Economies the World Bank did not classify in a year have no row.",
            "constraints": {
              "enum": [
                "low",
                "lower-middle",
                "upper-middle",
                "high"
              ]
            }
          }
        ],
        "primaryKey": [
          "iso3",
          "fiscal_year"
        ]
      }
    },
    {
      "path": "data/thresholds.csv",
      "name": "thresholds",
      "title": "GNI per capita thresholds between income groups, by fiscal year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "fiscal_year",
            "type": "integer",
            "description": "World Bank fiscal year.",
            "constraints": {
              "minimum": 1989
            }
          },
          {
            "name": "data_year",
            "type": "integer",
            "description": "Calendar year of the GNI data (fiscal_year minus 2)."
          },
          {
            "name": "low_max",
            "type": "integer",
            "description": "Highest GNI per capita (current US$, Atlas method) in the low group: low is at or below this.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "lower_middle_max",
            "type": "integer",
            "description": "Highest GNI per capita in the lower-middle group.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "upper_middle_max",
            "type": "integer",
            "description": "Highest GNI per capita in the upper-middle group; high is above this.",
            "constraints": {
              "minimum": 0
            }
          }
        ],
        "primaryKey": [
          "fiscal_year"
        ]
      }
    },
    {
      "path": "data/current-classification.csv",
      "name": "current-classification",
      "title": "Current income group, region and lending category of each economy",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "iso3",
            "type": "string",
            "description": "World Bank economy code (ISO 3166-1 alpha-3 except XKX for Kosovo and CHI for the Channel Islands)."
          },
          {
            "name": "economy",
            "type": "string",
            "description": "Economy name."
          },
          {
            "name": "region",
            "type": "string",
            "description": "World Bank region."
          },
          {
            "name": "income_group",
            "type": "string",
            "description": "Current income group (the latest fiscal year in income-groups.csv).",
            "constraints": {
              "enum": [
                "low",
                "lower-middle",
                "upper-middle",
                "high"
              ]
            }
          },
          {
            "name": "lending_category",
            "type": "string",
            "description": "World Bank lending category: IDA (poorest, concessional), IBRD, Blend (both), or Not classified (not a borrower).",
            "constraints": {
              "enum": [
                "IDA",
                "IBRD",
                "Blend",
                "Not classified"
              ]
            }
          }
        ],
        "primaryKey": [
          "iso3"
        ]
      }
    },
    {
      "path": "data/economies-by-group.csv",
      "name": "economies-by-group",
      "title": "Number of economies in each income group, by fiscal year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "fiscal_year",
            "type": "integer",
            "description": "World Bank fiscal year."
          },
          {
            "name": "data_year",
            "type": "integer",
            "description": "Calendar year of the GNI data."
          },
          {
            "name": "low",
            "type": "integer",
            "description": "Economies in the low group.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "lower_middle",
            "type": "integer",
            "description": "Economies in the lower-middle group.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "upper_middle",
            "type": "integer",
            "description": "Economies in the upper-middle group.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "high",
            "type": "integer",
            "description": "Economies in the high group.",
            "constraints": {
              "minimum": 0
            }
          }
        ],
        "primaryKey": [
          "fiscal_year"
        ]
      }
    },
    {
      "path": "data/moves-since-2000.csv",
      "name": "moves-since-2000",
      "title": "Economies that moved up or down an income group since 2000",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "move",
            "type": "string",
            "description": "Change in income group between fiscal year 2002 (GNI year 2000) and the latest fiscal year.",
            "constraints": {
              "enum": [
                "up 2 or 3 groups",
                "up 1 group",
                "no change",
                "down"
              ]
            }
          },
          {
            "name": "economies",
            "type": "integer",
            "description": "Number of economies classified in both years.",
            "constraints": {
              "minimum": 0
            }
          }
        ],
        "primaryKey": [
          "move"
        ]
      }
    },
    {
      "path": "data/moves-since-2000-by-economy.csv",
      "name": "moves-since-2000-by-economy",
      "title": "Income group in fiscal year 2002 and now, by economy",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "iso3",
            "type": "string",
            "description": "World Bank economy code."
          },
          {
            "name": "economy",
            "type": "string",
            "description": "Economy name."
          },
          {
            "name": "income_group_fy2002",
            "type": "string",
            "description": "Income group in fiscal year 2002 (GNI year 2000).",
            "constraints": {
              "enum": [
                "low",
                "lower-middle",
                "upper-middle",
                "high"
              ]
            }
          },
          {
            "name": "income_group_fy2027",
            "type": "string",
            "description": "Income group in fiscal year 2027 (GNI year 2025). Renamed with the latest year on each yearly refresh.",
            "constraints": {
              "enum": [
                "low",
                "lower-middle",
                "upper-middle",
                "high"
              ]
            }
          },
          {
            "name": "groups_moved",
            "type": "integer",
            "description": "Groups moved: positive is up, negative is down.",
            "constraints": {
              "minimum": -3,
              "maximum": 3
            }
          }
        ],
        "primaryKey": [
          "iso3"
        ]
      }
    }
  ],
  "views": [
    {
      "name": "economies-by-group",
      "title": "Economies in each World Bank income group",
      "description": "Number of economies in each World Bank income group, by fiscal year. High-income economies rose from 41 in 1989 to 87 in 2027, while low-income ones fell from a peak of 66 in 2003 to 25. Upper-middle income nearly doubled, from 30 to 59.",
      "resourceName": "economies-by-group",
      "specType": "plot",
      "spec": {
        "height": 400,
        "marginLeft": 48,
        "marginRight": 16,
        "x": {
          "tickFormat": "d",
          "label": "Fiscal year"
        },
        "y": {
          "grid": true,
          "domain": [
            0,
            100
          ],
          "label": "Economies"
        },
        "marks": [
          {
            "type": "line",
            "x": "fiscal_year",
            "y": "low",
            "stroke": "#8b929d",
            "sort": "fiscal_year"
          },
          {
            "type": "line",
            "x": "fiscal_year",
            "y": "lower_middle",
            "stroke": "#8b929d",
            "sort": "fiscal_year"
          },
          {
            "type": "line",
            "x": "fiscal_year",
            "y": "upper_middle",
            "stroke": "#8b929d",
            "sort": "fiscal_year"
          },
          {
            "type": "line",
            "x": "fiscal_year",
            "y": "high",
            "stroke": "#111827",
            "sort": "fiscal_year"
          },
          {
            "type": "text",
            "staticData": [
              {
                "fiscal_year": 2027,
                "high": 87,
                "label": "High income: 87"
              }
            ],
            "x": "fiscal_year",
            "y": "high",
            "text": "label",
            "textAnchor": "end",
            "dy": -6
          },
          {
            "type": "text",
            "staticData": [
              {
                "fiscal_year": 2027,
                "upper_middle": 59,
                "label": "Upper-middle: 59"
              }
            ],
            "x": "fiscal_year",
            "y": "upper_middle",
            "text": "label",
            "textAnchor": "end",
            "dy": -6
          },
          {
            "type": "text",
            "staticData": [
              {
                "fiscal_year": 2027,
                "lower_middle": 47,
                "label": "Lower-middle: 47"
              }
            ],
            "x": "fiscal_year",
            "y": "lower_middle",
            "text": "label",
            "textAnchor": "end",
            "dy": -6
          },
          {
            "type": "text",
            "staticData": [
              {
                "fiscal_year": 2027,
                "low": 25,
                "label": "Low: 25"
              }
            ],
            "x": "fiscal_year",
            "y": "low",
            "text": "label",
            "textAnchor": "end",
            "dy": -6
          }
        ]
      }
    },
    {
      "name": "moves-since-2000",
      "title": "Economies that changed income group since 2000",
      "description": "Of 205 economies classified in both fiscal 2002 and 2027, 102 moved up at least one group and 100 stayed put. Only 3 fell: Lebanon, Syria and Venezuela. Fourteen jumped two groups or more, including Indonesia, Vietnam, Russia and Ukraine.",
      "resourceName": "moves-since-2000",
      "specType": "plot",
      "spec": {
        "height": 320,
        "marginLeft": 48,
        "x": {
          "domain": [
            "down",
            "no change",
            "up 1 group",
            "up 2 or 3 groups"
          ]
        },
        "y": {
          "grid": true,
          "domain": [
            0,
            120
          ],
          "label": "Economies"
        },
        "marks": [
          {
            "type": "barY",
            "x": "move",
            "y": "economies",
            "fill": "#111827"
          },
          {
            "type": "text",
            "x": "move",
            "y": "economies",
            "text": "economies",
            "textAnchor": "middle",
            "dy": -8
          }
        ]
      }
    }
  ]
}
