Skip to content

Code implementation based on Thailand's Organic Act on the Election of Members of the House of Representatives, B.E. 2561 (2018)

Notifications You must be signed in to change notification settings

here-nerd/thailand-party-list-calculator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thailand Party List Calculator

According to Constitution of Kingdom of Thailand 2017, the election system adopts Mixed Members Appointment system (MMA) to make sure that the people's vote percentage reflects the percentage of each party in House of Representatives.

This code implementation is based on Organic Act on the Election of Members of the House of Representatives, B.E. 2561 (2018) ( พระราชบัญญัติประกอบรัฐธรรมนูญว่าด้วยการเลือกตั้งสมาชิกสภาผู้แทนราษฎร พ.ศ. 2561)

Disclaimer

This is not the official software. We do not hold any responsibility for any mistake in any law interpretation or logic implementation.

Installation

npm install thailand-party-list-calculator

or

yarn add thailand-party-list-calculator

Usage

const parties = calculatePartyList([
  {
    id: "1", // Unique ID
    electedMemberCount: 100, // Number of constituency candates of the party
    voteCount: 1000, // Total number of vote of the party
    partyListCandidateCount: 150 // Number of party list candidates of the party
  },
  {
    ...
  }
])

// parties[0].partyListMemberCount

About

Code implementation based on Thailand's Organic Act on the Election of Members of the House of Representatives, B.E. 2561 (2018)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%