Example ballot for Ranked-Choice Voting in New York City
Example ballot for Ranked-Choice Voting in New York City

New York City, for the first time in history, is implementing ranked-choice voting for its 2021 mayoral election. As I was reading about it in the news, I thought, “How does this actually work under the hood?” So I set about writing my own ranked-choice voting algorithm to calculate the winner of such an election. I actually found that the method NYC is using is kind of unfair, and not really true to what I think of as ranked-choice voting. So, I decided to improve it.

According to nyc.gov, the way it works is this:

“You can rank up to…

Zachariah Kobrinsky

Full stack web developer, creative technologist, self-proclaimed space journalist. | React | Redux | Ruby on Rails | JavaScript

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store