{"id":13711811,"url":"https://github.com/erocoar/ggpol","last_synced_at":"2025-10-29T18:05:38.162Z","repository":{"id":56430819,"uuid":"127288913","full_name":"erocoar/ggpol","owner":"erocoar","description":"🌍 Parliament diagrams and more for ggplot2","archived":false,"fork":false,"pushed_at":"2022-05-26T18:34:48.000Z","size":1423,"stargazers_count":104,"open_issues_count":5,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-30T00:52:16.250Z","etag":null,"topics":["dataviz","ggplot-extension","ggplot2","r","visualization"],"latest_commit_sha":null,"homepage":"https://erocoar.github.io/ggpol/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erocoar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-29T12:34:23.000Z","updated_at":"2024-08-14T20:31:41.000Z","dependencies_parsed_at":"2022-08-15T18:31:31.684Z","dependency_job_id":null,"html_url":"https://github.com/erocoar/ggpol","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erocoar%2Fggpol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erocoar%2Fggpol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erocoar%2Fggpol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erocoar%2Fggpol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erocoar","download_url":"https://codeload.github.com/erocoar/ggpol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248686076,"owners_count":21145414,"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":["dataviz","ggplot-extension","ggplot2","r","visualization"],"created_at":"2024-08-02T23:01:11.878Z","updated_at":"2025-10-29T18:05:33.124Z","avatar_url":"https://github.com/erocoar.png","language":"R","funding_links":[],"categories":["Plot layers","R"],"sub_categories":[],"readme":"[![R-CMD-check](https://github.com/erocoar/ggpol/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/erocoar/ggpol/actions/workflows/R-CMD-check.yaml)\n[![CRAN_Release_Badge](http://www.r-pkg.org/badges/version-ago/ggpol)](https://CRAN.R-project.org/package=ggpol)\n[![CRAN_Download_Badge](http://cranlogs.r-pkg.org/badges/grand-total/ggpol)](https://CRAN.R-project.org/package=ggpol)\n\n\n### About\n`ggpol` adds parliament diagrams and various other visualizations and convenience functions to `ggplot2`.\n\n### Installation\n`ggpol` can be installed via CRAN:\n\n```r\ninstall.packages(\"ggpol\")\n```\n\nAlternatively, the development version can be installed via GitHub:\n\n```r\nif (!require(devtools)) {\n    install.packages('devtools')\n}\ndevtools::install_github('erocoar/ggpol')\n```\n### Selected Features\nBelow are two functions added by `ggpol`. For a full overview with applications, please refer to the [vignette](https://erocoar.github.io/ggpol/).\n\n\n`geom_parliament` draws a parliament diagram, clustering points along an arc by parties with each point representing a single member of parliament. \n\n```r\nbt \u003c- data.frame(\n parties = factor(c(\"CDU\", \"CSU\", \"AfD\", \"FDP\", \"SPD\", \n                    \"Linke\", \"Gruene\", \"Fraktionslos\"),\n                  levels = c(\"CDU\", \"CSU\", \"AfD\", \"FDP\", \"SPD\", \n                             \"Linke\", \"Gruene\", \"Fraktionslos\")),\n seats   = c(200, 46, 92, 80, 153, 69, 67, 2),\n colors  = c(\"black\", \"blue\", \"lightblue\", \"yellow\", \n             \"red\",\"purple\", \"green\", \"grey\"),\n stringsAsFactors = FALSE)\n\nggplot(bt) + \n  geom_parliament(aes(seats = seats, fill = parties), color = \"black\") + \n  scale_fill_manual(values = bt$colors, labels = bt$parties) +\n  coord_fixed() + \n  theme_void()\n```\n\n![Parliament Diagram](https://i.imgur.com/gvsCvBH.png)\n\n`geom_boxjitter` produces a hybrid of box- and scatterplot. \n\n```r\ndf \u003c- data.frame(score = rgamma(150, 4, 1), \n                 gender = sample(c(\"M\", \"F\"), 150, replace = TRUE), \n                genotype = factor(sample(1:3, 150, replace = TRUE)))\n\nggplot(df) + geom_boxjitter(aes(x = genotype, y = score, fill = gender),\n                            jitter.shape = 21, jitter.color = NA, \n                            jitter.params = list(height = 0, width = 0.04),\n                            outlier.color = NA, errorbar.draw = TRUE) +\n  scale_fill_manual(values = c(\"#ecb21e\", \"#812e91\")) +\n  theme_minimal()\n```\n\n![Hybrid Boxplot](https://i.imgur.com/zlwIs14.png)\n\n### Roadmap\nIf you would like to see a certain feature, please file an issue with a detailed description.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferocoar%2Fggpol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferocoar%2Fggpol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferocoar%2Fggpol/lists"}