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

Implement pie chart generation vs capacity #231

Merged
merged 4 commits into from
Mar 5, 2021

Conversation

BainanXia
Copy link
Collaborator

@BainanXia BainanXia commented Mar 2, 2021

Pull Request doc

Purpose

Refactor pie chart plot to remove the dependency of analyze_pg and other functions/constants in multi folder.

What the code is doing

Implement pie chart plot for generation vs capacity of a list of user specified areas in a list of user specified/customized scenarios

Testing

A demo notebook is added to illustrate the usage.

Where to look

postreise/plot/plot_pie_generation_vs_capacity.py
postreise/plot/demo/pie_generation_vs_capacity.ipynb

Time estimate

15 min. This one is easier as expected given the major refactor carried out in the previous bar chart PR see 215

@BainanXia BainanXia requested review from danielolsen and rouille March 2, 2021 17:32
@BainanXia BainanXia self-assigned this Mar 2, 2021
type2color.update(resource_colors)

grid = Grid(["USA"])
id2loadzone = grid.id2zone
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will need to refactor that

"cap": {"label": "Capacity", "unit": "GW", "data": {}},
}
for area, area_type in zip(areas, area_types):
loadzone_set = area_to_loadzone(grid, area, area_type)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will need to refactor that too

@rouille
Copy link
Collaborator

rouille commented Mar 3, 2021

Should we have some tests to make sure that the errors are correctly raised and we did not forget any edge cases?

@rouille
Copy link
Collaborator

rouille commented Mar 3, 2021

Notebook runs as expected. I would add a main title to mirror what we do in the other ones.

@BainanXia
Copy link
Collaborator Author

Should we have some tests to make sure that the errors are correctly raised and we did not forget any edge cases?

Tests added.

@BainanXia
Copy link
Collaborator Author

Notebook runs as expected. I would add a main title to mirror what we do in the other ones.

A markdown cell in the notebook is added which serves as a main title.

@rouille
Copy link
Collaborator

rouille commented Mar 5, 2021

Notebook runs as expected. I would add a main title to mirror what we do in the other ones.

A markdown cell in the notebook is added which serves as a main title.

Pie Pot --> Pie Plot

@BainanXia BainanXia force-pushed the bainan/multi_pie_chart branch from d05041f to b8f018d Compare March 5, 2021 00:31
@BainanXia
Copy link
Collaborator Author

Notebook runs as expected. I would add a main title to mirror what we do in the other ones.

A markdown cell in the notebook is added which serves as a main title.

Pie Pot --> Pie Plot

Good catch! Fixed.

Copy link
Collaborator

@rouille rouille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@BainanXia BainanXia merged commit c048a81 into develop Mar 5, 2021
@BainanXia BainanXia deleted the bainan/multi_pie_chart branch March 5, 2021 00:41
@ahurli ahurli mentioned this pull request Mar 16, 2021
@rouille rouille changed the title multi refactor: implement pie chart generation vs capacity Implement pie chart generation vs capacity Mar 16, 2021
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