{"id":26413003,"url":"https://github.com/mieuxvoter/majority-judgment-library-php","last_synced_at":"2025-03-17T22:53:46.370Z","repository":{"id":49041522,"uuid":"325349554","full_name":"MieuxVoter/majority-judgment-library-php","owner":"MieuxVoter","description":"Interface-oriented PHP library to deliberate using majority judgment, using a score-based algorithm for performance.","archived":false,"fork":false,"pushed_at":"2021-06-30T12:43:51.000Z","size":36,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-16T14:13:45.205Z","etag":null,"topics":["election","majority-judgment","php-library","political-science","poll"],"latest_commit_sha":null,"homepage":"https://mieuxvoter.fr","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MieuxVoter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-29T17:38:53.000Z","updated_at":"2022-06-14T06:55:33.000Z","dependencies_parsed_at":"2022-09-08T16:41:45.273Z","dependency_job_id":null,"html_url":"https://github.com/MieuxVoter/majority-judgment-library-php","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-library-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-library-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-library-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MieuxVoter%2Fmajority-judgment-library-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MieuxVoter","download_url":"https://codeload.github.com/MieuxVoter/majority-judgment-library-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244123624,"owners_count":20401627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["election","majority-judgment","php-library","political-science","poll"],"created_at":"2025-03-17T22:53:45.870Z","updated_at":"2025-03-17T22:53:46.364Z","avatar_url":"https://github.com/MieuxVoter.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Majority Judgment PHP Library\n\nDeliberate majority judgment polls ⚖.\n\n\n## Features\n\n- Majority judgment deliberation from merit profiles\n- Score based, efficiency should scale well (algo is parallelizable)\n- Interface-oriented, test-driven code\n- Extensible to get other judgments (usual, central, etc.)\n- Made by [MieuxVoter](https://mieuxvoter.fr)'s volunteers\n\n\n## Usage example\n\nRequire it in your own project, using composer:\n\n    composer require mieuxvoter/majority-judgment\n\nUse it:\n\n```php\nuse MieuxVoter\\MajorityJudgment\\MajorityJudgmentDeliberator;\nuse MieuxVoter\\MajorityJudgment\\Model\\Settings\\MajorityJudgmentSettings;\nuse MieuxVoter\\MajorityJudgment\\Model\\Tally\\ArrayPollTally;\n\n$tally = new ArrayPollTally([\n    'Proposal A' =\u003e [1, 1, 4, 3, 7, 4, 1], // amount of judgments for each grade\n    'Proposal B' =\u003e [0, 2, 4, 6, 4, 2, 3], // (worst grade to best grade)\n]);\n\n$deliberator = new MajorityJudgmentDeliberator();\n\n$result = $deliberator-\u003edeliberate($tally);\n// $result is a PollResultInterface\n\nforeach($result-\u003egetProposalResults() as $proposalResult) {\n    // … Do something\n    print($proposalResult-\u003egetProposal());\n    print($proposalResult-\u003egetRank());\n}\n\n```\n\n\n## Interface-oriented\n\nAny object implementing `PollTallyInterface` may be used as input.\n\n\n### Testing\n\nSee the tests in `test/`.\n\n    composer install --dev\n    vendor/phpunit/phpunit/phpunit -v test\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmieuxvoter%2Fmajority-judgment-library-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmieuxvoter%2Fmajority-judgment-library-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmieuxvoter%2Fmajority-judgment-library-php/lists"}