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

Refactor maps #304

Closed
rouille opened this issue Jun 4, 2021 · 0 comments
Closed

Refactor maps #304

rouille opened this issue Jun 4, 2021 · 0 comments
Assignees
Labels

Comments

@rouille
Copy link
Collaborator

rouille commented Jun 4, 2021

Map are becoming more and more complex displaying on a single canvas transmission lines (AC and DC), generators, upgrades, soon storage, etc. We need to refactor the way we build the maps such that we can easily add layers (transmission, generator, LMP with color bar, etc.) instead of having a function that does one, the other or a combination of two.

A good design would be to have a user facing function as we have right now, e.g., map_lmp but internal to that function, we have successive calls to other function, e.g.,:

canvas = plot_canvas(canvas_kwargs)
canvas = add_states(canvas, state_kwargs)
canvas = add_lmp(canvas, scenario, lmp_kwargs)
return canvas

So if the user just wants to map LMP, there is a convenience function (map_lmp), but if they want to add LMP to an existing map that have let's say transmission map on it, the user can use the add_lmp function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants