Skip to content
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

always name data dimension 'variable' in report functions #465

Merged
merged 3 commits into from
Oct 2, 2023

Conversation

orichters
Copy link
Contributor

  • for consistency
  • to make sure as.quitte(reportFE(gdx)) et al. successfully finds variables and units because we go into this part of the code

old:

# A tibble: 92,872 × 8
   model     scenario  region variable  unit      period value data
   <fct>     <fct>     <fct>  <fct>     <fct>      <int> <dbl> <fct>
 1 (Missing) (Missing) LAM    (Missing) (Missing)   2005 22.0  FE (EJ/yr)
 2 (Missing) (Missing) OAS    (Missing) (Missing)   2005 27.8  FE (EJ/yr)
 3 (Missing) (Missing) SSA    (Missing) (Missing)   2005 14.5  FE (EJ/yr)
 4 (Missing) (Missing) EUR    (Missing) (Missing)   2005 56.5  FE (EJ/yr)
 5 (Missing) (Missing) NEU    (Missing) (Missing)   2005  5.40 FE (EJ/yr)
 6 (Missing) (Missing) MEA    (Missing) (Missing)   2005 20.5  FE (EJ/yr)
 7 (Missing) (Missing) REF    (Missing) (Missing)   2005 27.2  FE (EJ/yr)
 8 (Missing) (Missing) CAZ    (Missing) (Missing)   2005 11.9  FE (EJ/yr)
 9 (Missing) (Missing) CHA    (Missing) (Missing)   2005 58.6  FE (EJ/yr)
10 (Missing) (Missing) IND    (Missing) (Missing)   2005 14.7  FE (EJ/yr)
# ℹ 92,862 more rows

new:

# A tibble: 92,872 × 7
   model     scenario  region variable unit  period value
   <fct>     <fct>     <fct>  <fct>    <fct>  <int> <dbl>
 1 (Missing) (Missing) LAM    FE       EJ/yr   2005 22.0
 2 (Missing) (Missing) OAS    FE       EJ/yr   2005 27.8
 3 (Missing) (Missing) SSA    FE       EJ/yr   2005 14.5
 4 (Missing) (Missing) EUR    FE       EJ/yr   2005 56.5
 5 (Missing) (Missing) NEU    FE       EJ/yr   2005  5.40
 6 (Missing) (Missing) MEA    FE       EJ/yr   2005 20.5
 7 (Missing) (Missing) REF    FE       EJ/yr   2005 27.2
 8 (Missing) (Missing) CAZ    FE       EJ/yr   2005 11.9
 9 (Missing) (Missing) CHA    FE       EJ/yr   2005 58.6
10 (Missing) (Missing) IND    FE       EJ/yr   2005 14.7
# ℹ 92,862 more rows

@orichters
Copy link
Contributor Author

Some background info:

  • as.quitte interprets d3 or variable as a variable, see this code. I suggested to add data there a while ago, which is what a new.magpie gets as default, but @tscheypidi declined that, fearing that it might break some scripts
  • He suggested to set the third to dimension to "variable" for every magpie object in remind2, so this is what I did.

@orichters orichters merged commit 1bc3580 into pik-piam:master Oct 2, 2023
2 checks passed
@orichters orichters deleted the rawdata branch October 16, 2023 11:34
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.

2 participants