-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix function calculating averages of the fuel types #371
Conversation
@rouille could you please post some example screenshots of the new outputs with this fix just to double check that everything is being calculated correctly? |
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.
Looks good but would be nice to see a screenshot of outputs just to confirm
Here it is for 2005. There is the
It is fixed in #368 and will be taken care of once we rebase this PR. Nevertheless the calculation is correct. The data frame being to wide, I drop the file instead of a screenshot. |
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.
So looking at the sample outputs you posted, I think we want to keep the summary row as "total" and not "average". We want to take the sum of all of the numeric columns, and not the average, and it looks like the outputs are still averages of all of the other fuels
Could you please change "average" back to "total" and sum the numeric columns instead of averaging them?
I think the others where we reference this data are looking for the "total" row so changing the name will break those.
The "generated" rate columns are now correct, but we just want to also fix the numerical columns |
Should we change the file name then, |
If we change the file name, we would just need to track down where we are using this and change the file name there as well. |
Done. See file attached |
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.
Looks good, thanks!
Purpose
Fix function that calculates the averages of the fuel types. Closes CAR-4205.
What the code is doing
Add a new row that summarizes all fuel categories as follows:
average
as fuel category for this new summarized row.Testing
Ran the 2005 pipeline
Where to look
Relevant changes are in the the
write_generated_averages
function. Other edits add typehints and docstrings to function in theoge.output_data
module.Usage Example/Visuals
N/A
Review estimate
5min
Future work
N/A
Checklist
black