Monday, August 21, 2017

Voting Districts Day 13: Rework and Shapely Saves the Day

I reached an impasse a while back after realizing that I needed a means of determining whether voting districts shared boundaries.  I built the algorithm to cluster the voting districts together, but the clustering fell apart when my initial points were out in the wilderness or towards the end when the process had slim pickings.  Here's an example of my starting points (green Xs) and the final central points (pink diamonds) for each clustered group.  you can see it completely fell apart at the western part of the state.

Enter the Python module Shapely, which has a great touches function where you can see if two voting districts share a boundary, which I can make a requirement before associating a voting district with other districts.

Additionally, shapely does a lot of other great things that makes this process much easier.  One of the big ones is that it allows you to create polygon objects, which has lots of helpful methods, such as finding a centroid, getting the bounds and area, etc.  

So, I'm working on reworking pretty much everything to use the Shapely module.  Stay tuned.

4 comments:

terry james said...

I'm very excited to inform everyone that I'm completely cured from my HSV 1&2 recently. I have used Oregano oil, Coconut oil, Acyclovir, Val acyclovir, Famciclovir , and some other products and it's really help during my outbreaks but I totally got cured from my HSV 2 with a strong and active herbal medicine ordered from a powerful herbalist and it completely fought the virus from my nervous system and I was tested negative after three weeks of usage. I'm here to let y'all know that HSV 1& 2 has a complete cure, I got rid of mine with the help of Dr Moses Buba and his herbal exploit, AFTER I engage with other wrong doctors. Contact him via email: buba.herbalmiraclemedicine@gmail.com or Call/WhatsApp him at +2349060529305
thank you..











I'm very excited to inform everyone that I'm completely cured from my HSV 1&2 recently. I have used Oregano oil, Coconut oil, Acyclovir, Val acyclovir, Famciclovir , and some other products and it's really help during my outbreaks but I totally got cured from my HSV 2 with a strong and active herbal medicine ordered from a powerful herbalist and it completely fought the virus from my nervous system and I was tested negative after three weeks of usage. I'm here to let y'all know that HSV 1& 2 has a complete cure, I got rid of mine with the help of Dr Moses Buba and his herbal exploit, AFTER I engage with other wrong doctors. Contact him via email: buba.herbalmiraclemedicine@gmail.com or Call/WhatsApp him at +2349060529305
thank you..










I'm very excited to inform everyone that I'm completely cured from my HSV 1&2 recently. I have used Oregano oil, Coconut oil, Acyclovir, Val acyclovir, Famciclovir , and some other products and it's really help during my outbreaks but I totally got cured from my HSV 2 with a strong and active herbal medicine ordered from a powerful herbalist and it completely fought the virus from my nervous system and I was tested negative after three weeks of usage. I'm here to let y'all know that HSV 1& 2 has a complete cure, I got rid of mine with the help of Dr Moses Buba and his herbal exploit, AFTER I engage with other wrong doctors. Contact him via email: buba.herbalmiraclemedicine@gmail.com or Call/WhatsApp him at +2349060529305
thank you..

Florence said...


I started on COPD Herbal treatment from Ultimate Life Clinic, the treatment worked incredibly for my lungs condition. I used the herbal treatment for almost 4 months, it reversed my COPD. My severe shortness of breath, dry cough, chest tightness gradually disappeared. Reach Ultimate Life Clinic via their website www.ultimatelifeclinic.com . I can breath much better and It feels comfortable!

laimakafer said...

Harrah's Cherokee Casino Resort opens at 10 a.m. - KTAR
Harrah's 당진 출장마사지 Cherokee Casino 동해 출장샵 Resort opened at 10 a.m. 충청북도 출장안마 Friday as the first Native American casino to 동두천 출장안마 open 의정부 출장샵 on the reservation in more than a year.

Anonymous said...

I was diagnosed with Idiopathic Pulmonary Fibrosis (IPF) four years ago. For over two years, I relied on prescription medications and therapies, but unfortunately, the symptoms continued to worsen. My breathing became more laboured, and I experienced increasing fatigue and shortness of breath with even minimal activity.Last year, out of desperation and hope, I decided to try an herbal treatment program from NaturePath Herbal Clinic.Honestly, I was skeptical at first, but within a few months of starting the treatment, I began to notice real changes. My breathing became easier, the tightness in my chest eased, and I felt more energetic and capable in my daily life. Incredibly, I also regained much of my stamina and confidence. It’s been a life-changing experience I feel more like myself again, better than I’ve felt in years.If you or a loved one is struggling with IPF, I truly recommend looking into their natural approach. You can visit their website at www.naturepathherbalclinic.com their email info@naturepathherbalclinic.com