{"id":13712614,"url":"https://malcolmbarrett.github.io/ggokabeito/","last_synced_at":"2025-05-06T22:31:22.676Z","repository":{"id":44548927,"uuid":"417564868","full_name":"malcolmbarrett/ggokabeito","owner":"malcolmbarrett","description":"Colorblind-friendly, qualitative Okabe-Ito Scales for ggplot2 and ggraph","archived":false,"fork":false,"pushed_at":"2023-06-08T15:33:39.000Z","size":3152,"stargazers_count":51,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T13:49:23.570Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://malcolmbarrett.github.io/ggokabeito","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/malcolmbarrett.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-10-15T16:21:40.000Z","updated_at":"2025-05-01T20:43:47.000Z","dependencies_parsed_at":"2024-03-05T09:00:22.762Z","dependency_job_id":null,"html_url":"https://github.com/malcolmbarrett/ggokabeito","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"e28e8b7a0a3301ac40722fb07ed082bde424bb8f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcolmbarrett%2Fggokabeito","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcolmbarrett%2Fggokabeito/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcolmbarrett%2Fggokabeito/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcolmbarrett%2Fggokabeito/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malcolmbarrett","download_url":"https://codeload.github.com/malcolmbarrett/ggokabeito/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779049,"owners_count":21802869,"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-08-02T23:01:20.416Z","updated_at":"2025-05-06T22:31:20.795Z","avatar_url":"https://github.com/malcolmbarrett.png","language":"R","funding_links":[],"categories":["Themes and aesthetics"],"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 = \"80%\",\n  dpi = 320, \n  out.width = \"80%\",\n  fig.width = 6,\n  fig.asp = 0.618,\n  fig.retina = 2,\n  fig.align = \"center\"\n)\n```\n\n# ggokabeito\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/malcolmbarrett/ggokabeito/workflows/R-CMD-check/badge.svg)](https://github.com/malcolmbarrett/ggokabeito/actions)\n[![Codecov test coverage](https://codecov.io/gh/malcolmbarrett/ggokabeito/branch/main/graph/badge.svg)](https://app.codecov.io/gh/malcolmbarrett/ggokabeito?branch=main)\n[![CRAN status](https://www.r-pkg.org/badges/version/ggokabeito)](https://CRAN.R-project.org/package=ggokabeito)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n\u003c!-- badges: end --\u003e\n\nggokabeito provides ggplot2 and ggraph scales to easily use the discrete, colorblind-friendly 'Okabe-Ito' palette in your data visualizations. Currently, ggokabeito provides the following scales:\n\n* `scale_color_okabe_ito()`/`scale_colour_okabe_ito()`\n* `scale_fill_okabe_ito()`\n* `scale_edge_color_okabe_ito()`/`scale_edge_colour_okabe_ito()`\n\n## Installation\n\nYou can install ggokabeito from CRAN with:\n\n``` r\ninstall.packages(\"ggokabeito\")\n```\n\nYou can alternatively install the development version of ggokabeito from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"malcolmbarrett/ggokabeito\")\n```\n\n## Examples\n\n```{r}\nlibrary(ggokabeito)\nlibrary(ggplot2)\n\nggplot(mpg, aes(cty, hwy, color = class)) +\n  geom_point() +\n  scale_color_okabe_ito()\n\nggplot(mpg, aes(cty, hwy, color = factor(cyl))) +\n  geom_point(alpha = 0.7) +\n  scale_color_okabe_ito(name = \"Cylinders\", alpha = .9)\n\nggplot(mpg, aes(hwy, color = class, fill = class)) +\n  geom_density() +\n  scale_fill_okabe_ito(name = \"Class\", alpha = .9) +\n  scale_color_okabe_ito(name = \"Class\")\n```\n\nggokabeito also works with ggraph\n\n```{r}\n# example from https://www.data-imaginist.com/2017/ggraph-introduction-edges/\nlibrary(ggraph, warn.conflicts = FALSE)\nlibrary(igraph, warn.conflicts = FALSE)\n\ngraph \u003c- graph_from_data_frame(highschool)\npop1957 \u003c- degree(\n  delete_edges(graph, which(E(graph)$year == 1957)),\n  mode = \"in\"\n)\npop1958 \u003c- degree(\n  delete_edges(graph, which(E(graph)$year == 1958)),\n  mode = \"in\"\n)\nV(graph)$pop_devel \u003c- ifelse(\n  pop1957 \u003c pop1958,\n  \"increased\",\n  ifelse(pop1957 \u003e pop1958, \"decreased\",\n         \"unchanged\"\n  )\n)\n\nV(graph)$popularity \u003c- pmax(pop1957, pop1958)\nE(graph)$year \u003c- as.character(E(graph)$year)\n\nggraph(graph, layout = \"kk\") +\n  geom_edge_link(aes(colour = as.character(year))) +\n  scale_edge_color_okabe_ito()\n```\n\n\n\n## Similar work\n\nggokabeito is heavily inspired by the excellent [colorblindr](https://github.com/clauswilke/colorblindr) package. However, colorblindr  is not currently on CRAN and includes some complex features for analyzing colorblind safeness that are not necessary for using the Okabe-Ito palette. Additionally, colorblindr was developed prior to R 4.0.0, which set Okabe-Ito as the default discrete color palette. ggokabeito thus has fewer overall dependencies but a strong one on R 4.0.0 or greater.\n\n## Code of Conduct\n\nPlease note that the ggokabeito project is released with a [Contributor Code of Conduct](https://malcolmbarrett.github.io/ggokabeito/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/malcolmbarrett.github.io%2Fggokabeito%2F","html_url":"https://awesome.ecosyste.ms/projects/malcolmbarrett.github.io%2Fggokabeito%2F","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/malcolmbarrett.github.io%2Fggokabeito%2F/lists"}