Skip to content

kumar-ish/exploit-git-races

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Exploiting Git For Presidential Primaries and Fun

Presidential primaries in the U.S. are elections to select candidates, usually for a particular political party (so there's individual ones for both the Democratic and Republican parties), to appear on the general election ballot. They happen throughout the same year that the presidential election happens.

In presidential primaries, as time goes on, candidates will drop out of the race due to an assortment of reasons: it could be due to issues with fundraising, not qualifying for the party's presidential debate, poor polling, personal reasons, etc. Once a candidate drops out, they will most likely (although in most circumstances they don't have to) endorse another candidate (or multiple, and that endorsement might even change in the future).

If you model these entrances / exits (dropping out) from the race, and endorsements as various operations in git, it makes for some interesting looking graphs.

For example, this is what the graph produced by Github (in here) for the 2020 Democratic Presidential Primaries looks like:

image

And from (the fantastic) git-graph:

image

Data format

To minimize complexity in terms for data handling, we use a CSV-like format called .csvish -- the only difference between this and CSV files are that these don't need to have the same number of elements in all the rows. This is so we can have all the data represented in one document. The limitation of this is that sections need to be differentiated via the number of elements in the rows of those sections.

Run

Note that the program requires Python version >= 3.10

An example to run the program is the following:

python3.12 git-endorser.py --filename data/dem-primary-2020.csvish

About

Visualising U.S. President Primary races with some clever git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages