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

Renewable capacity map #188

Merged
merged 1 commit into from
Oct 30, 2020
Merged

Renewable capacity map #188

merged 1 commit into from
Oct 30, 2020

Conversation

victoriahunt
Copy link
Contributor

Pull Request Etiquette doc

Purpose

Map plant capacity, used to show locations of renewables at retirements on scrolly-telling. Relates to Zenhub issue #177. This is basically a restart of PR 180, which i converted to a draft and then got reassigned to other things. There was a desire from the last review to add some pytest type testing to this, which i agree is needed in the long term. I am transitioning at this time to working 100% on the Catalyst project and so am trying to merge in my code quickly. Apologies that I didn't get to the pytests but at this point merging so the code is available for others to use for the dashboard and scrolly-telling is important so I am expediting this PR.

What the code is doing

Code uses the change table from a scenario to identify new plants and then aggregates by coordinates, and maps the plant capacity for those new plants with circle size indicating capacity (pmax).

Testing

manual testing

Where to look

plot_renewable_capacity_map is the location of the function map_plant_capacity. Demo notebook has been added as well, plot_renewable_capacity_map_demo in the demo folder.

Usage Example/Visuals

image

Time estimate

15 minutes. Code is very straightforward and very similar to carbon emissions plotting code.

@victoriahunt victoriahunt added the visualization Issue related to visualization label Oct 29, 2020
@victoriahunt victoriahunt self-assigned this Oct 29, 2020
@rouille
Copy link
Collaborator

rouille commented Oct 30, 2020

The linter fails as you can see. It comes from isort. Below is the error message:

ERROR: /home/runner/work/PostREISE/PostREISE/postreise/plot/plot_renewable_capacity_map.py Imports are incorrectly sorted and/or formatted.
--- /home/runner/work/PostREISE/PostREISE/postreise/plot/plot_renewable_capacity_map.py:before	2020-10-30 02:48:04.612532
+++ /home/runner/work/PostREISE/PostREISE/postreise/plot/plot_renewable_capacity_map.py:after	2020-10-30 02:48:22.960482
@@ -1,10 +1,11 @@
+import pandas as pd
+from bokeh.models import ColumnDataSource, HoverTool
 from bokeh.plotting import figure
-from bokeh.tile_providers import get_provider, Vendors
-from bokeh.models import ColumnDataSource, HoverTool
 from bokeh.sampledata import us_states
+from bokeh.tile_providers import Vendors, get_provider
+
+from postreise.plot.plot_carbon_map import get_borders
 from postreise.plot.projection_helpers import project_bus
-from postreise.plot.plot_carbon_map import get_borders
-import pandas as pd

you need to re-order the import statements as shown above

@rouille
Copy link
Collaborator

rouille commented Oct 30, 2020

The plot_renewable_capacity_map module needs to be added to the __all__ variable in the __init__ file

@victoriahunt
Copy link
Contributor Author

The linter fails as you can see. It comes from isort. Below is the error message:

ERROR: /home/runner/work/PostREISE/PostREISE/postreise/plot/plot_renewable_capacity_map.py Imports are incorrectly sorted and/or formatted.
--- /home/runner/work/PostREISE/PostREISE/postreise/plot/plot_renewable_capacity_map.py:before	2020-10-30 02:48:04.612532
+++ /home/runner/work/PostREISE/PostREISE/postreise/plot/plot_renewable_capacity_map.py:after	2020-10-30 02:48:22.960482
@@ -1,10 +1,11 @@
+import pandas as pd
+from bokeh.models import ColumnDataSource, HoverTool
 from bokeh.plotting import figure
-from bokeh.tile_providers import get_provider, Vendors
-from bokeh.models import ColumnDataSource, HoverTool
 from bokeh.sampledata import us_states
+from bokeh.tile_providers import Vendors, get_provider
+
+from postreise.plot.plot_carbon_map import get_borders
 from postreise.plot.projection_helpers import project_bus
-from postreise.plot.plot_carbon_map import get_borders
-import pandas as pd

you need to re-order the import statements as shown above

reordered with ddc3a00

@victoriahunt
Copy link
Contributor Author

The plot_renewable_capacity_map module needs to be added to the __all__ variable in the __init__ file

added with 708aa5e

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. Thanks

feat: renewables at retirements script and notebook
@victoriahunt victoriahunt merged commit d6913e1 into develop Oct 30, 2020
@victoriahunt victoriahunt deleted the rar_vh branch October 30, 2020 21:26
@ahurli ahurli mentioned this pull request Mar 16, 2021
@rouille rouille changed the title Renewable Capacity Added Map Renewable Capacity Map Mar 16, 2021
@rouille rouille changed the title Renewable Capacity Map Renewable capacity map Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
visualization Issue related to visualization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants