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

Breaks Scheme for make-maps #47

Merged
merged 6 commits into from
Oct 4, 2023
Merged

Breaks Scheme for make-maps #47

merged 6 commits into from
Oct 4, 2023

Conversation

mjgleason
Copy link
Collaborator

This PR addresses issue #41. A new parameter, --breaks-scheme, has been added to the make-maps command to allow for more flexible/automatic definition of the breaks used in the maps. This should enable easier use of the functionality on other technologies (such as geothermal), as well as finer grained control on the breaks used in solar or wind maps.

Two important notes:

  1. The format for the --breaks-scheme argument is either wind or solar, for the hard-coded breaks for those technologies, or <classifier-name>:<classifier-kwargs> where <classifier-name is one of the valid classifiers from the mapclassify package (see https://pysal.org/mapclassify/api.html#classifiers) and <classifier-kwargs> is an optional set of keyword arguments to pass to the classifier function, formatted as a JSON. So, a valid input would be equalinterval:{"k": 10} (this would produce 10 equal interval breaks). Alternatively the user can specify equalinterval without the kwargs for the equal interval classifier to be used with its default 5 bins.
  2. The --tech parameter has been kept for legacy purposes, but is essentially just an alias for --breaks-scheme now.

Copy link
Collaborator

@ppinchuk ppinchuk left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this!! make-maps was already extremely useful and this option definitely opens it up for even more use cases. Excited to play with this for the next set of geothermal supply curve runs!

USAGE.md Outdated Show resolved Hide resolved
USAGE.md Outdated Show resolved Hide resolved
USAGE.md Outdated Show resolved Hide resolved
USAGE.md Outdated Show resolved Hide resolved
reView/cli.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Attention: 124 lines in your changes are missing coverage. Please review.

Comparison is base (cdd9594) 39.65% compared to head (25ad0e1) 48.68%.
Report is 118 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
+ Coverage   39.65%   48.68%   +9.03%     
==========================================
  Files          45       48       +3     
  Lines        3929     4726     +797     
  Branches      665      737      +72     
==========================================
+ Hits         1558     2301     +743     
- Misses       2344     2388      +44     
- Partials       27       37      +10     
Flag Coverage Δ
unittests 48.68% <86.59%> (+9.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
reView/layout/layout.py 100.00% <ø> (ø)
reView/layout/navbar.py 100.00% <100.00%> (ø)
reView/layout/options.py 100.00% <ø> (ø)
reView/pages/rev/controller/selection.py 18.84% <ø> (ø)
reView/pages/rev/view.py 92.30% <100.00%> (+0.64%) ⬆️
tests/conftest.py 100.00% <100.00%> (ø)
tests/helper.py 100.00% <100.00%> (ø)
...nario_page/test_controller/test_chart_callbacks.py 100.00% <ø> (ø)
...s/test_scenario_page/test_model/test_difference.py 100.00% <100.00%> (ø)
tests/test_utils/test_characterizations.py 100.00% <100.00%> (ø)
... and 12 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mjgleason mjgleason merged commit 951b7ed into main Oct 4, 2023
7 checks passed
@mjgleason mjgleason deleted the breaks_style branch October 4, 2023 18:55
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.

None yet

3 participants