Closed knaaptime closed 1 year ago
Merging #140 (e3a07b6) into master (32c8525) will decrease coverage by
3.45%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## master #140 +/- ##
==========================================
- Coverage 81.25% 77.79% -3.46%
==========================================
Files 17 19 +2
Lines 832 869 +37
==========================================
Hits 676 676
- Misses 156 193 +37
Impacted Files | Coverage Δ | |
---|---|---|
tobler/kriging/__init__.py | 0.00% <0.00%> (ø) |
|
tobler/kriging/kriging.py | 0.00% <0.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...e3a07b6. Read the comment docs.
currently this is just to get started exploring the mechanics of the external libraries. The first fraft takes a really naive approach assigning the predicted value for the target_df centroid to the whole polygon. Instead, we should probably generate a geocube raster of the prediction surface then allow both (a) averaging of pixel values inside the polygon and (b) proper block kriging
agreed on both.
i've also played around a bit further and there are a few different ways we could go about this (and maybe provide options for more than one). The question is how we want to shoehorn the very discrete process of human geography into a continuous spatial model (though as you said, it should work reasonably for percentages).
actually, a 4th option riffing on 3, would be to include auxiliary data to mask out uninhabited regions of source_df, then randomly drop points in the inhabited areas and assign them them values from source_df, then in uninhabited areas drop random points and assign them all 0 and estimate on that "surface"
this is a first draft at adding a kriging module based on pykrige. Initial explorations were pretty positive, though the quality of the interpolation obviously depends a great deal on the variogram fit