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

integrate smaup into tobler #139

Closed
wants to merge 9 commits into from
Closed

integrate smaup into tobler #139

wants to merge 9 commits into from

Conversation

AnGWar26
Copy link

  • wrapper function over esda smaup
  • just tell user whether or not variable is affected by MAUP, if they want more info they should run it themselves for now
  • allow user to pass own regions and weights object in smaup_kwds
  • begin diagnostics module
  • only import warn from warnings

Addresses #51 and partially #84

This implementation does not automatically run smaup. It requires that the user pass their own weights object to calculate Moran's I, and choose the number of regions that they will be running smaup against. It also does not prioritize user interaction with the statistic (I suppose you could import the wrapper function itself and run it), it only tells the user whether the variable being used is affected by the MAUP.
image

Let me know what you think

- wrapper function over esda smaup
- just tell user whether or not variable is affected by MAUP, if they want more info they should run it themselves for now
- allow user to pass own regions and weights object in smaup_kwds
- begin diagnostics module
- only import warn from warnings
@codecov-io
Copy link

Codecov Report

Merging #139 (44c42e3) into master (32c8525) will decrease coverage by 0.72%.
The diff coverage is 67.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
- Coverage   81.25%   80.52%   -0.73%     
==========================================
  Files          17       20       +3     
  Lines         832      873      +41     
==========================================
+ Hits          676      703      +27     
- Misses        156      170      +14     
Impacted Files Coverage Δ
tobler/model/glm.py 82.60% <33.33%> (-7.40%) ⬇️
tobler/dasymetric/masked_area_interpolate.py 68.42% <37.50%> (-22.49%) ⬇️
tobler/area_weighted/area_interpolate.py 80.00% <44.44%> (-1.43%) ⬇️
tobler/__init__.py 100.00% <100.00%> (ø)
tobler/diagnostics/__init__.py 100.00% <100.00%> (ø)
tobler/diagnostics/smaup.py 100.00% <100.00%> (ø)
tobler/tests/test_diagnostics.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 32c8525...44c42e3. Read the comment docs.

- the paper recommends using Rook, so use that as default.
- we can get the number of regions to be agreggated to from the target_df's length, so use that for `k`.
- move to smaup_weight
- now tests a real interpolation situation pulled straight from the notebooks
copy paste error
@knaaptime knaaptime closed this Apr 11, 2023
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.

4 participants