Re: [PyMNtos] Digest for pymntos@googlegroups.com - 2 Messages in 1 Topic

7 views
Skip to first unread message

William Cannon

unread,
Nov 18, 2013, 10:15:25 PM11/18/13
to pym...@googlegroups.com
Thanks Peter.   It was a nice little challenge.  

Here's the answers to your questions with my answers inline:
    1) Is that the real .csv ballot information from the 2013 MPLS Mayor's race?  Yes.  I found it online this morning.  I altered it slightly to represent one vote per line.   Here's a link to the original:  http://vote.minneapolismn.gov/www/groups/public/@clerk/documents/webcontent/2013-mayor-cvr.xlsx
     
    2) If yes, did you're output match the number of rounds and results from
    the race?  Yes.  The output was the same.  
     
    3) Would you like to present this at PyMNtos meeting sometime in the future?  Probably not.  Based on the underwhelming feedback I got today I'm guessing it's not too interesting for most.  But, I'm glad you liked it.  My goal in the sample implementation was to show that the tabulation of votes could be done easily.  The code isn't complicated and that is by design.  I'd like the next election in Minneapolis to be done quickly.  It was driving me nuts not knowing if my candidates of choice won or lost.
Hopefully I'll be able to make the next pymntos meeting.

-William



On Mon, Nov 18, 2013 at 8:50 PM, <pym...@googlegroups.com> wrote:

Group: http://groups.google.com/group/pymntos/topics

    William Cannon <william...@gmail.com> Nov 17 08:46PM -0600  

    *Challenge (albeit a bit late) Accepted!*
     
    I wrote up a ranked choice voting calculator in python today.
    https://github.com/wcannon/ranked-choice-voting.git
     
    *Programs:*
     
    *election.py*
    provides: ranked-choice voting
    input: csv file containing all votes for an election (1 vote per line, a
    line consists of 1+ choices for a candidate)
    output: run it and see
    e.g. election.py election_csv_file.csv
     
    *election_votes_generator.py*
    provides: a simple way to create a csv of ranked-choice votes
    input: arguments (OUTPUT_FILE VOTERS CANDIDATES ALLOWED_CHOICES)
    e.g. election_votes_generator.py out.csv 200000 15 3
    This would create a simulated set of votes containing 200000 votes, with 15
    candidates, where a vote is for 3 candidates in ranked order.
     
    fyi: I ran a simulated election with 1000000 votes, 30 candidates, and 3
    choices allowed per vote.
     
    Time to run… 1 minute 31 seconds.
     
    If this is interesting to anyone, please use it and contribute back.
     
    Warm regards,
    William Cannon
     
     
     

     

    Peter Farrell <p...@maestropublishing.com> Nov 18 06:35PM -0600  

    Bill, this looks really cool. I checked out the source for it and it isn't
    that complicated at all.
     
     
    A couple of questions:
     
    1) Is that the real .csv ballot information from the 2013 MPLS Mayor's race?
     
    2) If yes, did you're output match the number of rounds and results from
    the race?
     
    3) Would you like to present this at PyMNtos meeting sometime in the future?
     
     

     

--
Meetings Schedule / RVSP on our Meetup at http://python.mn
---
You received this message because you are subscribed to the Google Groups "PyMNtos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymntos+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages