{"id":13411435,"url":"https://github.com/simonjwright/dhondt","last_synced_at":"2025-03-14T17:30:46.746Z","repository":{"id":135312362,"uuid":"187461510","full_name":"simonjwright/dhondt","owner":"simonjwright","description":"Ada implementation of D’Hondt electoral result calculator","archived":false,"fork":false,"pushed_at":"2019-12-13T12:20:08.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-10T16:55:22.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ada","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/simonjwright.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-19T10:15:24.000Z","updated_at":"2022-03-21T20:35:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9b36c99-89a5-477f-9486-9bf0010b2e05","html_url":"https://github.com/simonjwright/dhondt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fdhondt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fdhondt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fdhondt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonjwright%2Fdhondt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonjwright","download_url":"https://codeload.github.com/simonjwright/dhondt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243618606,"owners_count":20320265,"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":[],"created_at":"2024-07-30T20:01:13.649Z","updated_at":"2025-03-14T17:30:46.729Z","avatar_url":"https://github.com/simonjwright.png","language":"Ada","funding_links":[],"categories":["Applications"],"sub_categories":["Misc"],"readme":"# D'Hondt Calculator #\n\nThis is an [Ada 2012](http://getadanow.com) program to predict electoral results in a party-list proportional representation election conducted according to the [D'Hondt](https://en.wikipedia.org/wiki/D'Hondt_method) method (as will be the case for the British EU election to be conducted on 23 May 2019).\n\n## Building ##\n\nUsing your favourite Ada compiler,\n```\ngnatmake dhondt_calculator.adb\n```\n\n## Data prep ##\n\nThe input data file should look like this (comments optional, first character of line is space, `-` or `#`):\n```text\n--  Dhondt electoral data for South West region.\n\n--  The number of seats\n6\n\n--  The party polling data (or actual number of votes). No spaces\n--  in party names!\nBrexit 42\nChange_UK 4\nGreen 12\nLabour 8\nLibDem 20\nConservatives 9\nUKIP 3\n```\n\n## Running ##\n\n```shell\n./dhondt_calculator \u003c dhondt_sw.dat\n```\n\n## Notes ##\n\nThe usefulness of this program is likely to be limited, so I've not been as careful of input validation as would be normal.\n\nThe result of running with the current data set is\n```text\n$ ./dhondt_calculator \u003c dhondt_sw.dat\nWinner of round 1 is Brexit\nWinner of round 2 is Brexit\nWinner of round 3 is LibDem\nWinner of round 4 is Brexit\nWinner of round 5 is Green\nWinner of round 6 is Brexit\n\nBrexit won 4 seats.\nChange_UK won 0 seats.\nConservatives won 0 seats.\nGreen won 1 seats.\nLabour won 0 seats.\nLibDem won 1 seats.\nUKIP won 0 seats.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonjwright%2Fdhondt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonjwright%2Fdhondt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonjwright%2Fdhondt/lists"}