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

Developing Regionally Aggregated Queries (Global North vs Global South) #464

Open
ipimenta opened this issue Sep 6, 2024 · 3 comments
Open

Comments

@ipimenta
Copy link

ipimenta commented Sep 6, 2024

Hi all,
I am struggling to write a query that calls & sums energy data by a user-defined aggregate region.
In my case, the user-defined aggregate region would be the Global North or the Global South.
Specifically, I am interested in modifying the energy->end use sectors->transport->"transport final energy by tech and fuel."

I started by looking at a potentially applicable queryGroup example in energy->end use sectors->aggregated GCAM-USA.
The "transport final energy by tech and fuel" query was of particular interest, as it would effectively be doing exactly what I need just for GCAM-USA. However, the only difference I found between the normal query and the "aggregated GCAM-USA" version was the inclusion of a labelRewriteList section. When I added that section in, (replacing the US states with GCAM regions (mapped to either the GN or GS) and replaced "USA" with Global North or Global South), I found that the resulting query would change the region name, but the data was not aggregated (it would still be for whatever country was clicked on). This makes sense as I didn't modify anything in the query like the "group" or "sumAll" parameters. So I tried modifying those, and also tried changing the axis1 to region, but I can't quite seem to get the right combination. Any advice would be greatly appreciated!

@ssmithClimate
Copy link
Contributor

In general, I think what folks tend to do in these cases is get the query data as a .csv, then do the aggregation and analysis in R. It's probably more straightforward than trying to work with the query syntax.

@pkyle
Copy link
Contributor

pkyle commented Sep 7, 2024

I agree with Steve and I also have never tried this from the model interface, but if you highlight the Global region only and run the query, does it still leave each region as its own line item?

@ipimenta
Copy link
Author

ipimenta commented Sep 7, 2024

Ok sounds good! Thanks for the info, I can go ahead and do this in R.

I did indeed try the query with the Global Region selected and the output is split into the global north and south, but it loses the tech & fuel resolution. So it's just total transport final energy - Global North vs South.

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

No branches or pull requests

3 participants