thekingofkings / chicago-partition

Automatically partition Chicago into Community Areas (CA), while minize the CA level crime prediction error.
MIT License
1 stars 1 forks source link

Manipulation of polygon boundary #4

Closed thekingofkings closed 6 years ago

thekingofkings commented 6 years ago

How to merge boundary of tracts to get CAs?

Solution: Use the cascading-unions method from shapely python lib.

How to find tract that is on the boundary of its CA?

For MCMC process, we flip one tract to the other CA. Critical questions are:

Solution: Use touches method from shapely python lib. Notice that 1 point touch is counted as touch.

thekingofkings commented 6 years ago

Q1 result

The cascading-unions works great to create CA boundary from tracts. The following CA visualization validates the results.

cas