Code for the Global New-Energy Policy Corpus (GNEPC): tagging, relevance screening, knowledge graph and figures
Description
Python code that reproduces every number, table and figure of the Data Descriptor "A global corpus of 36,608 multilingual new-energy policy documents from 205 economies". The pipeline runs in ordered steps: build the four multilingual tagging vocabularies (37 tags in 14 languages); harmonise the retrieved records; tag every document with 16 objectives, 10 policy instruments, 11 technology domains and 19 industries, each tag carrying an evidence level (2 title, 1 body, 0 absent) and an occurrence count; apply the three-part relevance filter that yields the strict (9,208) and liberal (17,926) samples; validate the labels against an independent taxonomy and a 60-document manual audit; build the policy knowledge graph (246 nodes, 6,499 associations, 504 backbone edges) and analyse it; and produce the eight manuscript tables and the four submission figures. Requirements: Python 3.10 or later; numpy, pandas, matplotlib and networkx, pinned in requirements.txt; python-docx and fonttools are optional (Word output and figure checks only) and affect no reported statistic. No network access is needed and the code never writes to the source data. environment.json records the versions of the published run (CPython 3.14.3). Run: `python run_all.py`, or `python run_all.py 4 5 6` for selected steps. Reproduction from the released data: the analysis steps (7, 9, 26, 28, 29, 30) read the released tables and regenerate every reported statistic, table and figure. The retrieval and tagging steps (2 to 5) start from the retrieved records; those raw files are not redistributed, because the rights in the documents rest with the issuing bodies, and each released record carries the URL of its source register so retrieval can be re-run. The dataset is available at https://doi.org/10.17632/rbvyrpzj62.1 (CC BY 4.0).
Files
Steps to reproduce
1. Install Python 3.10 or later and the pinned packages: pip install -r requirements.txt 2. Place the released dataset files (documents.csv, tag_matrix.csv, economy_year_panel.csv, economy_reference.csv, knowledge_graph.graphml, knowledge_graph_nodes.csv, knowledge_graph_edges.csv, label_taxonomy.json) in data_derived/, and the code in code/. 3. Reproduce the analysis, tables and figures: python code/run_all.py 7 9 26 28 29 30 4. Verify the released table before running: documents.csv has 36,608 rows; 9,208 rows with screen_strict = 1; 17,926 with screen_liberal = 1; 22,183 with has_fulltext = 1; 206 distinct iso3 codes; 33 distinct lang codes. tag_matrix.csv has 36,608 rows and 57 columns. The graph has 246 nodes and 504 backbone edges. 5. Expected outputs: results/ holds the analysis panels and the logs; tables/ holds the eight manuscript tables; figures/ holds the four figures as PNG (300 dpi) and PDF (vector). The optional Word export (python code/s11_export_docx.py) needs python-docx; the figure checks (python code/verify_figures.py) need fonttools. Neither changes a reported number.
Categories
Funders
- Open Project of the Provincial and Ministerial Collaborative Innovation Centre for Emissions Trading, 2025Grant ID: 25CICETS-YB0015
- Humanities and Social Sciences Fund Project of Wuhan Institute of TechnologyGrant ID: 2026ZK04