{
  "name": "world-energy-by-country",
  "title": "Energy Production and Consumption by Country",
  "description": "Energy production and consumption in every country since 1980, by fuel: coal, oil, gas, nuclear and renewables. The world used about 600 quadrillion Btu in 2024, more than twice the 1980 total, and China alone used 28%.",
  "status": "monitored",
  "keywords": [
    "energy consumption by country",
    "energy production by country",
    "primary energy",
    "coal consumption",
    "oil consumption",
    "natural gas consumption",
    "nuclear power",
    "renewable energy",
    "energy per capita",
    "EIA",
    "international energy statistics",
    "quad Btu"
  ],
  "licenses": [
    {
      "name": "US-PD",
      "title": "EIA Copyrights and Reuse: \"U.S. government publications are in the public domain and are not subject to copyright protection.\"",
      "path": "https://www.eia.gov/about/copyrights_reuse.php"
    }
  ],
  "sources": [
    {
      "title": "U.S. Energy Information Administration (EIA), International Energy Statistics (bulk file INTL.zip, updated 2026-11-19)",
      "path": "https://www.eia.gov/opendata/bulk/INTL.zip"
    },
    {
      "title": "EIA, International Energy Statistics (data browser)",
      "path": "https://www.eia.gov/international/data/world"
    }
  ],
  "upkeep": {
    "mode": "living",
    "refresh": "annual",
    "workflow": ".github/workflows/update.yml"
  },
  "resources": [
    {
      "path": "data/energy-by-country.csv",
      "name": "energy-by-country",
      "title": "Energy production and consumption by country, fuel and year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "country",
            "type": "string",
            "description": "Country or territory as EIA names it. Includes former states reported for the years before they split (Former U.S.S.R. to 1991, Germany East and West to 1990, Former Czechoslovakia, Former Yugoslavia, Former Serbia and Montenegro, Netherlands Antilles): see countries.csv."
          },
          {
            "name": "iso3",
            "type": "string",
            "description": "ISO 3166-1 alpha-3 code (XKX for Kosovo; ISO 3166-3 codes for former states; empty for West Germany, which has none)."
          },
          {
            "name": "year",
            "type": "integer",
            "constraints": {
              "minimum": 1980
            },
            "description": "Calendar year, 1980 to the latest year EIA has published."
          },
          {
            "name": "fuel",
            "type": "string",
            "constraints": {
              "enum": [
                "total",
                "coal",
                "oil",
                "gas",
                "nuclear",
                "renewables"
              ]
            },
            "description": "Fuel: `total` (all fuels), `coal`, `oil` (petroleum and other liquids), `gas` (natural gas), `nuclear`, `renewables` (EIA's 'renewables and other': hydro, biomass and waste, geothermal, wind, solar, tide and wave, and for consumption net electricity imports). Per-capita rows are `total` only."
          },
          {
            "name": "measure",
            "type": "string",
            "constraints": {
              "enum": [
                "production",
                "consumption",
                "consumption_per_capita"
              ]
            },
            "description": "`production` or `consumption` of primary energy in quad Btu, or `consumption_per_capita` (all fuels, million Btu per person)."
          },
          {
            "name": "value",
            "type": "number",
            "description": "Quadrillion Btu for production and consumption (consumption can be negative for a fuel when net electricity imports are counted in renewables), million Btu per person for consumption_per_capita. Rounded to 6 decimals (3 for per capita). Missing values are left out, not zero."
          },
          {
            "name": "unit",
            "type": "string",
            "constraints": {
              "enum": [
                "quad Btu",
                "million Btu per person"
              ]
            },
            "description": "`quad Btu` (quadrillion British thermal units; 1 quad = 1.055 exajoules) or `million Btu per person`."
          }
        ],
        "primaryKey": [
          "country",
          "year",
          "fuel",
          "measure"
        ]
      }
    },
    {
      "path": "data/world-and-regions.csv",
      "name": "world-and-regions",
      "title": "World and regional energy production and consumption by fuel and year",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "region",
            "type": "string",
            "description": "World, the seven continental regions EIA defines, the European Union, OECD, Non-OECD or OPEC."
          },
          {
            "name": "code",
            "type": "string",
            "description": "EIA's code for the region (WLD for the world)."
          },
          {
            "name": "year",
            "type": "integer",
            "constraints": {
              "minimum": 1980
            },
            "description": "Calendar year, 1980 to the latest year EIA has published."
          },
          {
            "name": "fuel",
            "type": "string",
            "constraints": {
              "enum": [
                "total",
                "coal",
                "oil",
                "gas",
                "nuclear",
                "renewables"
              ]
            },
            "description": "Fuel: `total` (all fuels), `coal`, `oil` (petroleum and other liquids), `gas` (natural gas), `nuclear`, `renewables` (EIA's 'renewables and other': hydro, biomass and waste, geothermal, wind, solar, tide and wave, and for consumption net electricity imports). Per-capita rows are `total` only."
          },
          {
            "name": "measure",
            "type": "string",
            "constraints": {
              "enum": [
                "production",
                "consumption",
                "consumption_per_capita"
              ]
            },
            "description": "`production` or `consumption` of primary energy in quad Btu, or `consumption_per_capita` (all fuels, million Btu per person)."
          },
          {
            "name": "value",
            "type": "number",
            "description": "Quadrillion Btu for production and consumption (consumption can be negative for a fuel when net electricity imports are counted in renewables), million Btu per person for consumption_per_capita. Rounded to 6 decimals (3 for per capita). Missing values are left out, not zero."
          },
          {
            "name": "unit",
            "type": "string",
            "constraints": {
              "enum": [
                "quad Btu",
                "million Btu per person"
              ]
            },
            "description": "`quad Btu` (quadrillion British thermal units; 1 quad = 1.055 exajoules) or `million Btu per person`."
          }
        ],
        "primaryKey": [
          "region",
          "year",
          "fuel",
          "measure"
        ]
      }
    },
    {
      "path": "data/population.csv",
      "name": "population",
      "title": "Population by country and year (EIA)",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "country",
            "type": "string",
            "description": "Country as in energy-by-country.csv."
          },
          {
            "name": "iso3",
            "type": "string",
            "description": "ISO 3166-1 alpha-3 code, as in energy-by-country.csv."
          },
          {
            "name": "year",
            "type": "integer",
            "constraints": {
              "minimum": 1980
            },
            "description": "Calendar year, 1980 to the latest year EIA has published."
          },
          {
            "name": "population",
            "type": "number",
            "constraints": {
              "minimum": 0
            },
            "description": "Population in thousands, from EIA's own series (the one behind its per-capita figures)."
          }
        ],
        "primaryKey": [
          "country",
          "year"
        ]
      }
    },
    {
      "path": "data/countries.csv",
      "name": "countries",
      "title": "Countries and former states in the data",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "schema": {
        "fields": [
          {
            "name": "iso3",
            "type": "string",
            "description": "ISO 3166 alpha-3 code as used in energy-by-country.csv (empty for West Germany)."
          },
          {
            "name": "country",
            "type": "string",
            "description": "Country name as in energy-by-country.csv."
          },
          {
            "name": "eia_code",
            "type": "string",
            "description": "EIA's own code for the entity."
          },
          {
            "name": "status",
            "type": "string",
            "constraints": {
              "enum": [
                "current",
                "former"
              ]
            },
            "description": "`former` for states that no longer exist (EIA reports them for the years before they split)."
          },
          {
            "name": "first_year",
            "type": "integer",
            "description": "First year with any value."
          },
          {
            "name": "last_year",
            "type": "integer",
            "description": "Last year with any value."
          }
        ],
        "primaryKey": [
          "country"
        ]
      }
    }
  ],
  "views": [
    {
      "name": "world-consumption",
      "resourceName": "world-and-regions",
      "specType": "plot",
      "title": "World energy consumption since 1980",
      "description": "Primary energy used worldwide, in quadrillion Btu. Use roughly doubled, from about 280 in 1980 to about 600 in 2024. The largest fall was the 2020 Covid year, down 4%; 1981 and 2009 each lost about 1%.",
      "spec": {
        "height": 400,
        "marginLeft": 56,
        "filter": [
          {
            "field": "region",
            "eq": "World"
          },
          {
            "field": "fuel",
            "eq": "total"
          },
          {
            "field": "measure",
            "eq": "consumption"
          }
        ],
        "x": {
          "tickFormat": "d"
        },
        "y": {
          "tickFormat": ",d",
          "grid": true,
          "domain": [
            0,
            700
          ],
          "label": "Quadrillion Btu"
        },
        "marks": [
          {
            "type": "ruleX",
            "staticData": [
              {
                "year": 2020
              }
            ],
            "x": "year",
            "stroke": "#8b929d",
            "strokeDasharray": "4,4",
            "tip": false
          },
          {
            "type": "areaY",
            "x": "year",
            "y": "value",
            "fill": "#111827",
            "fillOpacity": 0.06,
            "tip": false
          },
          {
            "type": "line",
            "x": "year",
            "y": "value",
            "stroke": "#111827",
            "sort": "year"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 1980,
                "value": 281,
                "label": "1980: about 280"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "textAnchor": "start"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2020,
                "value": 547,
                "label": "2020: down 4%"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": 22,
            "textAnchor": "end",
            "dx": -6,
            "stroke": "#555555"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "value": 606,
                "label": "2024: about 600"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          }
        ]
      }
    },
    {
      "name": "regional-consumption",
      "resourceName": "world-and-regions",
      "specType": "plot",
      "title": "Energy use by world region since 1980",
      "description": "Asia and Oceania went from about 50 quadrillion Btu in 1980 to about 290 in 2024, nearly half of world use. North America is up by a third to about 115; Europe has fallen to about 68, below its 1980 level of 72.",
      "spec": {
        "height": 400,
        "marginLeft": 56,
        "filter": [
          {
            "field": "fuel",
            "eq": "total"
          },
          {
            "field": "measure",
            "eq": "consumption"
          }
        ],
        "x": {
          "tickFormat": "d"
        },
        "y": {
          "tickFormat": ",d",
          "grid": true,
          "domain": [
            0,
            320
          ],
          "label": "Quadrillion Btu"
        },
        "marks": [
          {
            "type": "line",
            "x": "year",
            "y": "value",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "region",
                "eq": "North America"
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "value",
            "stroke": "#8b929d",
            "sort": "year",
            "filter": [
              {
                "field": "region",
                "eq": "Europe"
              }
            ]
          },
          {
            "type": "line",
            "x": "year",
            "y": "value",
            "stroke": "#111827",
            "sort": "year",
            "filter": [
              {
                "field": "region",
                "eq": "Asia & Oceania"
              }
            ]
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "value": 288,
                "label": "Asia & Oceania: about 290"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "value": 115,
                "label": "North America: about 115"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": -10,
            "textAnchor": "end"
          },
          {
            "type": "text",
            "staticData": [
              {
                "year": 2024,
                "value": 67,
                "label": "Europe: about 68"
              }
            ],
            "x": "year",
            "y": "value",
            "text": "label",
            "dy": 16,
            "textAnchor": "end"
          }
        ]
      }
    },
    {
      "name": "consumption-by-fuel",
      "resourceName": "world-and-regions",
      "specType": "plot",
      "title": "World energy use by fuel since 1980",
      "description": "Oil is still the biggest fuel at about 200 quadrillion Btu in 2024, but coal has more than doubled to about 180 and gas has nearly tripled to about 155. Renewables grew fivefold to about 43 and nuclear to about 28.",
      "spec": {
        "height": 400,
        "marginLeft": 56,
        "filter": [
          {
            "field": "region",
            "eq": "World"
          },
          {
            "field": "measure",
            "eq": "consumption"
          }
        ],
        "x": {
          "tickFormat": "d"
        },
        "y": {
          "tickFormat": ",d",
          "grid": true,
          "domain": [
            0,
            700
          ],
          "label": "Quadrillion Btu"
        },
        "marks": [
          {
            "type": "line",
            "x": "year",
            "y": "value",
            "stroke": "fuel",
            "sort": "year"
          }
        ]
      }
    }
  ]
}
