pysal / tobler

Spatial interpolation, Dasymetric Mapping, & Change of Support
https://pysal.org/tobler
BSD 3-Clause "New" or "Revised" License
144 stars 30 forks source link

ENH: add area_join for join based on the largest intersection #119

Closed martinfleis closed 3 years ago

martinfleis commented 3 years ago

Closes #101

I am open to suggestions on the name and the placement of the function within tobler.

If there is no match for some rows in target_df, some column dtpyes (integer is not nullable) are not preserved and fall back to object.

Where to put an example? To the existing notebook or to a new one? And what is the relationship between those in notebooks and those in docs/notebooks, are they just duplicated?

codecov-io commented 3 years ago

Codecov Report

Merging #119 (1f440dc) into master (5f32e05) will increase coverage by 2.17%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
+ Coverage   81.50%   83.67%   +2.17%     
==========================================
  Files          13       15       +2     
  Lines         600      680      +80     
==========================================
+ Hits          489      569      +80     
  Misses        111      111              
Impacted Files Coverage Δ
tobler/area_weighted/__init__.py 100.00% <ø> (ø)
tobler/area_weighted/area_join.py 100.00% <100.00%> (ø)
tobler/tests/test_area_join.py 100.00% <100.00%> (ø)
tobler/tests/test_dasymetric.py 93.87% <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 5f32e05...1f440dc. Read the comment docs.

martinfleis commented 3 years ago

I tried to be consistent within tobler, hence area_join as a counterpart of area_interpolate. But yeah, it is not a super obvious name. Not sure if overlap_join or intersection_join is clearer.