R
This has to be run in order to compile this notebook while the R package is still under development.
In [1]:
Copied!
devtools::load_all()
devtools::load_all()
ℹ Loading scenariovettingcriteria
! Adding files missing in collate: /home/philippv/Documents/4-projects/17-SCI/02-SCI-thresholds/scenario-vetting-criteria/R/file_paths.R and /home/philippv/Documents/4-projects/17-SCI/02-SCI-thresholds/scenario-vetting-criteria/R/scenariovettingcriteria-package.R
Installation¶
While the R package has not been released yet, you have to install it from GitHub source using:
install_github('PhilippVerpoort/scenario_vetting_criteria')
Raw file paths¶
The package contains definition files for the criteria. The paths to those files are contained in file_paths
.
In [2]:
Copied!
library(scenariovettingcriteria)
for (component_id in names(file_paths)) {
component_path <- file_paths[[component_id]]
print(paste0(component_id, ": ...", substr(as.character(component_path), nchar(as.character(component_path)) - 39, nchar(as.character(component_path)))))
}
library(scenariovettingcriteria)
for (component_id in names(file_paths)) {
component_path <- file_paths[[component_id]]
print(paste0(component_id, ": ...", substr(as.character(component_path), nchar(as.character(component_path)) - 39, nchar(as.character(component_path)))))
}
[1] "criteria-metadata: ...eria/inst/extdata/criteria-metadata.yaml" [1] "criteria-thresholds: ...ria/inst/extdata/criteria-thresholds.csv" [1] "criteria-thresholds: ...ria/inst/extdata/criteria-thresholds.csv" [1] "criteria-types: ...riteria/inst/extdata/criteria-types.yaml" [1] "operations: ...ng-criteria/inst/extdata/operations.yaml" [1] "reference-data: ...criteria/inst/extdata/reference-data.csv" [1] "reference-sources: ...teria/inst/extdata/reference-sources.bib"
Load functions¶
Instead of loading the data from these files manually, it is recommended to use the built-in load functions from the package via load_criteria
. For instance, the following will load the definition of the thresholds values.
In [3]:
Copied!
load_criteria('criteria-thresholds')
load_criteria('criteria-thresholds')
criterion | region | period | variable | reference_source | unit | lower.very_strong | lower.strong | lower.medium | upper.medium | upper.strong | upper.very_strong |
---|---|---|---|---|---|---|---|---|---|---|---|
<chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> |
hist_pop | Model Native Regions | 2010, 2015, 2020 | Population | WDI-2024 | dimensionless | 0.65 | 0.75 | 1.25 | 1.35 | ||
hist_pop | World | 2010, 2015, 2020 | Population | WDI-2024 | dimensionless | 0.75 | 0.85 | 1.15 | 1.25 | ||
hist_gdp | Model Native Regions | 2010, 2015 | GDP|PPP | WDI-2024 | dimensionless | 0.65 | 0.75 | 1.25 | 1.35 | ||
hist_gdp | Model Native Regions | 2020 | GDP|PPP | WDI-2024 | dimensionless | 0.5 | 0.6 | 1.4 | 1.5 | ||
hist_gdp | World | 2010, 2015 | GDP|PPP | WDI-2024 | dimensionless | 0.75 | 0.85 | 1.15 | 1.25 | ||
hist_gdp | World | 2020 | GDP|PPP | WDI-2024 | dimensionless | 0.6 | 0.7 | 1.3 | 1.4 | ||
hist_emi | Model Native Regions | 2010, 2015 | Emissions|CO2|Energy and Industrial Processes | CEDS-2024 | dimensionless | 0.65 | 0.75 | 1.25 | 1.35 | ||
hist_emi | Model Native Regions | 2020 | Emissions|CO2|Energy and Industrial Processes | CEDS-2024 | dimensionless | 0.5 | 0.6 | 1.4 | 1.5 | ||
hist_emi | World | 2010, 2015 | Emissions|CO2|Energy and Industrial Processes | CEDS-2024 | dimensionless | 0.75 | 0.85 | 1.15 | 1.25 | ||
hist_emi | World | 2020, 2025 | Emissions|CO2|Energy and Industrial Processes | CEDS-2024 | dimensionless | 0.6 | 0.7 | 1.3 | 1.4 | ||
hist_fe | Model Native Regions | 2010, 2015 | Final Energy | IEA-EB-2023 | dimensionless | 0.65 | 0.75 | 1.25 | 1.35 | ||
hist_fe | Model Native Regions | 2020 | Final Energy | IEA-EB-2023 | dimensionless | 0.5 | 0.6 | 1.4 | 1.5 | ||
hist_fe | World | 2010, 2015 | Final Energy | IEA-EB-2023 | dimensionless | 0.75 | 0.85 | 1.15 | 1.25 | ||
hist_fe | World | 2020 | Final Energy | IEA-EB-2023 | dimensionless | 0.6 | 0.7 | 1.3 | 1.4 | ||
hist_pe_fossil | Model Native Regions | 2010, 2015 | Primary Energy|Coal, Primary Energy|Oil, Primary Energy|Gas | IEA-EB-2023 | dimensionless | 0.65 | 0.75 | 1.25 | 1.35 | ||
hist_pe_fossil | Model Native Regions | 2020 | Primary Energy|Coal, Primary Energy|Oil, Primary Energy|Gas | IEA-EB-2023 | dimensionless | 0.5 | 0.6 | 1.4 | 1.5 | ||
hist_pe_fossil | World | 2010, 2015 | Primary Energy|Coal, Primary Energy|Oil, Primary Energy|Gas | IEA-EB-2023 | dimensionless | 0.75 | 0.85 | 1.15 | 1.25 | ||
hist_pe_fossil | World | 2020 | Primary Energy|Coal, Primary Energy|Oil, Primary Energy|Gas | IEA-EB-2023 | dimensionless | 0.6 | 0.7 | 1.3 | 1.4 | ||
nearterm_hydro | Africa (R10) | 2030 | Capacity|Electricity|Hydro | GW | 15.3 | 96.39 | |||||
nearterm_hydro | China+ (R10) | 2030 | Capacity|Electricity|Hydro | GW | 201.24 | 832.12 | |||||
nearterm_hydro | Europe (R10) | 2030 | Capacity|Electricity|Hydro | GW | 106.16 | 436.09 | |||||
nearterm_hydro | India+ (R10) | 2030 | Capacity|Electricity|Hydro | GW | 27.06 | 149.56 | |||||
nearterm_hydro | Latin America (R10) | 2030 | Capacity|Electricity|Hydro | GW | 110.94 | 376.29 | |||||
nearterm_hydro | Middle East (R10) | 2030 | Capacity|Electricity|Hydro | GW | 6.85 | 31.76 | |||||
nearterm_hydro | North America (R10) | 2030 | Capacity|Electricity|Hydro | GW | 48.84 | 187.67 | |||||
nearterm_hydro | Pacific OECD (R10) | 2030 | Capacity|Electricity|Hydro | GW | 65.94 | 259.67 | |||||
nearterm_hydro | Reforming Economies (R10) | 2030 | Capacity|Electricity|Hydro | GW | 37.74 | 135.95 | |||||
nearterm_hydro | Rest of Asia (R10) | 2030 | Capacity|Electricity|Hydro | GW | 32.88 | 189.6 | |||||
nearterm_hydro | World | 2030 | Capacity|Electricity|Hydro | GW | 979.43 | 1175.37 | 1606.66 | 2117.58 | |||
nearterm_nuclear | Africa (R10) | 2030 | Capacity|Electricity|Nuclear | GW | 0.89 | 8.75 | |||||
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
nearterm_ccus | Pacific OECD (R10) | 2030 | Carbon Capture | Mt CO2/yr | 5.52 | 92.09 | |||||
nearterm_ccus | Reforming Economies (R10) | 2030 | Carbon Capture | Mt CO2/yr | 0 | 0 | |||||
nearterm_ccus | Rest of Asia (R10) | 2030 | Carbon Capture | Mt CO2/yr | 0 | 20.91 | |||||
nearterm_ccus | World | 2030 | Carbon Capture | Mt CO2/yr | 0 | 44.02 | 152.47 | 457.89 | |||
nearterm_solar | World | 2025 | Capacity|Electricity|Solar | GW | 1609.2 | 2083 | 3152 | 3895.6 | |||
nearterm_solar | China+ (R10) | 2025 | Capacity|Electricity|Solar | GW | 518.1 | 2671.7 | |||||
nearterm_solar | Europe (R10) | 2025 | Capacity|Electricity|Solar | GW | 194.2 | 764.7 | |||||
nearterm_solar | India+ (R10) | 2025 | Capacity|Electricity|Solar | GW | 56.2 | 256.4 | |||||
nearterm_solar | World | 2030 | Capacity|Electricity|Solar | GW | 2683.2 | 4350.2 | 8163.7 | 10896 | |||
nearterm_solar | China+ (R10) | 2030 | Capacity|Electricity|Solar | GW | 936.1 | 7874.1 | |||||
nearterm_solar | Europe (R10) | 2030 | Capacity|Electricity|Solar | GW | 280.6 | 1839.9 | |||||
nearterm_solar | India+ (R10) | 2030 | Capacity|Electricity|Solar | GW | 104.4 | 855.6 | |||||
nearterm_wind_onshore | World | 2025 | Capacity|Electricity|Wind|Onshore | GW | 945 | 1138 | 1570 | 1862 | |||
nearterm_wind_onshore | Europe (R10) | 2025 | Capacity|Electricity|Wind|Onshore | GW | 1220 | 154 | 505 | 3655 | |||
nearterm_wind_onshore | China+ (R10) | 2025 | Capacity|Electricity|Wind|Onshore | GW | 268 | 1101 | |||||
nearterm_wind_onshore | India+ (R10) | 2025 | Capacity|Electricity|Wind|Onshore | GW | 28 | 91 | |||||
nearterm_wind_onshore | World | 2030 | Capacity|Electricity|Wind|Onshore | GW | 1719 | 2853 | |||||
nearterm_wind_onshore | Europe (R10) | 2030 | Capacity|Electricity|Wind|Onshore | GW | 191 | 969 | |||||
nearterm_wind_onshore | China+ (R10) | 2030 | Capacity|Electricity|Wind|Onshore | GW | 349 | 2117 | |||||
nearterm_wind_onshore | India+ (R10) | 2030 | Capacity|Electricity|Wind|Onshore | GW | 33 | 154 | |||||
longterm_nuclear | World | 2040 | Capacity|Electricity|Nuclear | GW | 694 | ||||||
longterm_nuclear | World | 2050 | Capacity|Electricity|Nuclear | GW | 950 | ||||||
longterm_ccus | World | 2035 | Carbon Capture | Mt CO2/yr | 1300 | ||||||
longterm_ccus | World | 2040 | Carbon Capture | Mt CO2/yr | 4300 | ||||||
longterm_daccs | World | 2050 | Carbon Capture|Geological Storage|Direct Air Capture | Gt CO2/yr | 4.89 | ||||||
sustainable_deforestation | World | 2030 | Forest Area Change|Deforestation | million ha/yr | 0 | ||||||
sustainable_primary_deforestation | World | 2030 | Forest Area Change|Deforestation|Primary | million ha/yr | 0 | ||||||
sustainable_biodiversity_intactness | World | 2030 | Terrestrial Biodiversity|BII, Terrestrial Biodiversity|Biodiversity Intactness Index | %/yr | 0 | ||||||
sustainable_bioenergy | World | 2025, 2030, 2035, 2040, 2045, 2050 | Primary Energy|Biomass | EJ/yr | 100 | ||||||
sustainable_hydropower | World | 2050 | Capacity|Electricity|Hydro | GW | 1500 |
Multiple files can be loaded in one go.
In [4]:
Copied!
criteria <- load_criteria(c('criteria-thresholds', 'operations'))
criteria$operations
criteria <- load_criteria(c('criteria-thresholds', 'operations'))
criteria$operations
- $criterion_type
- 'historical'
- $threshold_severity
- 'very_strong'
- $threshold_type
-
- 'upper'
- 'lower'
- $operation
- 'drop'
- $criterion_type
- 'historical'
- $threshold_severity
- 'strong'
- $threshold_type
-
- 'upper'
- 'lower'
- $operation
- 'flag'
- $colour
- 'red'
- $criterion_type
- 'historical'
- $threshold_severity
- 'strong'
- $threshold_type
-
- 'upper'
- 'lower'
- $operation
- 'flag'
- $colour
- 'red'
- $criterion_type
- 'near_term_feasibility'
- $threshold_severity
- 'strong'
- $threshold_type
-
- 'upper'
- 'lower'
- $operation
- 'flag'
- $colour
- 'red'
- $criterion_type
- 'near_term_feasibility'
- $threshold_severity
- 'medium'
- $threshold_type
-
- 'upper'
- 'lower'
- $operation
- 'flag'
- $colour
- 'yellow'
- $criterion_type
- 'long_term_feasibility'
- $threshold_severity
- 'strong'
- $threshold_type
-
- 'upper'
- 'lower'
- $operation
- 'flag'
- $colour
- 'red'
- $criterion_type
- 'long_term_feasibility'
- $threshold_severity
- 'medium'
- $threshold_type
-
- 'upper'
- 'lower'
- $operation
- 'flag'
- $colour
- 'yellow'
- $criterion_type
- 'sustainability'
- $threshold_severity
- 'strong'
- $threshold_type
-
- 'upper'
- 'lower'
- $operation
- 'flag'
- $colour
- 'purple'
Apply vetting criteria to scenarios¶
A tutorial on how to apply the vetting criteria to a list of scenarios based on piamValidation will be made available later.