clustering with k-means

4 views
Skip to first unread message

Brian DeRocher

unread,
Feb 27, 2015, 12:28:08 PM2/27/15
to districtb...@googlegroups.com
Hey there,

Short story. Last week i was searching for a projected i started in 2014 which i was planning to present at the Code for NoVA #CodeAcross2015 meetup. I thought googling for it would bring up the URL fastest. So i search for DistrictBuilder in order to find https://github.com/openbrian/districtbuilder. Naturally yours pops up instead https://github.com/PublicMapping/DistrictBuilder :)

I'm very impressed with your project. It's much more advanced than mine, so maybe i can contribute mine into yours.

So about my DistrictBuilder. It builds upon Brandon Martin-Anderson's Census Dotmap (and https://github.com/meetar/dotmap). If you're not familiar with that, it basically generates a US map with one point for each person. I figured i could generate the districts by running a k-means clustering algorithm across the points. Then ignore the mean, but instead look at points/people. Finally wrap a convex hull polygon around them. The results are interesting. See this page[1] on my wiki.

[1] https://github.com/openbrian/districtbuilder/wiki/sampled-data,-plain-distance-function

My next step is to replace distance as the crow flies with driving directions using OSRM.

Anyway if you think this could be useful in your project, please let me know.

Brian

--
http://brian.derocher.org
http://mappingdc.org
http://about.me/brian.derocher

Robert Cheetham

unread,
Apr 30, 2015, 5:08:30 PM4/30/15
to districtb...@googlegroups.com
Brian,

You probably just saw my other reply.  My apologies for the lack of response.

We would welcome extensions to the DistrictBuilder project, though most of the features are directed at interactive, user-driven development of redistricting plans and being able to score and compare those plans, rather than on automated generation of new plans.  In addition, much of the database design assumes polygons.  However, there may still be applications of your ideas.

And there are obviously lots of issues open in the project for which we'd also welcome contributions.

Best,

Robert Cheetham
------------

Azavea
Reply all
Reply to author
Forward
0 new messages