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

Direct Output of Global Aggergrated Results for Market Data #19

Closed
michaeljaywalsh opened this issue Jun 1, 2017 · 2 comments · Fixed by #58
Closed

Direct Output of Global Aggergrated Results for Market Data #19

michaeljaywalsh opened this issue Jun 1, 2017 · 2 comments · Fixed by #58
Assignees

Comments

@michaeljaywalsh
Copy link

Not sure if this is bug or feature request as it depends on intended design. In either case this is low priority and can be easily handled after calling rgcam functions.

With the fixes to #14 and #15 it became apparent that using regions = c() in addSingleQuery or <all-regions/> in the batch query file for addScenario will return results for all regions in a disaggergrated format. This contrasts with the Global region option in the Model Interface GUI, in which regional values are summed/aggergrated to a global values.

I can't quite recall if prior to #14 and #15 being fixed, if the results (for an <all-regions/> batch query) were being aggergrated to a global output or being returned in the disaggregrated form as they are currently. So I wanted to raise this as a potential issue that may have come out of the fixes.

If not and it is working as intended, it might be useful to have such a feature. First for consistency with the MI GUI and that for items like the climate output <all-regions/> implies a global summary. Second, it would reduce the memory demand.

@pralitp
Copy link
Contributor

pralitp commented Jun 1, 2017

Yes, it wasn't the intent to change the behavior of the "Global" region (sum all regions). I will fix that.
As mentioned you can just do this in R and generally I have been recommending that to users: Get the query at a disaggregated level and do aggregations later in R. If you decide later it would be useful to look at more detailed results it will be much faster than having to re-query the databases (unless maybe if you are doing massive queries).
There is an example of adding a function add_global_sum in the vignettes as a transformation which might be helpful. I've been thinking of adding other utilities as well such as stripping out rewrite lists from a query and converting it into an R function that could be used in the transformations.

@michaeljaywalsh
Copy link
Author

michaeljaywalsh commented Jun 1, 2017

I'll take a look at the add_global_sum function. My eyes glazed over it the other day but my knowledge of the tidyverse has increased greatly over the last 24 hours.

It might be worthwhile add a Warning to the addScenario and addSingleQuery docs (or elsewhere):
"Global sums are not valid for price, yield (?? and other??) queries." This issue caused a little bit of head scratching when I first looked at prices in the MI GUI.

@pralitp pralitp self-assigned this Jun 12, 2017
@rplzzz rplzzz closed this as completed in #58 May 4, 2019
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 a pull request may close this issue.

2 participants