Package 'pacta.scenario.data.preparation'

Title: What the Package Does (One Line, Title Case)
Description: What the package does (one paragraph).
Authors: CJ Yetman [aut, cre] , Jackson Hoffart [aut, ctr] , RMI [cph, fnd]
Maintainer: CJ Yetman <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-10-30 12:23:37 UTC
Source: https://github.com/rmi-pacta/pacta.scenario.data.preparation

Help Index


Add market share columns to a scenario dataset

Description

Calculates and adds market share values (ie. technology market-share ratio and sector market-share percentage) to a scenario dataset. A reference start-year must be provided.

Usage

add_market_share_columns(data, reference_year)

Arguments

data

A scenario dataset, like FIXME: Define an exported demo scenario.

reference_year

The baseline year, against which the technology- and sector- market shares will be calculated. Note: At the start year, tmsr = 1 and smsp = 0 respectively.

Value

A scenario dataset, with the new columns tmsr and smsp.


Format scenario data for P4B

Description

Format scenario data for P4B

Usage

format_p4b(data)

Arguments

data

A scenario data-frame following the format created in the prepare_*.R scripts.

Value

A scenario data-frame with columns renamed to be consistent with r2dii.analysis target_market_share input requirements.


Format scenario data for P4B

Description

Format scenario data for P4B

Usage

format_p4b_ei(data)

Arguments

data

A scenario data-frame following the format created in the prepare_*.R scripts.

Value

A scenario data-frame with columns renamed to be consistent with r2dii.analysis target_sda input requirements.


Format scenario data for P4I

Description

Format scenario data for P4I

Usage

format_p4i(data, green_techs)

Arguments

data

A scenario dataset.

green_techs

A list of green technologies. For these, a direction of "increasing" will be assigned, and the smsp column will be used to assign a fair_share_perc. Otherwise the direction will be decreasing and the tmsr column will be used.

Value

A scenario dataset, with columns renamed to be consistent with pacta.data.preparation input requirements.


Interpolate values in a dataset, by year. Interpolate values in a dataset, by year.

Description

Interpolate values in a dataset, by year. Interpolate values in a dataset, by year.

Usage

interpolate_yearly(data, ...)

Arguments

data

An input dataset. Must contain the columns year and value.

...

Other grouping variables. value will be interpolated for each group.

Value

A dataset with the column value interpolated linearly against the column year.


Prepare GECO 2022 scenario data

Description

Prepare GECO 2022 scenario data

Usage

prepare_geco_2022_scenario(
  geco_2022_automotive_raw,
  geco_2022_aviation_raw,
  geco_2022_fossil_fuels_15c_raw,
  geco_2022_fossil_fuels_ndc_raw,
  geco_2022_fossil_fuels_ref_raw,
  geco_2022_power_15c_raw,
  geco_2022_power_ndc_raw,
  geco_2022_power_ref_raw,
  geco_2022_steel_raw
)

Arguments

geco_2022_automotive_raw

A raw GECO 2022 automotive scenario data-frame.

geco_2022_aviation_raw

A raw GECO 2022 aviation scenario data-frame.

geco_2022_fossil_fuels_15c_raw

A raw GECO 2022 fossil fuels 1.5C scenario data-frame.

geco_2022_fossil_fuels_ndc_raw

A raw GECO 2022 fossil fuels NDC scenario data-frame.

geco_2022_fossil_fuels_ref_raw

A raw GECO 2022 fossil fuels reference scenario data-frame.

geco_2022_power_15c_raw

A raw GECO 2022 power 1.5C scenario data-frame.

geco_2022_power_ndc_raw

A raw GECO 2022 power NDC scenario data-frame.

geco_2022_power_ref_raw

A raw GECO 2022 power reference scenario data-frame.

geco_2022_steel_raw

A raw GECO 2022 steel scenario data-frame.

Value

A prepared GECO 2022 scenario data-frame.


Prepare GECO 2023 scenario data

Description

Prepare GECO 2023 scenario data

Usage

prepare_geco_2023_scenario(
  geco_2023_aviation_15c_raw,
  geco_2023_aviation_ndc_raw,
  geco_2023_aviation_ref_raw,
  geco_2023_fossil_fuels_15c_raw,
  geco_2023_fossil_fuels_ndc_raw,
  geco_2023_fossil_fuels_ref_raw,
  geco_2023_power_cap_15c_raw,
  geco_2023_power_cap_ndc_raw,
  geco_2023_power_cap_ref_raw,
  geco_2023_steel_15c_raw,
  geco_2023_steel_ndc_raw,
  geco_2023_steel_ref_raw,
  geco_2023_supplement_15c_raw,
  geco_2023_supplement_ndc_raw,
  geco_2023_supplement_ref_raw
)

Arguments

geco_2023_aviation_15c_raw

A raw GECO 2023 automotive 1.5 scenario data-frame.

geco_2023_aviation_ndc_raw

A raw GECO 2023 automotive NDC scenario data-frame.

geco_2023_aviation_ref_raw

A raw GECO 2023 automotive Reference scenario data-frame.

geco_2023_fossil_fuels_15c_raw

A raw GECO 2023 fossil fuels 1.5 scenario data-frame.

geco_2023_fossil_fuels_ndc_raw

A raw GECO 2023 fossil fuels NDC scenario data-frame.

geco_2023_fossil_fuels_ref_raw

A raw GECO 2023 fossil fuels Reference scenario data-frame.

geco_2023_power_cap_15c_raw

A raw GECO 2023 power capacity 1.5 scenario data-frame.

geco_2023_power_cap_ndc_raw

A raw GECO 2023 power capacity NDC scenario data-frame.

geco_2023_power_cap_ref_raw

A raw GECO 2023 power capacity Reference scenario data-frame.

geco_2023_steel_15c_raw

A raw GECO 2023 steel 1.5 scenario data-frame.

geco_2023_steel_ndc_raw

A raw GECO 2023 steel NDC scenario data-frame.

geco_2023_steel_ref_raw

A raw GECO 2023 steel Reference scenario data-frame.

geco_2023_supplement_15c_raw

A raw GECO 2023 supplemental 1.5 scenario data-frame.

geco_2023_supplement_ndc_raw

A raw GECO 2023 supplemental NDC scenario data-frame.

geco_2023_supplement_ref_raw

A raw GECO 2023 supplemental Reference scenario data-frame.

Value

A prepared GECO 2023 scenario data-frame.


Prepare ISF 2021 scenario data

Description

Prepare ISF 2021 scenario data

Usage

prepare_isf_2021_scenario(isf_2021_power_raw, isf_2021_not_power_raw)

Arguments

isf_2021_power_raw

A tidyxl data frame containing a raw import of NZAOA_raw_data_power.xlsx.

isf_2021_not_power_raw

A tidyxl data frame containing a raw import of NZAOA_rawdata_notpower_P4I.xlsx.

Value

A prepared ISF 2021 scenario data-frame.


Prepare ISF 2023 scenario data

Description

Prepare ISF 2023 scenario data

Usage

prepare_isf_2023_scenario(
  isf_2023_scope_global_raw,
  isf_2023_s_global_raw,
  isf_2023_annex_countries_raw
)

Arguments

isf_2023_scope_global_raw

A tidyxl data frame (with a formats attribute) with a raw ISF Scope Global 2023 import.

isf_2023_s_global_raw

A tidyxl data frame (with a formats attribute) with a raw ISF S_Global 2023 import.

isf_2023_annex_countries_raw

A list of tidyxl data frames (with a formats attribute) containing the raw import of each of the Annex Countries xlsx files for ISF 2023.

Value

A prepared ISF 2023 scenario data-frame.


Prepare WEO 2022 scenario data

Description

Prepare WEO 2022 scenario data

Usage

prepare_weo_2022_scenario(
  weo_2022_ext_data_regions_raw,
  weo_2022_ext_data_world_raw,
  weo_2022_fossil_fuels_raw,
  weo_2022_nze_auto_raw,
  weo_2022_nze_steel_raw,
  weo_2022_sales_aps_auto_raw,
  weo_2022_electric_sales_aps_auto_raw
)

Arguments

weo_2022_ext_data_regions_raw

A data frame containing a raw import of WEO2022_Extended_Data_Regions.csv.

weo_2022_ext_data_world_raw

A data frame containing a raw import of WEO2022_Extended_Data_World.csv.

weo_2022_fossil_fuels_raw

A data frame containing a raw import of weo2022_fossilfuel_demand_supply.csv.

weo_2022_nze_auto_raw

A tidyxl data frame with a raw NZE2021_RawData_2050.xlsx import.

weo_2022_nze_steel_raw

A data frame containing a raw import of WEO2022_NZE_SteelData.csv.

weo_2022_sales_aps_auto_raw

A data frame containing a raw import of SalesAPS_rawdata.csv.

weo_2022_electric_sales_aps_auto_raw

A data frame containing a raw import of ⁠IEA-EV-dataEV salesCarsProjection-APS.csv⁠.

Value

A prepared WEO 2022 scenario data-frame.


Prepare WEO 2023 scenario data

Description

Prepare WEO 2023 scenario data

Usage

prepare_weo_2023_scenario(
  weo_2023_ext_data_regions_raw,
  weo_2023_ext_data_world_raw,
  weo_2023_fig_chptr_3_raw,
  iea_global_ev_raw,
  mpp_ats_raw
)

Arguments

weo_2023_ext_data_regions_raw

A data frame containing a raw WEO2023_Extended_Data_Regions.csv import.

weo_2023_ext_data_world_raw

A data frame containing a raw WEO2023_Extended_Data_World.csv import.

weo_2023_fig_chptr_3_raw

A tidyxl data frame containing a raw import of WEO2023_Figures_Chapter_03.xlsx.

iea_global_ev_raw

A data frame containing a raw ⁠IEA Global EV Data 2023.csv⁠ import.

mpp_ats_raw

A tidyxl data frame containing a raw import of '2022-08-12

  • MPP ATS - RPK and GHG intensity.xlsx'.

Value

A prepared WEO 2023 scenario data-frame.


A dataset of countries contained in different scenario regions.

Description

This dataset contains a map of each scenario region name, along with all countries defined within that region (as per the country's ISO2 code).

Usage

scenario_regions

Format

An object of class spec_tbl_df (inherits from tbl_df, tbl, data.frame) with 1492 rows and 4 columns.

Examples

head(scenario_regions)

A dataset that maps scenario regions as defined by their source, to a list of PACTA compatible scenario regions.

Description

Scenario providers often define their own, tailor-made lists of what countries form a region. The entire concept of a region is not standardized and can even change year on year. However, for the purpose of the PACTA transition monitor website, it is useful to have a minimal set of comparable regions, to cycle through different scenarios for. Right now, these regions are the "Global" region, which contains all countries, and the "OECD" and "NonOECD" regions.

This dataset provides a bridge between whatever the scenario has labelled these regions as (e.g. "WORLD"), and the terminology that PACTA uses (e.g. "Global").

Usage

scenario_source_pacta_geography_bridge

Format

An object of class spec_tbl_df (inherits from tbl_df, tbl, data.frame) with 15 rows and 3 columns.

Examples

head(scenario_source_pacta_geography_bridge)