-
Notifications
You must be signed in to change notification settings - Fork 0
wip - add automotive to WEO2024 #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,11 +58,11 @@ weo_2024: | |
| weo_2024_raw_path: "weo_2024/WEO2024 extended data" | ||
| weo_2024_ext_data_regions_raw_filename: "WEO2024_Extended_Data_Regions.csv" | ||
| weo_2024_ext_data_world_raw_filename: "WEO2024_Extended_Data_World.csv" | ||
| weo_2024_fig_chptr_3_raw_filename: "WEO2024_Figures_Chapter_03.xlsx" | ||
| iea_global_ev_raw_path: "iea_global_ev_2024" | ||
| iea_global_ev_raw_filename: "IEA Global EV Data 2024.csv" | ||
| weo_2024_fig_chptr_3_raw_full_filepath: 'weo_2024/WEO2024 extended data/WEO2024_Figures_Chapter_03.xlsx' | ||
| iea_global_ev_raw_filename: "electric-vehicle-sales-by-region-and-scenario-2030-and-2035.xlsx" | ||
| mpp_ats_raw_path: "mpp_ats-20240227" | ||
| mpp_ats_raw_filename: "2022-08-12 - MPP ATS - RPK and GHG intensity.xlsx" | ||
| hybrid_methodology: "hybrid_in_ev" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this a filename, path, or something else? |
||
|
|
||
| 2022Q4: | ||
| inherits: [geco_2022, isf_2021, weo_2022] | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,12 +3,13 @@ logger::log_info("WEO 2024: Setting WEO 2024 config.") | |||||||||||||||||||||||||||||||||||||||
| weo_2024_raw_path <- config[["weo_2024_raw_path"]] | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_ext_data_regions_raw_filename <- config[["weo_2024_ext_data_regions_raw_filename"]] | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_ext_data_world_raw_filename <- config[["weo_2024_ext_data_world_raw_filename"]] | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_fig_chptr_3_raw_filename <- config[["weo_2024_fig_chptr_3_raw_filename"]] | ||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw_path <- config[["iea_global_ev_raw_path"]] | ||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw_filename <- config[["iea_global_ev_raw_filename"]] | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_fig_chptr_3_raw_full_filepath <- config[["weo_2024_fig_chptr_3_raw_full_filepath"]] | ||||||||||||||||||||||||||||||||||||||||
| mpp_ats_raw_path <- config[["mpp_ats_raw_path"]] | ||||||||||||||||||||||||||||||||||||||||
| mpp_ats_raw_filename <- config[["mpp_ats_raw_filename"]] | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| hybrid_methodology <- config[["hybrid_methodology"]] | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| logger::log_info("WEO 2024: Setting WEO 2024 paths.") | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| weo_2024_raw_full_path <- | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -29,21 +30,9 @@ weo_2024_ext_data_world_raw_full_filepath <- | |||||||||||||||||||||||||||||||||||||||
| weo_2024_ext_data_world_raw_filename | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| weo_2024_fig_chptr_3_raw_full_filepath <- | ||||||||||||||||||||||||||||||||||||||||
| file.path( | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_raw_full_path, | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_fig_chptr_3_raw_filename | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw_full_path <- | ||||||||||||||||||||||||||||||||||||||||
| file.path( | ||||||||||||||||||||||||||||||||||||||||
| scenario_preparation_inputs_path, | ||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw_path | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw_full_filepath <- | ||||||||||||||||||||||||||||||||||||||||
| file.path( | ||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw_full_path, | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_raw_full_path, | ||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw_filename | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
|
|
@@ -87,11 +76,21 @@ weo_2024_fig_chptr_3_raw <- | |||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw <- | ||||||||||||||||||||||||||||||||||||||||
| readr::read_csv( | ||||||||||||||||||||||||||||||||||||||||
| file = iea_global_ev_2024_raw_full_filepath, | ||||||||||||||||||||||||||||||||||||||||
| show_col_types = FALSE | ||||||||||||||||||||||||||||||||||||||||
| read_xlsx( | ||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer explicit name spacing, e.g.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
| path = iea_global_ev_2024_raw_full_filepath, | ||||||||||||||||||||||||||||||||||||||||
| sheet = "electric-vehicle-sales-by-regio" | ||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it intentional that the sheet name ends with "regio" not "region"?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sheet name is truncated when uploading data from IEA website, so sheet name title will be electric-vehicle-sales-by-regio |
||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| iea_sales_share_ev <- read_xlsx( | ||||||||||||||||||||||||||||||||||||||||
| path = iea_global_ev_2024_raw_full_filepath, | ||||||||||||||||||||||||||||||||||||||||
| sheet = "electric vehicle share-ev" | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| iea_sales_share_bev_phev <- read_xlsx( | ||||||||||||||||||||||||||||||||||||||||
| path = iea_global_ev_2024_raw_full_filepath, | ||||||||||||||||||||||||||||||||||||||||
| sheet = "electric-vehicle-share-bev-phev" | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+84
to
+93
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer explicit name spacing, e.g.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
| mpp_ats_raw <- | ||||||||||||||||||||||||||||||||||||||||
| tidyxl::xlsx_cells( | ||||||||||||||||||||||||||||||||||||||||
| path = mpp_ats_raw_full_filepath | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -100,11 +99,14 @@ mpp_ats_raw <- | |||||||||||||||||||||||||||||||||||||||
| logger::log_info("WEO 2024: Processing WEO 2024 data.") | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| weo_2024 <- | ||||||||||||||||||||||||||||||||||||||||
| pacta.scenario.data.preparation::prepare_weo_2024_scenario( | ||||||||||||||||||||||||||||||||||||||||
| prepare_weo_2024_scenario( | ||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer explicit name spacing, e.g.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
| weo_2024_ext_data_regions_raw, | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_ext_data_world_raw, | ||||||||||||||||||||||||||||||||||||||||
| weo_2024_fig_chptr_3_raw, | ||||||||||||||||||||||||||||||||||||||||
| iea_global_ev_2024_raw, | ||||||||||||||||||||||||||||||||||||||||
| iea_sales_share_ev, | ||||||||||||||||||||||||||||||||||||||||
| iea_sales_share_bev_phev, | ||||||||||||||||||||||||||||||||||||||||
| hybrid_methodology, | ||||||||||||||||||||||||||||||||||||||||
| mpp_ats_raw | ||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this config, I strive to always separate paths from filenames, which has organizational impact later on in the scripts