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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- climate
|
| 7 |
+
pretty_name: IFVI Global Value Factors Database, Data Analysis Refactor, V2
|
| 8 |
+
size_categories:
|
| 9 |
+
- 100K<n<1M
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Data Overview: Data Analysis Refactoring V2
|
| 13 |
+
|
| 14 |
+
[](https://huggingface.co/datasets/danielrosehill/IFVI-Global-Value-Factors-Dataset-V2)
|
| 15 |
+
|
| 16 |
+
**Global Value Factors Database (GVFD)**
|
| 17 |
+
**International Foundation for Valuing Impacts (IFVI)**
|
| 18 |
+
Prepared by: *Daniel Rosehill*
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## Introduction
|
| 23 |
+
|
| 24 |
+
In late 2024, the International Foundation for Valuing Impacts (IFVI) released the **Global Value Factors Database (GVFD)**. This pioneering dataset provides a framework for converting non-traditional impacts into financial terms, offering a new lens for evaluating global value creation. For the full scope, methodology, and theoretical underpinnings, I encourage readers to consult the official IFVI website and accompanying documentation.
|
| 25 |
+
|
| 26 |
+
This document presents an overview of my **independent refactoring effort**, undertaken to make the GVFD more accessible for data analysis, machine learning, and visualization workflows. The IFVI kindly granted consent for the republication of their data in this format. However, I take sole responsibility for any errors introduced in the refactoring process.
|
| 27 |
+
|
| 28 |
+
The dataset continues to be governed by IFVIβs terms of use, as set out in the original publication (available at [ifvi.org](https://ifvi.org)). My work here is based on the **first release** of the GVFD. Should IFVI publish subsequent versions, they supersede the dataset refactored in this project.
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## Refactoring Purpose and Approach
|
| 33 |
+
|
| 34 |
+
The original GVFD was released as a single `.xlsm` (macro-enabled Excel) file. While suitable for exploratory work, this structure posed limitations for reproducible data workflows and programmatic use.
|
| 35 |
+
|
| 36 |
+
My primary aim was to reformat the GVFD for **machine readability** and **workflow compatibility**, especially in contexts requiring:
|
| 37 |
+
|
| 38 |
+
* **Data analysis** (e.g., using R or Python libraries such as pandas or tidyverse).
|
| 39 |
+
* **Visualization** (e.g., dashboards or BI tools).
|
| 40 |
+
* **Interoperability** (integration with geospatial or statistical workflows).
|
| 41 |
+
|
| 42 |
+
To achieve this, the following steps were taken:
|
| 43 |
+
|
| 44 |
+
1. Conversion of the original dataset to **CSV format**.
|
| 45 |
+
2. Splitting of the data into **separate CSV files**, one for each value factor category.
|
| 46 |
+
3. Creation of **structured JSON files**, reflecting the dataβs original hierarchical presentation.
|
| 47 |
+
4. Production of **compact Parquet versions**, auto-generated via Hugging Face for efficient querying and storage.
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Data Edits (Non-Substantive)
|
| 52 |
+
|
| 53 |
+
No substantive changes were made to IFVIβs data values or methodologies. However, I applied several light-touch edits to improve usability and consistency:
|
| 54 |
+
|
| 55 |
+
### 1. Country Standardization
|
| 56 |
+
|
| 57 |
+
* Country names as listed in the original dataset were mapped to **ISO Alpha-2 codes**.
|
| 58 |
+
* Both the **original names** and their **ISO equivalents** are retained in the refactored dataset.
|
| 59 |
+
* Non-sovereign entities (e.g., certain territories, U.S. states) without ISO codes were omitted.
|
| 60 |
+
|
| 61 |
+
### 2. Currency Formatting
|
| 62 |
+
|
| 63 |
+
* The GVFD values are denominated in **U.S. dollars**.
|
| 64 |
+
* To preserve numeric integrity, I removed dollar signs (`$`) from all values.
|
| 65 |
+
* Currency denomination is now recorded in the datasetβs **metadata and documentation** rather than embedded in each cell.
|
| 66 |
+
|
| 67 |
+
### 3. Structure and Accessibility
|
| 68 |
+
|
| 69 |
+
* **JSON representations** preserve the original units and structure of the GVFD.
|
| 70 |
+
* **Country-level JSONs** were generated to allow users to focus on all value factors within a single nation.
|
| 71 |
+
* A **combined dataset** was also provided, enabling both broad and granular analysis.
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
## Outputs
|
| 76 |
+
|
| 77 |
+
The refactored GVFD is now available in the following formats:
|
| 78 |
+
|
| 79 |
+
* **CSV**: Individual files by value factor category.
|
| 80 |
+
* **JSON**: Both full dataset and country-level breakdowns.
|
| 81 |
+
* **Parquet**: Compact, machine-friendly versions auto-generated for efficiency.
|
| 82 |
+
|
| 83 |
+
Each format is accompanied by metadata documenting units, denominations, and data lineage.
|
| 84 |
+
|
| 85 |
+
The GVFD represents a milestone in the effort to measure and assign value to non-traditional impacts. My **Data Analysis Refactoring V2** initiative is intended to extend the usability of IFVIβs work by making the dataset friendlier for modern analysis pipelines.
|
| 86 |
+
|
| 87 |
+
I am grateful to IFVI for granting permission to republish the data in this restructured form. Any inaccuracies or errors in the refactoring are solely my own.
|
| 88 |
+
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
## Source Data
|
| 92 |
+
|
| 93 |
+
**Original File:** `source/IFVI_Environmental Methodology_Global Value Factor Database V2.xlsm`
|
| 94 |
+
|
| 95 |
+
- Excel workbook containing multiple sheets with environmental impact data
|
| 96 |
+
- Complex tabular format with countries as columns and impact categories as rows
|
| 97 |
+
- Contains metadata rows for ISO codes and regional classifications
|
| 98 |
+
|
| 99 |
+
## Processing Steps
|
| 100 |
+
|
| 101 |
+
### Step 1: Excel to CSV Extraction
|
| 102 |
+
|
| 103 |
+
**Input:** Excel workbook with multiple sheets
|
| 104 |
+
**Output:** Individual CSV files per sheet in `data/individual-sheets/`
|
| 105 |
+
|
| 106 |
+
**Files Generated:**
|
| 107 |
+
- `air-pollution.csv`
|
| 108 |
+
- `ghgs.csv`
|
| 109 |
+
- `land-use-and-conversion.csv`
|
| 110 |
+
- `waste.csv`
|
| 111 |
+
- `water-consumption.csv`
|
| 112 |
+
- `water-pollution.csv`
|
| 113 |
+
|
| 114 |
+
**Format:** Tab-separated values with:
|
| 115 |
+
- Row 1: Country names (starting column 2)
|
| 116 |
+
- Row 3: ISO codes (starting column 5)
|
| 117 |
+
- Row 4: Regional classifications (starting column 6)
|
| 118 |
+
- Row 5+: Impact category data
|
| 119 |
+
|
| 120 |
+
### Step 2: CSV Cleaning and Standardization
|
| 121 |
+
|
| 122 |
+
**Script:** `clean_csv_files.py`
|
| 123 |
+
**Input:** Raw individual CSV files
|
| 124 |
+
**Output:** Cleaned CSV files in `data/cleaned-sheets/`
|
| 125 |
+
|
| 126 |
+
**Processing Actions:**
|
| 127 |
+
- Standardized column separators to tabs
|
| 128 |
+
- Removed empty rows and columns
|
| 129 |
+
- Normalized numeric formatting
|
| 130 |
+
- Preserved original structure for downstream processing
|
| 131 |
+
|
| 132 |
+
### Step 3: JSON Conversion with ISO Code Correction
|
| 133 |
+
|
| 134 |
+
**Script:** `convert_to_json.py` (primary conversion)
|
| 135 |
+
**Input:** Individual sheet CSV files
|
| 136 |
+
**Output:**
|
| 137 |
+
- `data/json/ifvi_environmental_data.json` (hierarchical format)
|
| 138 |
+
- `data/json/ifvi_environmental_data_compact.json` (flat format)
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
### Step 4: Country-Level Analysis
|
| 142 |
+
|
| 143 |
+
**Script:** `country_analysis.py`
|
| 144 |
+
**Input:** `ifvi_environmental_data_compact.json`
|
| 145 |
+
**Output:** Country aggregation files in `data/country-analysis/`
|
| 146 |
+
|
| 147 |
+
**Generated Files:**
|
| 148 |
+
- `countries_aggregated.json` - Complete country-level aggregations
|
| 149 |
+
- `countries_summary.csv` - Summary statistics per country
|
| 150 |
+
- `iso_code_mapping.csv` - Country to ISO code reference
|
| 151 |
+
- `iso_code_mapping.json` - JSON format ISO mapping
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
## Output Data Formats
|
| 155 |
+
|
| 156 |
+
### Hierarchical JSON Structure
|
| 157 |
+
```json
|
| 158 |
+
{
|
| 159 |
+
"countries": {
|
| 160 |
+
"CountryName": {
|
| 161 |
+
"metadata": { "iso_code": "XXX", "region": "Region" },
|
| 162 |
+
"categories": {
|
| 163 |
+
"CategoryName": {
|
| 164 |
+
"regions": {
|
| 165 |
+
"RegionName": {
|
| 166 |
+
"datasets": {
|
| 167 |
+
"DatasetName": {
|
| 168 |
+
"values": [...],
|
| 169 |
+
"statistics": { "mean": X, "min": Y, "max": Z }
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
}
|
| 173 |
+
}
|
| 174 |
+
}
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
}
|
| 178 |
+
}
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
### Compact JSON Structure
|
| 182 |
+
```json
|
| 183 |
+
[
|
| 184 |
+
{
|
| 185 |
+
"country": "CountryName",
|
| 186 |
+
"iso_code": "XXX",
|
| 187 |
+
"region": "Region",
|
| 188 |
+
"category": "CategoryName",
|
| 189 |
+
"subcategory": "SubcategoryName",
|
| 190 |
+
"dataset": "DatasetName",
|
| 191 |
+
"value": 123.45
|
| 192 |
+
}
|
| 193 |
+
]
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
## Repository Structure
|
| 197 |
+
|
| 198 |
+
```
|
| 199 |
+
IFVI-GVFD-0825/
|
| 200 |
+
βββ source/ # Original Excel file
|
| 201 |
+
βββ data/
|
| 202 |
+
β βββ individual-sheets/ # Raw CSV extracts
|
| 203 |
+
β βββ cleaned-sheets/ # Standardized CSVs
|
| 204 |
+
β βββ json/ # Primary JSON outputs
|
| 205 |
+
β βββ country-analysis/ # Country-level aggregations
|
| 206 |
+
βββ processing.md # This documentation
|
| 207 |
+
βββ README.md # Repository overview
|
| 208 |
+
βββ [processing scripts] # Python conversion scripts
|
| 209 |
+
```
|
| 210 |
+
|
| 211 |
+
## Processing Statistics
|
| 212 |
+
|
| 213 |
+
- **Total Countries:** 229
|
| 214 |
+
- **Countries with ISO Codes:** 205 (89.5%)
|
| 215 |
+
- **Environmental Categories:** 5 (air pollution, GHGs, land use, waste, water)
|
| 216 |
+
- **Total Data Points:** ~115,000 individual measurements
|
| 217 |
+
- **Regional Coverage:** 7 major world regions
|
| 218 |
+
- **File Size Reduction:** ~4.5MB compressed JSON vs. original Excel format
|
| 219 |
+
|
| 220 |
+
## Data Validation
|
| 221 |
+
|
| 222 |
+
### ISO Code Validation
|
| 223 |
+
- Cross-referenced country names with standard ISO 3166-1 alpha-3 codes
|
| 224 |
+
- Manual verification of 40+ country mappings
|
| 225 |
+
- 89.5% coverage with valid ISO codes
|
| 226 |
+
|
| 227 |
+
### Data Completeness
|
| 228 |
+
- Water consumption: Limited coverage (11 countries)
|
| 229 |
+
- Other categories: Near-complete coverage (216-217 countries each)
|
| 230 |
+
- No missing value imputation performed (preserves data integrity)
|
| 231 |
+
|
| 232 |
+
### Regional Distribution Validation
|
| 233 |
+
- Verified regional classifications against World Bank standards
|
| 234 |
+
- Identified and flagged anomalous regional values for review
|
| 235 |
+
|
| 236 |
+
## Usage Recommendations
|
| 237 |
+
|
| 238 |
+
### For Analysis
|
| 239 |
+
- Use `ifvi_environmental_data_compact.json` for data science workflows
|
| 240 |
+
- Use `countries_aggregated.json` for country-level comparisons
|
| 241 |
+
- Reference `iso_code_mapping.csv` for geographic joins
|
| 242 |
+
|
| 243 |
+
### For Applications
|
| 244 |
+
- Hierarchical JSON provides nested access patterns
|
| 245 |
+
- Compact JSON enables fast loading and filtering
|
| 246 |
+
- Country analysis files support dashboard and visualization needs
|
| 247 |
+
|
| 248 |
+
## Future Enhancements
|
| 249 |
+
|
| 250 |
+
- Automated ISO code validation against external APIs
|
| 251 |
+
- Time series analysis if historical data becomes available
|
| 252 |
+
- Data quality scoring and completeness metrics
|
| 253 |
+
- Integration with additional environmental datasets
|