https://en.m.wikipedia.org/wiki/Webster/Sainte-Laguë_method
Calculates seat distribution of a committee, using the Webster/Sainte-Laguë/Schepers method for seat allocation.
It takes a number of seats in the committee and a set of parties with their number of seats in the actual parliament.
const committeeSize = 34;
const parties = {
cdu: {
seats: 123
},
spd: {
seats: 120
},
...
};
// parliament size is calculated by adding the parties' seats - duh :P
It returns an Object with the initial object's keys (preferably the parties' names) and the seats for that key in the committee.
=> {
cdu: 17,
spd: 11,
...
}