Skip to content

Conversation

@Antoine-Lalechere
Copy link
Contributor

This PR aims to adapt codeines from weo2023 to change in data format in weo2024

@github-actions
Copy link

github-actions bot commented Jul 24, 2025

Docker build status

commit_time git_sha image
2025-07-28T13:03:12Z 3dce217 ghcr.io/rmi-pacta/workflow.scenario.preparation:pr-64

@Antoine-Lalechere Antoine-Lalechere marked this pull request as ready for review July 28, 2025 13:15
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'
Copy link
Member

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

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a filename, path, or something else?

readr::read_csv(
file = iea_global_ev_2024_raw_full_filepath,
show_col_types = FALSE
read_xlsx(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer explicit name spacing, e.g.

Suggested change
read_xlsx(
readxl::read_xlsx(

show_col_types = FALSE
read_xlsx(
path = iea_global_ev_2024_raw_full_filepath,
sheet = "electric-vehicle-sales-by-regio"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it intentional that the sheet name ends with "regio" not "region"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Comment on lines +84 to +93
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"
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer explicit name spacing, e.g.

Suggested change
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"
)
iea_sales_share_ev <- readxl::read_xlsx(
path = iea_global_ev_2024_raw_full_filepath,
sheet = "electric vehicle share-ev"
)
iea_sales_share_bev_phev <- readxl::read_xlsx(
path = iea_global_ev_2024_raw_full_filepath,
sheet = "electric-vehicle-share-bev-phev"
)


weo_2024 <-
pacta.scenario.data.preparation::prepare_weo_2024_scenario(
prepare_weo_2024_scenario(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer explicit name spacing, e.g.

Suggested change
prepare_weo_2024_scenario(
pacta.scenario.data.preparation::prepare_weo_2024_scenario(

@Antoine-Lalechere
Copy link
Contributor Author

closed as duplicated of #65

@cjyetman cjyetman deleted the weo_2024_antoine branch September 2, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants