{"id":17991406,"url":"https://github.com/nowosad/rcartocolor","last_synced_at":"2025-10-24T01:29:33.408Z","repository":{"id":56936902,"uuid":"107873616","full_name":"Nowosad/rcartocolor","owner":"Nowosad","description":"Implementation of the CARTOcolor palettes in R ","archived":false,"fork":false,"pushed_at":"2024-10-10T11:08:22.000Z","size":3839,"stargazers_count":110,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T17:09:45.422Z","etag":null,"topics":["color-palette","ggplot2","package","r","visualization"],"latest_commit_sha":null,"homepage":"https://jakubnowosad.com/rcartocolor/","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/Nowosad.png","metadata":{"files":{"readme":"README.Rmd","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":"codemeta.json","zenodo":null}},"created_at":"2017-10-22T14:33:58.000Z","updated_at":"2025-03-22T08:14:16.000Z","dependencies_parsed_at":"2025-04-10T17:19:54.037Z","dependency_job_id":null,"html_url":"https://github.com/Nowosad/rcartocolor","commit_stats":{"total_commits":88,"total_committers":3,"mean_commits":"29.333333333333332","dds":0.03409090909090906,"last_synced_commit":"d8a990e4af883a06db66f1ff995f6e903cd57b1d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Frcartocolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Frcartocolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Frcartocolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nowosad%2Frcartocolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nowosad","download_url":"https://codeload.github.com/Nowosad/rcartocolor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248544089,"owners_count":21121889,"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","package","r","visualization"],"created_at":"2024-10-29T19:21:56.207Z","updated_at":"2025-10-24T01:29:33.403Z","avatar_url":"https://github.com/Nowosad.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, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  fig.height = 4\n)\n```\n\n# rcartocolor \u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"150\" alt=\"\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/Nowosad/rcartocolor/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Nowosad/rcartocolor/actions/workflows/R-CMD-check.yaml)\n[![codecov](https://codecov.io/gh/Nowosad/rcartocolor/branch/master/graph/badge.svg?token=tkiSWsEUYy)](https://app.codecov.io/gh/Nowosad/rcartocolor)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/rcartocolor)](https://cran.r-project.org/package=rcartocolor)\n[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/rcartocolor)](https://cran.r-project.org/package=rcartocolor)\n\u003c!-- badges: end --\u003e\n\nThe goal of `rcartocolor` is to provide color schemes for maps and other graphics designed by [CARTO](https://carto.com/) as described at https://carto.com/carto-colors/.\n\n## Installation\n\nGet the released version from CRAN:\n\n```{r cran-installation, eval = FALSE}\ninstall.packages(\"rcartocolor\")\n```\n\nGet the development version from github:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"remotes\")\nremotes::install_github(\"Nowosad/rcartocolor\")\n```\n\n## Examples\n\nDisplay a CARTOcolor palette:\n\n```{r example}\nlibrary(rcartocolor)\ndisplay_carto_pal(7, \"Vivid\")\n```\n\nCreate a CARTOcolor palette:\n\n```{r example2}\nmy_colors = carto_pal(7, \"Burg\")\nmy_colors\n```\n\nDisplay all of the CARTOcolor palettes:\n\n```{r example3, fig.height=7, fig.width=6}\ndisplay_carto_all()\n```\n\n[Only display colorblind friendly palettes](https://jakubnowosad.com/colorblindcheck/articles/check_rcartocolor.html):\n\n```{r example4, fig.height=6, fig.width=6}\ndisplay_carto_all(colorblind_friendly = TRUE)\n```\n\n### **ggplot2**\n\nThe **rcartocolor** package contains four **ggplot2** color scales: two for continuous data - `scale_fill_carto_c`, `scale_color_carto_c` and two for discrete data - `scale_fill_carto_d`, `scale_color_carto_d`:\n\n```{r examplegg1}\n# devtools::install_github(\"tidyverse/ggplot2\")\nlibrary(sf)\nlibrary(spData)\nlibrary(ggplot2)\nggplot(world, aes(fill = lifeExp)) +\n        geom_sf(data = world) +\n        coord_sf(crs = \"+proj=robin\") +\n        scale_fill_carto_c(name = \"Life expectancy: \",\n                           type = \"diverging\", palette = \"Earth\", direction = -1) +\n        theme_void()\n```\n\n\n```{r examplegg2}\nggplot(world, aes(fill = region_un)) +\n        geom_sf(data = world) +\n        coord_sf(crs = \"+proj=robin\")  +\n        scale_fill_carto_d(name = \"Region: \", palette = \"Safe\") +\n        theme_void()\n```\n\n## Contributions\n\n[Feel free to submit issues and enhancement requests.](https://github.com/Nowosad/rcartocolor/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowosad%2Frcartocolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnowosad%2Frcartocolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnowosad%2Frcartocolor/lists"}