Skip to content

Commit

Permalink
fixed seats inaccuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
hemisemidemipresent committed Mar 24, 2024
1 parent f4ece4f commit 35c8a6a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions scripts/2011.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const results = [
percent: 43.07,
},
],
seats: 4,
seats: 5,
},
{
name: "Chua Chu Kang",
Expand All @@ -201,7 +201,7 @@ const results = [
percent: 38.8,
},
],
seats: 4,
seats: 5,
},
{
name: "Holland-Bukit Timah",
Expand Down Expand Up @@ -257,7 +257,7 @@ const results = [
percent: 30.67,
},
],
seats: 5,
seats: 6,
},
{
name: "East Coast",
Expand Down Expand Up @@ -327,7 +327,7 @@ const results = [
percent: 35.21,
},
],
seats: 5,
seats: 6,
},
{
name: "Sembawang",
Expand Down
6 changes: 3 additions & 3 deletions scripts/2015.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const results = [
percent: 26.41,
},
],
seats: 4,
seats: 5,
},
{
name: "Chua Chu Kang",
Expand Down Expand Up @@ -363,7 +363,7 @@ const results = [
percent: 27.11,
},
],
seats: 5,
seats: 6,
},
{
name: "Sembawang",
Expand Down Expand Up @@ -419,6 +419,6 @@ const results = [
percent: 21.43,
},
],
seats: 5,
seats: 4,
},
];
2 changes: 1 addition & 1 deletion scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ for (let i = 0; i < results.length; i++) {
const diff = sortedVotes[0].percent - sortedVotes[1].percent;
// 0 - lean (under 10)
// 1 - likely (10 - 20)
// 2 - safe (under 10)
// 2 - safe (above 20)
let margin = 0;
if (diff > 10) margin = 1;
if (diff > 20) margin = 2;
Expand Down

0 comments on commit 35c8a6a

Please sign in to comment.