{"id":20645576,"url":"https://github.com/ivelasq/severance","last_synced_at":"2025-04-16T02:19:37.370Z","repository":{"id":115672292,"uuid":"534503230","full_name":"ivelasq/severance","owner":"ivelasq","description":"The severance package contains color palettes inspired by the show Severance","archived":false,"fork":false,"pushed_at":"2022-09-12T17:25:33.000Z","size":9391,"stargazers_count":42,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T04:04:51.944Z","etag":null,"topics":["color-palette","ggplot2-themes"],"latest_commit_sha":null,"homepage":"","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/ivelasq.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-09-09T04:56:04.000Z","updated_at":"2025-03-22T17:39:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"590ddc72-af1f-47fa-8ecb-c45ecab88016","html_url":"https://github.com/ivelasq/severance","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/ivelasq%2Fseverance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivelasq%2Fseverance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivelasq%2Fseverance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivelasq%2Fseverance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivelasq","download_url":"https://codeload.github.com/ivelasq/severance/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183351,"owners_count":21226180,"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":["color-palette","ggplot2-themes"],"created_at":"2024-11-16T16:20:33.535Z","updated_at":"2025-04-16T02:19:37.349Z","avatar_url":"https://github.com/ivelasq.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# severance \u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"300\" /\u003e\n\nThe severance package contains color palettes for R inspired by the show [Severance](https://tv.apple.com/us/show/severance/umc.cmc.1srk2goyh2q2zdxcx605w8vtx).\n\nImages were sourced from the [Apple TV+ Press website](https://www.apple.com/tv-pr/originals/severance/episodes-images/). The structure of the package was based on the [MetBrewer package](https://github.com/BlakeRMills/MetBrewer) by Blake R. Mills and the [wesanderson package](https://github.com/karthik/wesanderson) by Karthik Ram.\n\n* [Installation](#installation)\n* [Examples](#examples)\n* [Palettes](#palettes)\n* [Notes](#notes)\n\n## Installation\n\nYou can install the development version of severance from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"ivelasq/severance\")\n```\n\n## Examples\n\nHere are examples of the severange package using [TidyTuesday data](https://github.com/rfordatascience/tidytuesday/blob/master/data/2021/2021-02-23/readme.md) from the Bureau of Labor Statistics. The plot is based on one created by Amanda Luby from the [Swarthmore College Data Visualization Group](https://aluby.domains.swarthmore.edu/sdv/posts/2021-03-05-bls-earnings-data/).\n\n```{r plot-ref}\n#| ref.label = \"plot\",\n#| echo = FALSE,\n#| message = FALSE,\n#| dpi = 300,\n#| fig.alt = \"Three steamplots showing the gender disparity between races displayed in three different palettes from the severance package\"\n```\n\nThe code to reproduce the plot is below:\n\n```{r}\n#| label = \"plot\",\n#| eval = FALSE\nlibrary(severance)\nlibrary(ggplot2)\nlibrary(cowplot)\nlibrary(dplyr)\nlibrary(tidyr)\n\nearn \u003c-\n  readr::read_csv(\n    'https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-02-23/earn.csv'\n  )\n\nearn_clean \u003c- earn %\u003e%\n  mutate(median_yearly = median_weekly_earn * 52) %\u003e%\n  filter(race != \"All Races\",\n         sex != \"Both Sexes\") %\u003e%\n  group_by(race, sex, year, quarter) %\u003e%\n  summarize(median_salary = median(median_yearly)) %\u003e%\n  pivot_wider(\n    id_cols = c(\"race\", \"year\", \"quarter\"),\n    names_from = sex,\n    values_from = median_salary\n  ) %\u003e%\n  group_by(race) %\u003e%\n  mutate(\n    time = paste(year, quarter, sep = \"-Q\"),\n    men_dev = Men - (Men + Women) / 2,\n    women_dev = Women - (Men + Women) / 2,\n    race = factor(race, levels = c(\n      \"Asian\", \"White\", \"Black or African American\"\n    ))\n  )\n\np \u003c-\n  ggplot(earn_clean,\n         aes(\n           x = time,\n           ymin = women_dev,\n           ymax = men_dev,\n           fill = race,\n           group = race\n         )) +\n  geom_ribbon() +\n  theme_void() +\n  theme(legend.position = \"none\")\n\np1 \u003c- p + scale_fill_manual(values = severance_palette(\"Jazz02\"))\np2 \u003c- p + scale_fill_manual(values = severance_palette(\"TheYouYouAre\"))\np3 \u003c- p + scale_fill_manual(values = severance_palette(\"Hell\"))\n\ntitle \u003c- ggdraw() +\n  draw_label(\n    \"Original visualization by Amanda Luby, Swarthmore College\",\n    fontface = \"bold\",\n    x = 0,\n    hjust = 0\n  ) +\n  theme(plot.margin = margin(0, 0, 0, 7))\n\nprow \u003c- plot_grid(\n  p1,\n  p2,\n  p3,\n  align = 'h',\n  labels = c(\"Jazz02\", \"TheYouYouAre\", \"Hell\"),\n  hjust = 0,\n  nrow = 1\n)\n\ncaption \u003c- ggdraw() +\n  draw_label(\"Source: BLS Earnings Data\",\n             hjust = -0.3,\n             vjust = -0.5)\n\nplot_grid(title,\n          prow,\n          caption,\n          ncol = 1,\n          # rel_heights values control vertical title margins\n          rel_heights = c(0.3, 1))\n```\n\n## Palettes\n\n### Colorblind-friendly\n\n---\n\n#### Dinner\n\u003cimg src=\"man/figures/dinner_cbf.jpg\" alt=\"A scene from Severance where Helly and Dylan are standing in a room\"\u003e\n\n#### Hell\n\u003cimg src=\"man/figures/hell_cbf.jpg\" alt=\"A scene from Severance where Helly is sitting on the floor\"\u003e\n\n#### Jazz02\n\u003cimg src=\"man/figures/jazz02_cbf.jpg\" alt=\"A scene from Severance where the four main characters are staring at something\"\u003e\n\n#### TheYouYouAre\n\u003cimg src=\"man/figures/theyouyouare_cbf.jpg\" alt=\"A scene from Severance where Helly sits in a chair\"\u003e\n\n### Not colorblind-friendly\n\n---\n#### Half\n\u003cimg src=\"man/figures/half_ncbf.jpg\" alt=\"A scene from Severance where a bunch of characters are talking at their desks\"\u003e\n\n#### HideAndSeek\n\u003cimg src=\"man/figures/hideandseek_ncbf.jpg\" alt=\"A scene from Severance where a bunch of characters look at Milchick\"\u003e\n\n#### Jazz01\n\u003cimg src=\"man/figures/jazz01_ncbf.jpg\" alt=\"A scene from Severance where Helly and Milchick dance\"\u003e\n\n## Notes\n\nThank you to the package developers of [MetBrewer package](https://github.com/BlakeRMills/MetBrewer), Blake R. Mills, and the [wesanderson package](https://github.com/karthik/wesanderson), Karthik Ram, for sharing their code.\n\nThank you to Amanda Luby from the [Swarthmore College Data Visualization Group](https://aluby.domains.swarthmore.edu/sdv/posts/2021-03-05-bls-earnings-data/) for sharing her data visualization.\n\nColorblind-friendliness was checked using the [Adobe Color Accessibility Wheel](https://color.adobe.com/create/color-accessibility).\n\nPlease reach out with any questions/comments/suggestions! If you have a palette to contribute, please file a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivelasq%2Fseverance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivelasq%2Fseverance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivelasq%2Fseverance/lists"}