Programming languages affinity through proportional representation

Data from 2022 Stack Overflow Developer survey

When a programming language is forced to be "elected", the votes are reweighted to reduce the influence of voters who approved of the said winner, as they have gained representation. Visualizing this enables us to explore the relationships between each programming language. When JavaScript is elected, which programming language loses the most? The answer indicates some sort of affinity between the two languages - its voters are satisified when either are elected.

This is symmetrical when using absolute numbers, but not when using relative numbers. A small programming language will be strongly affected when a popular programming language is elected, but this reflects more on their small size than strong affinity.

SPAV reduces the weight of each voter, so their votes literally count less than voters that haven't been represented yet. "SPAV relative" compares the programming language's reweighted sum of votes to the original sum of votes.

In Phragmen, every voter initially starts with a load (also called cost) of 0. The winner's load of 1 is evenly distributed to all its approvers. One way to measure change is to compare the new total loads with the initial loads of 0. Another way to measure change is to follow the money analogy. To elect a candidate with X approvals, give every voter 1/X dollars. The voters who approved of the candidate pool their money to "buy" candidate X, losing all their money. Then, for each candidate, count the total money their approvers have remaining. Candidates that shares many voters with the winner will have much less money remaining than a candidate that shares fewer voters. The money analogy allows for both absolute and relative comparison.