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

ENH: On demand DistanceBand spatial weights (neighbors) #165

Merged
merged 2 commits into from
May 3, 2020

Conversation

martinfleis
Copy link
Member

@martinfleis martinfleis commented May 3, 2020

In some cases, libpysal.weights.DistanceBand may become too big for memory, e.g. for large thresholds. momepy.DistanceBand mimics its behaviour in terms of .neighbors[key] pattern used within momepy to compute neighbours only on demand to avoid memory issues. It is significantly slower method, but allows large thresholds which would otherwise not fit in memory.

momepy.DistanceBand can be used within most momepy classes directly as spatial_weights instead of libpysal.weights.

@martinfleis martinfleis added this to the 0.3.0 milestone May 3, 2020
@codecov
Copy link

codecov bot commented May 3, 2020

Codecov Report

Merging #165 into master will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
+ Coverage   93.99%   94.07%   +0.08%     
==========================================
  Files           9       10       +1     
  Lines        2597     2633      +36     
==========================================
+ Hits         2441     2477      +36     
  Misses        156      156              
Impacted Files Coverage Δ
momepy/utils.py 83.33% <ø> (-0.54%) ⬇️
momepy/weights.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6211345...abc2842. Read the comment docs.

@martinfleis martinfleis merged commit d0e829d into master May 3, 2020
@martinfleis martinfleis deleted the distanceband branch May 3, 2020 12:38
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.

1 participant