Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upaw_interpolate fails when `tid` and `sid` are the same #7
Comments
|
The fix for this looked like so: > si_zcta2 <- rename(si_zcta, id = GEOID)
> aw_interpolate(
+ si_zcta2,
+ tid = id,
+ source = si_tract,
+ sid = GEOID,
+ weight = "sum",
+ output = "tibble",
+ extensive = "popE"
+ )
# A tibble: 13 x 2
id popE
* <chr> <dbl>
1 10301 41705.
2 10302 16504.
3 10303 25834.
4 10304 41365.
5 10305 44373.
6 10306 53132.
7 10307 12564.
8 10308 27879.
9 10309 31901.
10 10310 22839.
11 10311 464.
12 10312 66662.
13 10314 88100. |
|
The multipolygon branch now contains a fix for this issue as well. It also includes a unit test that confirms the fix. |
See Issue #6 for a
reprex- since @mfherman is using two census geometries, the ID isGEOIDin both cases and we get this for output:Renaming one of the ID variables from
GEOIDto anything else fixes it. Not sure how to handle this yet. For now, @mfherman, rename your target ID variable until we address this.