-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add techmix per sector plot #38
Conversation
<option value="WEO2023">WEO2023</option> | ||
<option value="GECO2023">GECO2023</option> |
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.
changing order to scenario source for which techmix appears.
|
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.
A few NIT comments, but generally looks decent :-)
I think only the TODO
would be blocking for now.
src/js/techmix_sector.js
Outdated
export class techmix_sector { | ||
constructor(container, data) { | ||
// Data needs to be ordered on year (increasing) | ||
// Data needs to have two years in |
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.
Comment seems to be missing crucial info?
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.
What do you mean? These are comments I put in about data requirements for this function. They are not exhaustive though. During documenting/refactoring stage we should probably put in tests to check if all the conditions for data are met. At the same time this function is not meant to be used by general users like functions in R packages so I am not sure to what level of detail we should document it.
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.
All I meant is that "Data needs to have two years in" seems like it isn't a complete sentence. Two years in ... what?
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.
forgive my English :D I'll make it clearer
src/js/techmix_sector.js
Outdated
item | ||
); | ||
}); | ||
// TODO: make sure that this captures all possible technologies |
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.
Do we need to handle this TODO?
src/js/techmix_sector.js
Outdated
.range(d3.schemeSpectral[subgroups.length]) | ||
.unknown('#ccc'); | ||
|
||
// Add rectangles for each stacked bar - TODO: rewrite into two |
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.
NIT: @MonikaFu in general, we should aim to NOT have any TODOs on main
. So my suggestion would be to please review all remaining TODOs in the comments and either:
- handle them (if directly relevant to this particular PR)
OR - open a new GH issue explaining what should be done
Add techmix_sector function to the dashboard together with the plot data.
Note that the case of empty data selection is not handled elegantly at this moment. To be handled at a later stage. See #40.