-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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.
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!
Codecov ReportAttention:
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
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
This PR addresses issue #41. A new parameter,
--breaks-scheme
, has been added to themake-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:
--breaks-scheme
argument is eitherwind
orsolar
, for the hard-coded breaks for those technologies, or<classifier-name>:<classifier-kwargs>
where<classifier-name
is one of the valid classifiers from themapclassify
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 beequalinterval:{"k": 10}
(this would produce 10 equal interval breaks). Alternatively the user can specifyequalinterval
without the kwargs for the equal interval classifier to be used with its default 5 bins.--tech
parameter has been kept for legacy purposes, but is essentially just an alias for--breaks-scheme
now.