-
Notifications
You must be signed in to change notification settings - Fork 57
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
Functional count #585
Functional count #585
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #585 +/- ##
=======================================
+ Coverage 97.4% 97.9% +0.5%
=======================================
Files 26 37 +11
Lines 4328 5434 +1106
=======================================
+ Hits 4214 5318 +1104
- Misses 114 116 +2
|
momepy/functional/_intensity.py
Outdated
def count( | ||
left: GeoDataFrame, | ||
right: GeoDataFrame, | ||
right_group_key: Series | np.ndarray, |
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.
right_group_key: Series | np.ndarray, | |
aggregation_key: Series | np.ndarray, |
as per #583
momepy/functional/_intensity.py
Outdated
|
||
def count( | ||
left: GeoDataFrame, | ||
right: GeoDataFrame, |
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.
Do we actually need right
at all? Doesn't the grouping have all the info we need?
Functional implmentation of mm.Count
this function has the same logic as area_ratio, but the weight is inferred from the geometry type.
Potentially, it could be left to the user to implement it with a call to describe_reached (or two if the result should be weighted). (similarly to arearatio)