diff --git a/slides/presentation.tsx b/slides/presentation.tsx index 846c6d5..38cfdfd 100644 --- a/slides/presentation.tsx +++ b/slides/presentation.tsx @@ -17,13 +17,15 @@ export function Presentation({ }) { return (<>
-
+

Wer sind die Gewinner der Bundestagswahlrechtsreform?

+ {/*
CC BY-NC 2.5 - https://xkcd.com/356
+ */}
@@ -319,7 +321,7 @@ export function Reform2023() {
- Quelle: blog.campact.de / montagslächeln / Kostas Koufogiorgos, Toonpool + blog.campact.de / montagslächeln / Kostas Koufogiorgos, Toonpool
@@ -336,8 +338,8 @@ export function Reform2023() {

Selbst nachrechnen!

- - + +
@@ -382,7 +384,7 @@ export function Reform2023() {
-

Sind Wahlrechtsreformen die deutsche Form des Gerrymanderings?

+

Sind Wahlrechtsreformen
die deutsche Form des Gerrymanderings?

@@ -424,37 +426,37 @@ export function Sitzzuteilungsverfahren({ }) {
{`
           def d_hondt(votes: ArrayLike, seats: int):
-              assigned_seats = np.zeros_like(votes)
-              while sum(assigned_seats) < seats:
-                  scores = votes / (assigned_seats + 1)
-                  to_increment = scores.index(max(scores))
-                  assigned_seats[to_increment] += 1
-              return assigned_seats
+            assigned_seats = np.zeros_like(votes)
+            while sum(assigned_seats) < seats:
+                scores = votes / (assigned_seats + 1)
+                to_increment = np.argmax(scores)
+                assigned_seats[to_increment] += 1
+            return assigned_seats
         `}
{`
           def sainte_laguë(votes: ArrayLike, seats: int):
-              assigned_seats = np.zeros_like(votes)
-              while sum(assigned_seats) < seats:
-                  scores = votes / (2 * assigned_seats + 1)
-                  to_increment = scores.index(max(scores))
-                  assigned_seats[to_increment] += 1
-              return assigned_seats
+            assigned_seats = np.zeros_like(votes)
+            while sum(assigned_seats) < seats:
+                scores = votes / (2 * assigned_seats + 1)
+                to_increment = np.argmax(scores)
+                assigned_seats[to_increment] += 1
+            return assigned_seats
         `}
{`
           def hare_nimeyer(votes: ArrayLike, seats: int):
-              assigned_seats = np.floor((votes * seats) / sum(votes))
-              rest = (votes * seats) / sum(votes) - assigned_seats
-              while sum(assigned_seats) < seats:
-                  to_increment = rest.index(max(rest))
-                  rest[to_increment] = 0
-                  assigned_seats[to_increment] += 1
-              return assigned_seats
+            assigned_seats = np.floor((votes * seats) / sum(votes))
+            rest = (votes * seats) / sum(votes) - assigned_seats
+            while sum(assigned_seats) < seats:
+                to_increment = np.argmax(rest)
+                rest[to_increment] = 0
+                assigned_seats[to_increment] += 1
+            return assigned_seats
         `}