{"id":51399299,"url":"https://github.com/shanewhi/world-energy-data","last_synced_at":"2026-07-04T05:01:19.506Z","repository":{"id":226121454,"uuid":"761502069","full_name":"shanewhi/world-energy-data","owner":"shanewhi","description":"Python tool for generation of global and national energy system charts, using data from the Global Carbon Project, the National Oceanic and Atmospheric Administration, the Energy Institute and the International Energy Agency.","archived":false,"fork":false,"pushed_at":"2026-07-02T03:23:23.000Z","size":18888,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-07-02T05:15:39.430Z","etag":null,"topics":["anthropocene","carbon-emissions","coal","electricity","energy","energy-consumption","energy-data","greenhouse-gas-emissions","oil-and-gas","pyplot","python3","renewable-energy","statistics"],"latest_commit_sha":null,"homepage":"https://www.worldenergydata.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shanewhi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-22T00:18:33.000Z","updated_at":"2026-07-02T03:23:26.000Z","dependencies_parsed_at":"2025-05-13T04:22:23.989Z","dependency_job_id":"2c9525f4-9e10-41ca-aef4-0e1e167118b9","html_url":"https://github.com/shanewhi/world-energy-data","commit_stats":null,"previous_names":["shanewhi/world-energy-data"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/shanewhi/world-energy-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanewhi%2Fworld-energy-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanewhi%2Fworld-energy-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanewhi%2Fworld-energy-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanewhi%2Fworld-energy-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shanewhi","download_url":"https://codeload.github.com/shanewhi/world-energy-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanewhi%2Fworld-energy-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35110270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropocene","carbon-emissions","coal","electricity","energy","energy-consumption","energy-data","greenhouse-gas-emissions","oil-and-gas","pyplot","python3","renewable-energy","statistics"],"created_at":"2026-07-04T05:01:18.928Z","updated_at":"2026-07-04T05:01:19.498Z","avatar_url":"https://github.com/shanewhi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2\u003eworld-energy-data\u003c/h2\u003e\n\n\u003ch3\u003ePurpose\u003c/h3\u003e\n\u003cp\u003e\nGenerates charts of annual CO\u003csub\u003e2\u003c/sub\u003e emissions, fossil fuel production, \nenergy consumption, and electricity generation of the world and specified \ncountries.\u003cbr\u003eOutput is displayed at \u003ccode\u003ehttps://www.worldenergydata.org/\u003c/code\u003e\u003c/p\u003e\n\n\u003ch3\u003eDescription\u003c/h3\u003e\n\u003cp\u003e\nThis package consists of the following files -\u003c/p\u003e\n\u003cul\u003e\n   \u003cli\u003eworld_energy_data.py (main executable)\u003c/li\u003e\n   \u003cli\u003euser_globals.py (global definitions)\u003c/li\u003e\n   \u003cli\u003ecollate.py (extracts and arranges country specific data from input dataset)\u003c/li\u003e\n   \u003cli\u003eprocess.py (calculations)\u003c/li\u003e\n   \u003cli\u003eoutput.py (chart calls)\u003c/li\u003e\n   \u003cli\u003echart.py (chart functions)\u003c/li\u003e\n   \u003cli\u003ecountries.py (country name translations between datasets)\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch3\u003eSoftware Installation Requirements\u003c/h3\u003e\n\u003cp\u003e\nRequires installation of Python v3.12.7, and library versions listed below, which can \nbe done using the terminal commands shown alongside -\u003c/p\u003e\n\u003cul\u003e\n    \u003cli\u003e\u003ca href=\"https://www.python.org/downloads/\"\u003ePython v3.12.7\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003eMatplotlib v3.10.3 \u003ccode\u003epip3.12 install matplotlib==3.10.3\u003c/code\u003e\u003c/li\u003e\n    \u003cli\u003eMatplotlib-extra v0.1.0 \u003ccode\u003epip3.12 install git+https://github.com/chenyulue/matplotlib-extra/\u003c/code\u003e\u003c/li\u003e\n    \u003cli\u003eNumpy v2.3.1 \u003ccode\u003epip3.12 install numpy==2.3.1\u003c/code\u003e\u003c/li\u003e\n    \u003cli\u003eOpenpyxl v3.1.5 \u003ccode\u003epip3.12 install openpyxl==3.1.5\u003c/code\u003e\u003c/li\u003e\n    \u003cli\u003ePandas v2.3.0 \u003ccode\u003epip3.12 install pandas==2.3.0\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch3\u003eInput Data Requirements\u003c/h3\u003e\n\u003cp\u003e\nThe following datasets are required, and are included in this package -\u003c/p\u003e\n\u003col\u003e\n    \u003cli\u003e\u003ca href=\"https://www.icos-cp.eu/impact/science/global-carbon-budget/2025\"\u003eGlobal Carbon Budget 2025 v1.0 in XLSX format\u003c/a\u003e. \n    Modify this to include the cement carbonation sink and projected values for 2025, as follows -\u003c/li\u003e\n    \u003col\u003e\n        \u003cli\u003eIn sheet titled \u003ccode\u003e'Global Carbon Budget'\u003c/code\u003e, create a new column named \u003ccode\u003e'fossil emissions including cement carbonation’\u003c/code\u003e and fill with the values of\u003cbr\u003e\n            \u003ccode\u003e'fossil emissions excluding cement carbonation'\u003c/code\u003e minus \u003ccode\u003e'cement carbonation sink'\u003c/code\u003e\u003cbr\u003e\n            Add the row \u003ccode\u003e2025\u003c/code\u003e and fill the same column with the projected value from \u003ca href=\"https://globalcarbonbudget.org/\"\u003e Table 1 of Key Messages from GCB 2025\u003c/a\u003e.\u003c/li\u003e\n        \u003cli\u003eIn sheet titled \u003ccode\u003e'Fossil Emissions by Category'\u003c/code\u003e, add the row \u003ccode\u003e2025\u003c/code\u003e and fill with the projected values for coal, oil and gas from the same document above.\u003c/li\u003e\n    \u003c/ol\u003e\n    \u003cli\u003e\u003ccode\u003eGlobally averaged marine surface annual mean data\u003c/code\u003e and \u003ccode\u003eGlobally averaged marine surface annual mean growth rates\u003c/code\u003e in CSV format from \u003ca href=\"https://gml.noaa.gov/ccgg/trends/gl_data.html\"\u003eNOAA Global Monitoring Laboratory\u003c/a\u003e.\u003c/li\u003e\n    \u003cli\u003eThe \u003ca href=\"https://www.energyinst.org/statistical-review/resources-and-data-downloads\"\u003e2026 Energy Institute Statistical Review of World Energy\u003c/a\u003e in consolidated narrow CSV format.\u003cbr\u003e\n    \u003cli\u003e\u003ca href=\"https://www.iea.org/data-and-statistics/data-tools/energy-statistics-data-browser\"\u003eIEA CO\u003csub\u003e2\u003c/sub\u003e Emissions by Sector and Total Final Consumption by Source\u003c/a\u003e for the world and each selected country.\n    Data is obtained by -\n    \u003col\u003e\n        \u003cli\u003eSelect Country\u003c/li\u003e\n        \u003cli\u003eSelect Energy Consumption\u003c/li\u003e\n        \u003cli\u003e Select Total final consumption (TFC) by source\u003c/li\u003e\n        \u003cli\u003eSelect Download chart data\u003c/li\u003e\n        \u003cli\u003eSelect Energy transition indicators\u003c/li\u003e\n        \u003cli\u003eSelect CO\u003csub\u003e2\u003c/sub\u003e emissions by sector\u003c/li\u003e\n        \u003cli\u003eSelect Download chart data\u003c/li\u003e\n    \u003c/ol\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://robbieandrew.github.io/GCB2024/CSV/s64_2024_LinearPathways.csv\"\u003eLinear emission reduction pathways\u003c/a\u003e.\n    This is the datafile from slide 64 of \u003ca href=\"https://robbieandrew.github.io/GCB2024/\"\u003eFigures from the Global Carbon Budget 2024\u003c/a\u003e.\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://data.worldbank.org/indicator/SP.POP.TOTL\"\u003eWorld Bank Group Total Population dataset in CSV format\u003c/a\u003e.\u003cbr\u003e\n    Unzip the downloaded archive and rename the CSV file \u003ccode\u003e'world_pop.csv'\u003c/code\u003e.\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003ch3\u003eInstructions\u003c/h3\u003e\n\u003col\u003e\n   \u003cli\u003eChoose a country to profile from those listed in the Energy Institute's Statistical Review. This package does attempt to check that a\u003cbr\u003e\ncompatible country name has been input, but it's coarse and some may break at run-time (e.g. Yemen, which the Energy Institute\u003cbr\u003e\ndataset includes, but only for oil production). This may be improved later.\u003c/li\u003e\n   \u003cli\u003eEdit line 38 of world_energy_data.py (shown below), to include the country name, followed by a comma in the case of a single country\u003cbr\u003e\n(a single element tuple must be followed by a comma) -\u003cbr\u003e\n\u003ccode\u003e# Define countries to profile using tuple.\u003cbr\u003ecountries = ('Total World',)\u003c/code\u003e\n   \u003cli\u003eFor data not already included in this repository, obtain and move the IEA datafiles from (4) in Input Data Requirements above, to the\u003cbr\u003e\nsame folder as this package. If needed, add the IEA's country name to -\u003cbr\u003e\n\u003ccode\u003ecountries.translate_country_name()\u003c/code\u003e in \u003ccode\u003ecountries.py\u003c/code\u003e.\u003c/li\u003e\n   \u003cli\u003eFolders will be created named \u003ccode\u003echarts CO2\u003c/code\u003e, \u003ccode\u003echarts country_name\u003c/code\u003e and \u003ccode\u003echarts Major Emitters\u003c/code\u003e\u003c/li\u003e\n   \u003cli\u003eFlags in \u003ccode\u003euser_globals.py\u003c/code\u003e can be edited to suit preferences.\u003c/li\u003e\n\u003c/ol\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanewhi%2Fworld-energy-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshanewhi%2Fworld-energy-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanewhi%2Fworld-energy-data/lists"}