{
  "name": "refugees-by-country",
  "title": "Refugees and Other People in UNHCR's Population Statistics, by Country of Asylum and Origin, 1951-2026",
  "description": "UNHCR's population statistics by year, 1951 to mid-2026: refugees under UNHCR's mandate, asylum-seekers, other people in need of international protection, internally displaced people (IDPs) of concern to UNHCR, stateless persons, others of concern, returned refugees, returned IDPs and host community members, each as its own column, plus Palestine refugees under UNRWA's mandate (compiled by UNRWA and published in UNHCR's database). Three tables: by country of asylum, by country of origin, and by country of asylum and origin (refugees, asylum-seekers and other people in need of international protection). The nominal reporting periods are end-year for 1951-2025 and mid-year for 2026, as marked in the period column. Stocks generally refer to 31 December or 30 June; returns are flows over the reporting period. Individual source figures can have earlier reference dates. Updated every six months from UNHCR's Refugee Statistics API. Source: UNHCR Refugee Data Finder (CC BY 4.0); UNRWA for Palestine refugees under UNRWA's mandate.",
  "status": "monitored",
  "licenses": [
    {
      "name": "CC-BY-4.0",
      "title": "Creative Commons Attribution 4.0 International. UNHCR distributes this database under CC BY 4.0: its `refugees` package (UNHCR copyright holder) gives \"License: CC BY 4.0\" and says \"This package is released under the Creative Commons Attribution 4.0 International Public License\". Credit: UNHCR Refugee Data Finder; figures for Palestine refugees under UNRWA's mandate: UNRWA, via UNHCR.",
      "path": "https://cran.r-project.org/package=refugees"
    }
  ],
  "sources": [
    {
      "title": "UNHCR Refugee Data Finder (Refugee Population Statistics Database)",
      "path": "https://www.unhcr.org/refugee-statistics/"
    },
    {
      "title": "UNHCR Refugee Statistics API, population and unrwa endpoints (how the data were retrieved)",
      "path": "https://api.unhcr.org/docs/refugee-statistics.html"
    },
    {
      "title": "UNHCR Refugee Data Finder, methodology and definitions",
      "path": "https://www.unhcr.org/refugee-statistics/methodology/definitions/"
    },
    {
      "title": "UNRWA (United Nations Relief and Works Agency for Palestine Refugees in the Near East): Palestine refugees registered under UNRWA's mandate, as published in UNHCR's database",
      "path": "https://www.unrwa.org/"
    }
  ],
  "upkeep": { "mode": "living", "refresh": "annual", "workflow": ".github/workflows/update.yml" },
  "resources": [
    {
      "path": "data/by-asylum.csv",
      "name": "by-asylum",
      "title": "UNHCR population statistics by year and country of asylum",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          { "name": "year", "type": "integer", "description": "Reporting year. Stock reference dates are nominally 31 December for end-year and 30 June for mid-year; returns are flows over the reporting period. Individual source figures can have earlier reference dates; see archive/footnotes.csv." },
          { "name": "period", "type": "string", "constraints": { "enum": ["end-year", "mid-year"] }, "description": "Nominal reporting period: end-year (31 December) or mid-year (30 June). In this release 2026 is mid-year and 1951-2025 are end-year. Individual figures can refer to earlier dates; see archive/footnotes.csv." },
          { "name": "country_of_asylum", "type": "string", "description": "Country or territory of asylum or residence, as UNHCR names it. \"Unknown\" where UNHCR or UNRWA does not know it." },
          { "name": "country_of_asylum_iso", "type": "string", "description": "ISO 3166-1 alpha-3 code of the country of asylum as UNHCR gives it (UNK: unknown)." },
          { "name": "refugees", "type": "integer", "description": "UNHCR: \"Refugees under UNHCR's mandate\". People recognised as refugees under the 1951 Convention and its 1967 Protocol, the 1969 OAU Convention or UNHCR's Statute, people granted complementary forms of protection or temporary protection, and, since 2007, people in refugee-like situations. Excludes Palestine refugees under UNRWA's mandate. Empty where UNHCR gives no figure." },
          { "name": "asylum_seekers", "type": "integer", "description": "UNHCR: \"Asylum-seekers\". People who have sought international protection and whose claims have not yet been determined, whenever they applied. Figures are mostly from 1993 on; earlier years are 0 in UNHCR's table." },
          { "name": "other_in_need_of_protection", "type": "integer", "description": "UNHCR: \"Other people in need of international protection\". People outside their country or territory of origin, typically because they have been forcibly displaced across international borders, who are not reported in the other categories but likely need international protection (for example Venezuelans abroad, and from end-2025 some Afghans previously counted as in a refugee-like situation). Reported from 2018; empty where UNHCR gives no figure." },
          { "name": "idps", "type": "integer", "description": "UNHCR: \"IDPs of concern to UNHCR\". People forced to leave their homes, mainly by conflict, violence or persecution, who have not crossed an international border and whom UNHCR protects or assists. Not the global IDP count (which UNHCR takes from IDMC for its headline totals)." },
          { "name": "stateless", "type": "integer", "description": "UNHCR: \"Stateless persons\". Stateless persons are not considered nationals by any State under the operation of its law. Source figures also include some people of undetermined nationality or at risk of statelessness; consult country footnotes. Some stateless refugees and asylum-seekers are counted in both this column and those categories, so do not add this column to the others." },
          { "name": "others_of_concern", "type": "integer", "description": "UNHCR: \"Others of concern\". People who are not in the other groups but to whom UNHCR extends protection or assistance." },
          { "name": "returned_refugees", "type": "integer", "description": "UNHCR: \"Returned refugees\". Refugees who returned to their country of origin during the year (a flow, not a stock; January to June for a mid-year period). UNHCR records them against the country they returned from, so this row is the country of asylum they left." },
          { "name": "returned_idps", "type": "integer", "description": "UNHCR: \"Returned IDPs\". IDPs of concern to UNHCR who returned to their place of origin during the year (a flow; January to June for a mid-year period)." },
          { "name": "host_community", "type": "integer", "description": "UNHCR: \"Host Community\". Members of host communities reported by UNHCR operations, mostly from 2019 on. Not displaced people." },
          { "name": "unrwa_refugees", "type": "integer", "description": "Palestine refugees registered under UNRWA's mandate (UNRWA's figures, published in UNHCR's database). UNRWA works in Jordan, Lebanon, Syria and the State of Palestine (West Bank and Gaza); in 2025-2026 part of the total has country of asylum Unknown. Empty for every other country." }
        ],
        "primaryKey": ["year", "country_of_asylum_iso"]
      }
    },
    {
      "path": "data/by-origin.csv",
      "name": "by-origin",
      "title": "UNHCR population statistics by year and country of origin",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          { "name": "year", "type": "integer", "description": "Year (see by-asylum)." },
          { "name": "period", "type": "string", "constraints": { "enum": ["end-year", "mid-year"] }, "description": "Nominal reporting period: end-year (31 December) or mid-year (30 June). In this release 2026 is mid-year and 1951-2025 are end-year. Individual figures can refer to earlier dates; see archive/footnotes.csv." },
          { "name": "country_of_origin", "type": "string", "description": "Country or territory of origin, as UNHCR names it. \"Stateless\" and \"Unknown\" where UNHCR records no country of origin; for IDPs and host communities the origin is usually the country they live in; stateless persons are recorded under Stateless (XXA) in this release." },
          { "name": "country_of_origin_iso", "type": "string", "description": "ISO 3166-1 alpha-3 code as UNHCR gives it (XXA: stateless; UNK: unknown)." },
          { "name": "refugees", "type": "integer", "description": "Refugees under UNHCR's mandate (definition in by-asylum)." },
          { "name": "asylum_seekers", "type": "integer", "description": "Asylum-seekers (definition in by-asylum)." },
          { "name": "other_in_need_of_protection", "type": "integer", "description": "Other people in need of international protection (definition in by-asylum). From 2018; empty where UNHCR gives no figure." },
          { "name": "idps", "type": "integer", "description": "IDPs of concern to UNHCR (definition in by-asylum)." },
          { "name": "stateless", "type": "integer", "description": "Stateless persons (definition in by-asylum; may overlap with refugees and asylum-seekers)." },
          { "name": "others_of_concern", "type": "integer", "description": "Others of concern to UNHCR (definition in by-asylum)." },
          { "name": "returned_refugees", "type": "integer", "description": "Refugees from this country who returned to it during the year (a flow)." },
          { "name": "returned_idps", "type": "integer", "description": "IDPs who returned to their place of origin during the year (a flow)." },
          { "name": "host_community", "type": "integer", "description": "Host community members (definition in by-asylum)." },
          { "name": "unrwa_refugees", "type": "integer", "description": "Palestine refugees registered under UNRWA's mandate (UNRWA, via UNHCR), on the Palestinian row only; empty elsewhere." }
        ],
        "primaryKey": ["year", "country_of_origin_iso"]
      }
    },
    {
      "path": "data/asylum-origin.csv",
      "name": "asylum-origin",
      "title": "Refugees, asylum-seekers and other people in need of international protection by year, country of asylum and country of origin",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          { "name": "year", "type": "integer", "description": "Year (see by-asylum)." },
          { "name": "period", "type": "string", "constraints": { "enum": ["end-year", "mid-year"] }, "description": "Nominal reporting period: end-year (31 December) or mid-year (30 June). In this release 2026 is mid-year and 1951-2025 are end-year. Individual figures can refer to earlier dates; see archive/footnotes.csv." },
          { "name": "country_of_asylum", "type": "string", "description": "Country or territory of asylum, as UNHCR names it." },
          { "name": "country_of_asylum_iso", "type": "string", "description": "ISO 3166-1 alpha-3 code of the country of asylum as UNHCR gives it (UNK: unknown)." },
          { "name": "country_of_origin", "type": "string", "description": "Country or territory of origin, as UNHCR names it (\"Stateless\", \"Unknown\" where none is recorded)." },
          { "name": "country_of_origin_iso", "type": "string", "description": "ISO 3166-1 alpha-3 code of the country of origin as UNHCR gives it (XXA: stateless; UNK: unknown)." },
          { "name": "refugees", "type": "integer", "description": "Refugees under UNHCR's mandate (definition in by-asylum)." },
          { "name": "asylum_seekers", "type": "integer", "description": "Asylum-seekers (definition in by-asylum)." },
          { "name": "other_in_need_of_protection", "type": "integer", "description": "Other people in need of international protection (definition in by-asylum). Empty where UNHCR gives no figure." }
        ],
        "primaryKey": ["year", "country_of_asylum_iso", "country_of_origin_iso"]
      }
    }
  ],
  "views": [
    {
      "name": "world-trend",
      "title": "Refugees (UNHCR and UNRWA), asylum-seekers and other people in need of international protection worldwide, 1951–mid-2026 (millions; 1951–2025 end-year)",
      "resources": ["by-asylum"],
      "specType": "vega-lite",
      "spec": {
        "width": "container",
        "height": 340,
        "transform": [
          { "fold": ["refugees", "unrwa_refugees", "asylum_seekers", "other_in_need_of_protection"], "as": ["k", "v"] },
          { "filter": "isValid(datum.v) && datum.v !== ''" },
          { "aggregate": [{ "op": "sum", "field": "v", "as": "v" }], "groupby": ["year", "period", "k"] },
          { "calculate": "datum.v / 1e6", "as": "millions" },
          { "calculate": "{'refugees': 'Refugees (UNHCR mandate)', 'unrwa_refugees': 'Palestine refugees (UNRWA mandate)', 'asylum_seekers': 'Asylum-seekers', 'other_in_need_of_protection': 'Other people in need of international protection'}[datum.k]", "as": "group" }
        ],
        "mark": { "type": "line", "strokeWidth": 1.75 },
        "encoding": {
          "x": { "field": "year", "type": "quantitative", "axis": { "title": null, "format": "d" } },
          "y": { "field": "millions", "type": "quantitative", "axis": { "title": "Millions of people" } },
          "color": { "field": "group", "type": "nominal", "title": null, "sort": ["Refugees (UNHCR mandate)", "Palestine refugees (UNRWA mandate)", "Asylum-seekers", "Other people in need of international protection"] },
          "tooltip": [
            { "field": "year", "type": "quantitative", "format": "d" },
            { "field": "period", "type": "nominal" },
            { "field": "group", "type": "nominal" },
            { "field": "millions", "type": "quantitative", "format": ".2f" }
          ]
        }
      }
    }
  ]
}
