{
  "_id": "6a19e18dad7a21ec89460f14",
  "Package": "proporz",
  "Type": "Package",
  "Title": "Proportional Apportionment",
  "Version": "1.5.2.9000",
  "Authors@R": "c(\nperson(\"Flavio\", \"Poletti\", role = c(\"aut\", \"cre\", \"cph\"), email = \"flavio.poletti@hotmail.ch\"))",
  "Description": "Calculate seat apportionment for legislative bodies with\nvarious methods. The algorithms include divisor or highest\naverages methods (e.g. Jefferson, Webster or Adams), largest\nremainder methods and biproportional apportionment. Gaffke, N.\n& Pukelsheim, F. (2008) <doi:10.1016/j.mathsocsci.2008.01.004>\nOelbermann, K. F. (2016)\n<doi:10.1016/j.mathsocsci.2016.02.003>.",
  "License": "GPL (>= 3)",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "RoxygenNote": "7.3.3",
  "Roxygen": "list(markdown = TRUE)",
  "URL": "https://polettif.github.io/proporz/,\nhttps://github.com/polettif/proporz",
  "BugReports": "https://github.com/polettif/proporz/issues",
  "VignetteBuilder": "knitr",
  "Repository": "https://polettif.r-universe.dev",
  "Date/Publication": "2026-05-29 14:57:54 UTC",
  "RemoteUrl": "https://github.com/polettif/proporz",
  "RemoteRef": "HEAD",
  "RemoteSha": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-29 18:53:19 UTC",
    "User": "root"
  },
  "Author": "Flavio Poletti [aut, cre, cph]",
  "Maintainer": "Flavio Poletti <flavio.poletti@hotmail.ch>",
  "MD5sum": "e6dec7f6c830261c3a7985b47de5ac80",
  "_user": "polettif",
  "_type": "src",
  "_file": "proporz_1.5.2.9000.tar.gz",
  "_fileid": "6a302115f702815ed93ece08fefbdfeb5a5c82d0831355823477c2f1cad8c842",
  "_filesize": 399328,
  "_sha256": "6a302115f702815ed93ece08fefbdfeb5a5c82d0831355823477c2f1cad8c842",
  "_created": "2026-05-29T18:53:19.000Z",
  "_published": "2026-05-29T18:57:17.306Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78566616171,
      "time": 137,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7298640916"
    },
    {
      "job": 78566616183,
      "time": 127,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7298637827"
    },
    {
      "job": 78566616179,
      "time": 167,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7298643221"
    },
    {
      "job": 78566616158,
      "time": 192,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7298646570"
    },
    {
      "job": 78566171342,
      "time": 160,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7298593714"
    },
    {
      "job": 78566616162,
      "time": 111,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7298632136"
    },
    {
      "job": 78566616172,
      "time": 129,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7298638435"
    },
    {
      "job": 78566616190,
      "time": 106,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7298630798"
    },
    {
      "job": 78566616173,
      "time": 86,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7298623856"
    }
  ],
  "_buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/polettif/proporz",
  "_commit": {
    "id": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
    "author": "Flavio Poletti <flavio.poletti@hotmail.ch>",
    "committer": "Flavio Poletti <flavio.poletti@hotmail.ch>",
    "message": "check package with city of Zurich 2026 election results\n",
    "time": 1780066674
  },
  "_maintainer": {
    "name": "Flavio Poletti",
    "email": "flavio.poletti@hotmail.ch",
    "login": "polettif",
    "description": "",
    "uuid": 17431069
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.6.0",
      "role": "Depends"
    },
    {
      "package": "shiny",
      "role": "Suggests"
    },
    {
      "package": "shinyMatrix",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "polettif",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-35",
      "n": 1
    },
    {
      "week": "2025-36",
      "n": 1
    },
    {
      "week": "2025-37",
      "n": 4
    },
    {
      "week": "2025-40",
      "n": 1
    },
    {
      "week": "2025-41",
      "n": 3
    },
    {
      "week": "2025-47",
      "n": 1
    },
    {
      "week": "2026-22",
      "n": 4
    }
  ],
  "_tags": [
    {
      "name": "v1.5.2",
      "date": "2025-10-10"
    }
  ],
  "_topics": [
    "apportionment",
    "apportionment-methods",
    "biproportional",
    "election-analysis"
  ],
  "_stars": 8,
  "_contributors": [
    {
      "user": "polettif",
      "count": 190,
      "uuid": 17431069
    }
  ],
  "_userbio": {
    "uuid": 17431069,
    "type": "user",
    "name": "Flavio Poletti"
  },
  "_downloads": {
    "count": 136,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/proporz"
  },
  "_devurl": "https://github.com/polettif/proporz",
  "_pkgdown": "https://polettif.github.io/proporz/",
  "_searchresults": 9,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/proporz.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/polettif/proporz",
  "_realowner": "polettif",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.4.0",
      "date": "2024-03-04"
    },
    {
      "version": "1.5.0",
      "date": "2024-04-03"
    },
    {
      "version": "1.5.1",
      "date": "2025-03-10"
    },
    {
      "version": "1.5.2",
      "date": "2025-10-10"
    }
  ],
  "_exports": [
    "apply_quorum",
    "biproporz",
    "ceil_at",
    "district_winner_matrix",
    "divisor_ceiling",
    "divisor_floor",
    "divisor_geometric",
    "divisor_harmonic",
    "divisor_round",
    "get_divisors",
    "highest_averages_method",
    "largest_remainder_method",
    "lower_apportionment",
    "pivot_to_df",
    "pivot_to_matrix",
    "proporz",
    "pukelsheim",
    "quorum_all",
    "quorum_any",
    "reached_quorum_any_district",
    "reached_quorum_total",
    "run_app",
    "upper_apportionment",
    "weight_list_votes",
    "weight_votes_matrix"
  ],
  "_datasets": [
    {
      "name": "finland2019",
      "title": "Finnish Parliamentary Elections Data (2019)",
      "object": "finland2019",
      "class": [
        "list"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "uri2020",
      "title": "Election Data for the Cantonal Council of Uri (2020)",
      "object": "uri2020",
      "class": [
        "list"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "zug2018",
      "title": "Election Data for the Cantonal Council of Zug (2018)",
      "object": "zug2018",
      "class": [
        "data.frame"
      ],
      "fields": [
        "compound_title_it_CH",
        "compound_title_de_CH",
        "compound_title_rm_CH",
        "compound_title_fr_CH",
        "compound_date",
        "compound_mandates",
        "election_title_it_CH",
        "election_title_de_CH",
        "election_title_rm_CH",
        "election_title_fr_CH",
        "election_date",
        "election_domain",
        "election_type",
        "election_mandates",
        "election_absolute_majority",
        "election_status",
        "entity_district",
        "entity_name",
        "entity_id",
        "entity_counted",
        "entity_eligible_voters",
        "entity_received_ballots",
        "entity_blank_ballots",
        "entity_invalid_ballots",
        "entity_unaccounted_ballots",
        "entity_accounted_ballots",
        "entity_blank_votes",
        "entity_invalid_votes",
        "entity_accounted_votes",
        "list_name",
        "list_id",
        "list_number_of_mandates",
        "list_votes",
        "list_connection",
        "list_connection_parent",
        "candidate_family_name",
        "candidate_first_name",
        "candidate_id",
        "candidate_elected",
        "candidate_party",
        "candidate_votes",
        "panachage_votes_from_list_1",
        "panachage_votes_from_list_2",
        "panachage_votes_from_list_3",
        "panachage_votes_from_list_4",
        "panachage_votes_from_list_5",
        "panachage_votes_from_list_6",
        "panachage_votes_from_list_7",
        "panachage_votes_from_list_999"
      ],
      "rows": 267,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "apply_quorum",
      "title": "Apply quorum to votes vector or matrix",
      "topics": [
        "apply_quorum"
      ]
    },
    {
      "page": "biproporz",
      "title": "Biproportional apportionment",
      "topics": [
        "biproporz"
      ]
    },
    {
      "page": "ceil_at",
      "title": "Rounding with predefined thresholds",
      "topics": [
        "ceil_at"
      ]
    },
    {
      "page": "district_winner_matrix",
      "title": "Find which party has the most votes in a district",
      "topics": [
        "district_winner_matrix"
      ]
    },
    {
      "page": "divisor_methods",
      "title": "Divisor methods",
      "topics": [
        "divisor_ceiling",
        "divisor_floor",
        "divisor_geometric",
        "divisor_harmonic",
        "divisor_methods",
        "divisor_round"
      ]
    },
    {
      "page": "finland2019",
      "title": "Finnish Parliamentary Elections Data (2019)",
      "topics": [
        "finland2019"
      ]
    },
    {
      "page": "get_divisors",
      "title": "Get district and party divisors from biproporz result",
      "topics": [
        "get_divisors"
      ]
    },
    {
      "page": "highest_averages_method",
      "title": "Highest averages method",
      "topics": [
        "highest_averages_method"
      ]
    },
    {
      "page": "largest_remainder_method",
      "title": "Largest remainder method",
      "topics": [
        "largest_remainder_method"
      ]
    },
    {
      "page": "lower_apportionment",
      "title": "Lower apportionment",
      "topics": [
        "lower_apportionment"
      ]
    },
    {
      "page": "pivot_to_matrix",
      "title": "Pivot long data.frame to wide matrix and vice versa",
      "topics": [
        "pivot_to_df",
        "pivot_to_matrix"
      ]
    },
    {
      "page": "proporz",
      "title": "Proportional apportionment",
      "topics": [
        "proporz"
      ]
    },
    {
      "page": "pukelsheim",
      "title": "Biproportional apportionment with data frames",
      "topics": [
        "pukelsheim"
      ]
    },
    {
      "page": "quorum_functions",
      "title": "Create quorum functions for biproportional apportionment",
      "topics": [
        "quorum_all",
        "quorum_any",
        "quorum_functions"
      ]
    },
    {
      "page": "reached_quorum_any_district",
      "title": "Check if parties reached a quorum in at least one district",
      "topics": [
        "reached_quorum_any_district"
      ]
    },
    {
      "page": "reached_quorum_total",
      "title": "Check if parties reached the quorum for all votes",
      "topics": [
        "reached_quorum_total"
      ]
    },
    {
      "page": "run_app",
      "title": "Use biproportional apportionment interactively in a shiny app",
      "topics": [
        "run_app"
      ]
    },
    {
      "page": "upper_apportionment",
      "title": "Upper apportionment",
      "topics": [
        "upper_apportionment"
      ]
    },
    {
      "page": "uri2020",
      "title": "Election Data for the Cantonal Council of Uri (2020)",
      "topics": [
        "uri2020"
      ]
    },
    {
      "page": "weight_votes_matrix",
      "title": "Create weighted votes matrix",
      "topics": [
        "weight_list_votes",
        "weight_votes_matrix"
      ]
    },
    {
      "page": "zug2018",
      "title": "Election Data for the Cantonal Council of Zug (2018)",
      "topics": [
        "zug2018"
      ]
    }
  ],
  "_pkglogo": "https://github.com/polettif/proporz/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/polettif/proporz/raw/HEAD/README.md",
  "_rundeps": [],
  "_vignettes": [
    {
      "source": "apportionment_scenarios.Rmd",
      "filename": "apportionment_scenarios.html",
      "title": "Apportionment scenarios",
      "author": "Flavio Poletti",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1) Introduction",
        "2) Setup data",
        "3) Distribute seats in every district independently",
        "3.1) Function to distribute seats in districts",
        "3.2) Actual distribution method (D'Hondt)",
        "3.3) Alternative methods",
        "3.4) Compare seat share with vote share",
        "4) Biproportional method",
        "4.1) Biproportional party seats",
        "4.2) Distribute seats among districts as well",
        "5) Effect of a system change on seat distribution"
      ],
      "created": "2024-02-23 11:13:10",
      "modified": "2025-10-10 08:33:21",
      "commits": 5
    },
    {
      "source": "modifying_biproporz.Rmd",
      "filename": "modifying_biproporz.html",
      "title": "Modifying biproporz()",
      "author": "Flavio Poletti",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1) Introduction",
        "Analyzing the Votes Matrix",
        "2) Standard Biproportional Apportionment",
        "3) Modifying biproporz with Parameters",
        "Applying a Quorum",
        "Alternative Apportionment Methods",
        "Custom Rounding Function",
        "4) District Winner Methods",
        "Winner-Take-One (WTO)",
        "WTO with an Alternative Upper Apportionment Method",
        "WTO with Ties",
        "Guaranteeing District Winners a Seat"
      ],
      "created": "2025-03-06 16:09:41",
      "modified": "2025-10-10 08:33:21",
      "commits": 5
    }
  ],
  "_score": 5.748188027006201,
  "_indexed": true,
  "_nocasepkg": "proporz",
  "_universes": [
    "polettif"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.5.2.9000",
      "date": "2026-05-29T18:55:38.000Z",
      "distro": "noble",
      "commit": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
      "fileid": "a1600cc1f8ef77ef6002e0ea1a7d0f10b9f7db7235bb930de4d176cab05ad866",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.5.2.9000",
      "date": "2026-05-29T18:55:31.000Z",
      "distro": "noble",
      "commit": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
      "fileid": "9d0716b000b9c6ec5e19f520aa822391d3bdca19ceae4c3066c3dfbe06a1720d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.5.2.9000",
      "date": "2026-05-29T18:55:52.000Z",
      "commit": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
      "fileid": "9ed301b1ebc8efb5fd777643abc23b0d4d91155647621c044d4f4b503ebfad29",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.5.2.9000",
      "date": "2026-05-29T18:55:54.000Z",
      "commit": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
      "fileid": "61f1bfcb24a9653dbc9144bc36a4b5a11693e16d9e6f573d6597530aa374e109",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.5.2.9000",
      "date": "2026-05-29T18:55:31.000Z",
      "commit": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
      "fileid": "fab6c57ecf1b94aafc3c38983958423823cc722e79599aaeffb1dda785126dfc",
      "status": "success",
      "buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.5.2.9000",
      "date": "2026-05-29T18:55:19.000Z",
      "commit": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
      "fileid": "4c09a893b431aeac86f09de3849988b15b66be5604382da3c622773ba31e532a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.5.2.9000",
      "date": "2026-05-29T18:55:04.000Z",
      "commit": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
      "fileid": "ddc8ab1e416e9d4f88cd804d8d6f809c62e2acbded8d5cc40ef89833621a9c6e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.5.2.9000",
      "date": "2026-05-29T18:54:43.000Z",
      "commit": "0a920c8bdf365e9eeea3446cbfa315647103ae65",
      "fileid": "fb775f162f1d8ed6407824df19be9c74486c3e57d681b59b7214b777a34836f3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/polettif/actions/runs/26655986067"
    }
  ]
}