{
  "name": "access-to-electricity",
  "title": "Access to Electricity and Clean Cooking",
  "description": "Share of people with electricity and with clean cooking fuels in 216 countries, urban and rural, by year. About 660 million people still have no electricity, nearly nine in ten of them in sub-Saharan Africa.",
  "status": "monitored",
  "keywords": [
    "access to electricity",
    "electrification rate",
    "clean cooking",
    "people without electricity",
    "energy access",
    "SDG 7",
    "rural electrification",
    "Tracking SDG7",
    "World Bank",
    "WHO"
  ],
  "licenses": [
    {
      "name": "CC-BY-4.0",
      "title": "Creative Commons Attribution 4.0 International (World Bank)",
      "path": "https://datacatalog.worldbank.org/public-licenses"
    },
    {
      "name": "WHO data terms",
      "title": "WHO terms of use for data",
      "path": "https://www.who.int/about/policies/publishing/data-policy/terms-and-conditions"
    }
  ],
  "sources": [
    {
      "title": "World Bank, World Development Indicators: Access to electricity (% of population), EG.ELC.ACCS.ZS, with urban (EG.ELC.ACCS.UR.ZS) and rural (EG.ELC.ACCS.RU.ZS); compiled by the World Bank for Tracking SDG7 (SDG 7.1.1 Electrification Dataset)",
      "path": "https://api.worldbank.org/v2/country/all/indicator/EG.ELC.ACCS.ZS?format=json"
    },
    {
      "title": "World Bank, World Development Indicators: Population, total, SP.POP.TOTL (used for the computed counts)",
      "path": "https://api.worldbank.org/v2/country/all/indicator/SP.POP.TOTL?format=json"
    },
    {
      "title": "World Health Organization, Global Health Observatory: Proportion of population with primary reliance on clean fuels and technologies for cooking (%), PHE_HHAIR_PROP_POP_CLEAN_FUELS",
      "path": "https://ghoapi.azureedge.net/api/PHE_HHAIR_PROP_POP_CLEAN_FUELS"
    },
    {
      "title": "Tracking SDG7: The Energy Progress Report (World Bank ESMAP, IEA, IRENA, UNSD, WHO)",
      "path": "https://trackingsdg7.esmap.org/"
    }
  ],
  "upkeep": {
    "mode": "living",
    "refresh": "annual",
    "workflow": ".github/workflows/update.yml"
  },
  "resources": [
    {
      "path": "data/access-by-country.csv",
      "name": "access-by-country",
      "title": "Access to electricity and clean cooking, by country and year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "country",
            "type": "string",
            "description": "Country or economy, using World Bank names (216 of the World Bank's 217 country-level economies; World Bank aggregates such as regions are not included)."
          },
          {
            "name": "iso3",
            "type": "string",
            "description": "ISO 3166-1 alpha-3 code (World Bank's code; Kosovo is XKX)."
          },
          {
            "name": "year",
            "type": "integer",
            "description": "Year, 1990 to 2024. Coverage is thin before 2000: in the 1990s only 98 to 172 economies a year have electricity figures.",
            "constraints": {
              "minimum": 1990
            }
          },
          {
            "name": "electricity_total",
            "type": "number",
            "description": "Share of the population with access to electricity, total. Compiled by the World Bank for Tracking SDG7 (SDG indicator 7.1.1), served as WDI EG.ELC.ACCS.ZS. Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "electricity_urban",
            "type": "number",
            "description": "Share of the urban population with access to electricity (WDI EG.ELC.ACCS.UR.ZS). Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "electricity_rural",
            "type": "number",
            "description": "Share of the rural population with access to electricity (WDI EG.ELC.ACCS.RU.ZS). Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "population",
            "type": "integer",
            "description": "Total population in the year (WDI SP.POP.TOTL), used to compute people_without_electricity.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "people_without_electricity",
            "type": "integer",
            "description": "Computed for this dataset: population x (100 - electricity_total) / 100, using electricity_total as given in this file, rounded to a whole person. An approximation of the number of people without electricity, not a figure published by the World Bank. Blank where either input is missing.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "clean_cooking_total",
            "type": "number",
            "description": "Share of the population with primary reliance on clean fuels and technologies for cooking, total. WHO Global Health Observatory indicator PHE_HHAIR_PROP_POP_CLEAN_FUELS, published as whole percentages (2000 onwards). Kerosene is excluded from clean cooking fuels under WHO guidelines. Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "clean_cooking_urban",
            "type": "number",
            "description": "Same as clean_cooking_total, urban population. Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "clean_cooking_rural",
            "type": "number",
            "description": "Same as clean_cooking_total, rural population. Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          }
        ],
        "primaryKey": [
          "iso3",
          "year"
        ]
      }
    },
    {
      "path": "data/world.csv",
      "name": "world",
      "title": "World access to electricity, people without it and clean cooking, by year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "year",
            "type": "integer",
            "description": "Year, 1998 to 2024 (the first year the World Bank gives a world electricity figure).",
            "constraints": {
              "minimum": 1990
            }
          },
          {
            "name": "electricity_total",
            "type": "number",
            "description": "Share of the world population with access to electricity (World Bank's World aggregate, WDI EG.ELC.ACCS.ZS). Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "population",
            "type": "integer",
            "description": "World population (WDI SP.POP.TOTL, World aggregate).",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "people_without_electricity",
            "type": "integer",
            "description": "Computed for this dataset: world population x (100 - electricity_total) / 100, using electricity_total as given in this file. Not a World Bank figure; in 2024 it is about 2 million above the sum of the country values.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "millions_without_electricity",
            "type": "number",
            "description": "people_without_electricity in millions, one decimal (computed; used by the chart)."
          },
          {
            "name": "clean_cooking_total",
            "type": "number",
            "description": "Share of the world population with primary reliance on clean fuels and technologies for cooking (WHO's global figure, whole percentages; 2000 onwards, blank before). Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          }
        ],
        "primaryKey": [
          "year"
        ]
      }
    },
    {
      "path": "data/without-electricity-latest.csv",
      "name": "without-electricity-latest",
      "title": "The 15 countries with the most people without electricity, latest year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "rank",
            "type": "integer",
            "description": "1 = most people without electricity in the latest year.",
            "constraints": {
              "minimum": 1
            }
          },
          {
            "name": "country",
            "type": "string",
            "description": "Country, World Bank name."
          },
          {
            "name": "iso3",
            "type": "string",
            "description": "ISO 3166-1 alpha-3 code."
          },
          {
            "name": "year",
            "type": "integer",
            "description": "Latest year (2024)."
          },
          {
            "name": "electricity_total",
            "type": "number",
            "description": "Share of the population with access to electricity. Percent of the population (0 to 100).",
            "constraints": {
              "minimum": 0,
              "maximum": 100
            }
          },
          {
            "name": "population",
            "type": "integer",
            "description": "Total population (WDI).",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "people_without_electricity",
            "type": "integer",
            "description": "Computed: population x (100 - electricity_total) / 100.",
            "constraints": {
              "minimum": 0
            }
          },
          {
            "name": "millions_without_electricity",
            "type": "number",
            "description": "people_without_electricity in millions, one decimal (computed; used by the chart)."
          }
        ],
        "primaryKey": [
          "rank"
        ]
      }
    }
  ],
  "views": [
    {
      "name": "people-without-electricity",
      "title": "People without electricity since 1998",
      "description": "Estimated people living without electricity, in millions (computed from World Bank access shares and population). The count fell from about 1.6 billion in 1998 to about 660 million in 2024, while the world's population grew by more than a third.",
      "resourceName": "world",
      "specType": "plot",
      "spec": {
        "height": 400,
        "marginLeft": 56,
        "x": {
          "tickFormat": "d"
        },
        "y": {
          "tickFormat": ",d",
          "grid": true,
          "domain": [
            0,
            1800
          ],
          "label": "Millions of people without electricity"
        },
        "marks": [
          {
            "type": "areaY",
            "x": "year",
            "y": "millions_without_electricity",
            "fill": "#111827",
            "fillOpacity": 0.06,
            "tip": false
          },
          {
            "type": "line",
            "x": "year",
            "y": "millions_without_electricity",
            "stroke": "#111827",
            "sort": "year"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 1998,
                "millions_without_electricity": 1606.3,
                "label": "1998: about 1,600 million"
              }
            ],
            "x": "year",
            "y": "millions_without_electricity",
            "text": "label",
            "dy": -10,
            "dx": 4,
            "textAnchor": "start"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "millions_without_electricity": 657.3,
                "label": "2024: about 660 million"
              }
            ],
            "x": "year",
            "y": "millions_without_electricity",
            "text": "label",
            "dy": -12,
            "textAnchor": "end"
          }
        ]
      }
    },
    {
      "name": "most-without-electricity",
      "title": "Countries with the most people without electricity",
      "description": "Estimated people without electricity in 2024, in millions. Nigeria (87 million) and DR Congo (85 million) lead; the top ten, all in Africa, hold almost three in five of the world's total. Only about one in four Congolese has power (22.5%).",
      "resourceName": "without-electricity-latest",
      "specType": "plot",
      "spec": {
        "height": 420,
        "marginLeft": 120,
        "x": {
          "tickFormat": ",d",
          "domain": [
            0,
            100
          ],
          "label": "Millions of people without electricity, 2024"
        },
        "y": {
          "grid": false
        },
        "marks": [
          {
            "type": "barX",
            "x": "millions_without_electricity",
            "y": "country",
            "fill": "#111827",
            "sort": "millions_without_electricity"
          },
          {
            "type": "text",
            "x": "millions_without_electricity",
            "y": "country",
            "text": "millions_without_electricity",
            "textAnchor": "start",
            "dx": 4
          }
        ]
      }
    },
    {
      "name": "world-share",
      "title": "Share of the world with electricity and clean cooking",
      "description": "Share of the world's people with electricity (World Bank) and with clean fuels for cooking (WHO). Electricity went from 78% in 2000 to 92% in 2024; clean cooking from 47% to 75%, so a quarter of humanity still cooks with polluting fuels.",
      "resourceName": "world",
      "specType": "plot",
      "spec": {
        "height": 380,
        "marginLeft": 56,
        "x": {
          "tickFormat": "d"
        },
        "y": {
          "tickFormat": ",d",
          "grid": true,
          "domain": [
            0,
            100
          ],
          "label": "Percent of world population"
        },
        "marks": [
          {
            "type": "line",
            "x": "year",
            "y": "clean_cooking_total",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "clean_cooking_total",
                "notNull": true
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "electricity_total",
            "stroke": "#111827",
            "sort": "year"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "electricity_total": 91.9,
                "label": "Electricity: 92%"
              }
            ],
            "x": "year",
            "y": "electricity_total",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "clean_cooking_total": 75,
                "label": "Clean cooking: 75%"
              }
            ],
            "x": "year",
            "y": "clean_cooking_total",
            "text": "label",
            "dy": -10,
            "textAnchor": "end",
            "stroke": "#555555"
          }
        ]
      }
    }
  ]
}
