{"id":13712644,"url":"https://github.com/katelyndiaz/ggRtsy","last_synced_at":"2025-05-06T22:31:21.937Z","repository":{"id":40466641,"uuid":"468423228","full_name":"katelyndiaz/ggRtsy","owner":"katelyndiaz","description":"For when your ggplot can use a bit more art; add some Van Gogh!","archived":false,"fork":false,"pushed_at":"2024-03-14T18:11:57.000Z","size":821,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-13T23:32:24.330Z","etag":null,"topics":["color-palette","ggplot2","r","visualization"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/katelyndiaz.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"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-03-10T16:26:12.000Z","updated_at":"2023-01-26T12:35:07.000Z","dependencies_parsed_at":"2024-11-13T23:30:40.947Z","dependency_job_id":"c000af9d-1078-4963-a615-a13e28043ae1","html_url":"https://github.com/katelyndiaz/ggRtsy","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/katelyndiaz%2FggRtsy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katelyndiaz%2FggRtsy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katelyndiaz%2FggRtsy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katelyndiaz%2FggRtsy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katelyndiaz","download_url":"https://codeload.github.com/katelyndiaz/ggRtsy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779052,"owners_count":21802870,"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","r","visualization"],"created_at":"2024-08-02T23:01:20.882Z","updated_at":"2025-05-06T22:31:21.282Z","avatar_url":"https://github.com/katelyndiaz.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)\n```\n\n# ggRtsy \u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"139\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/katelyndiaz/ggRtsy/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/katelyndiaz/ggRtsy/actions/workflows/R-CMD-check.yaml)\n[![R](https://github.com/katelyndiaz/ggRtsy/actions/workflows/r.yml/badge.svg)](https://github.com/katelyndiaz/ggRtsy/actions/workflows/r.yml)\n[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/ggRtsy)\n[![CRAN status](https://www.r-pkg.org/badges/version/ggRtsy)](https://CRAN.R-project.org/package=ggRtsy)\n\n\u003c!-- badges: end --\u003e\n\n### Overview\n\nThe 'ggRtsy' package works with 'ggplot2' to add an additional color palette to the user’s repertoire. This is the `goghColors` dataset, which contains the RGB and hex codes of colors picked from Van Gogh paintings. It has been broken down into an easy-to-use color palette based on Van Gogh's most famous paintings, in the `gogh_palettes_pop` list. \n\n#### Functions within the package:\n\nIt also has a function that work alongside ggplot to create more interesting data visualizations and add contextual information to the user’s plots. \n\n- RectangleFiller() - divides data visualizations into a specified number of colored quadrants based on the number of input colors, improving the readability of graphs. \n\n- scale_color_gogh() - used to color the point/lines of your ggplot\n\n- scale_fill_gogh() - used to fill the inner color/bars of your ggplot\n\n- rgbToHeX() - used to convert rgb color codes to hex color codes\n\n- gogh_interpolate() - interpolates between the colors in `gogh_palettes_pop`\n\n### Usage example\n\n```{r, include=FALSE}\n# Hidden chunk because it is setup for example\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(ggRtsy)\nlibrary(purrr)\n\nexampleData \u003c- starwars %\u003e%\n  filter(mass \u003c 1000)\nplotExample \u003c- ggplot(exampleData, aes(x = height, y = mass)) +\n  geom_point() +\n  scale_x_continuous()\n```\n\nUsing Hex Codes from the dataset `goghColors`, three colors were added on top of a ggplot() sample scatter plot. Based on the plot, the function automatically calculated three equal widths of the rectangles, and stretched them to upper and lower bounds on the y-axis. \n\n```{r ex1, warning=FALSE}\nRectangleFiller(plotExample, c(\"#e32636\", \"#9966cc\", \"#f4c2c2\"))\n```\n\n#### Continuous scale_color_gogh() example using the `cafeTerrace` color palette:\n\n```{r ex2, warning=FALSE, message=FALSE}\nggplot(exampleData, aes(x = height, y = mass, color = birth_year)) +\n  geom_point(size = 3) +\n  scale_color_gogh(palette = \"cafeTerrace\", discrete = FALSE, reverse = TRUE) +\n  theme_minimal()\n```\n\n#### Discrete scale_fill_gogh() example using the `almondBlossoms` color palette:\n\n```{r ex3, warning=FALSE, message=FALSE}\nggplot(storms, aes(x = category, fill = status)) +\n  geom_bar() +\n  scale_fill_gogh(palette = \"almondBlossoms\", discrete = TRUE, reverse = FALSE) +\n  theme_minimal()\n```\n\nThis package also comes with rgbToHex(), converting rgb colors into hex code colors.\n\n```{r}\nrgbToHex(c(\"(225, 104, 39)\", \"(60, 90, 202)\"))\n```\n\n\n\n### Installation instructions\n\nGet the development version from GitHub:\n\n```{r, message=FALSE, eval=FALSE}\n# Install remotes if needed:\n# install.packages(\"remotes\")\nremotes::install_github(\"katelyndiaz/ggRtsy\")\n```\n\nAnd load it with\n\n```{r}\nlibrary(ggRtsy)\n```\n\n### Palettes\n\n`starryNight` = '#23338C', '#30478C', '#5377A6', '#BDBF7E', '#BFA72C'\n\n![](https://uploads4.wikiart.org/00142/images/vincent-van-gogh/the-starry-night.jpg!Large.jpg){width=400px}\n\n`sunflowers` = '#74A629', '#F2EB80', '#F2E085', '#BF9821', '#A6681C'\n\n![](https://uploads7.wikiart.org/images/vincent-van-gogh/still-life-vase-with-fifteen-sunflowers-1888-1.jpg!Large.jpg){width=400px}\n\n\n`selfPortrait` = '#021F59', '#63A5BF', '#8C701C', '#BF9B6F', '#730202' \n\n![](https://uploads8.wikiart.org/images/vincent-van-gogh/self-portrait-1889-1.jpg!Large.jpg){width=400px}\n\n\n`wheatField` = '#73A9D9', '#477332', '#D9B13B', '#D98E32', '#A66329'\n\n![](https://uploads4.wikiart.org/images/vincent-van-gogh/wheat-field-with-cypresses-at-the-haude-galline-near-eygalieres-1889-2.jpg!Large.jpg){width=400px}\n\n\n`cafeTerrace` = '#2A6BBF', '#3F6CA6', '#F2C84B', '#D99036', '#BF6734'\n\n![](https://uploads2.wikiart.org/images/vincent-van-gogh/cafe-terrace-place-du-forum-arles-1888(1).jpg!Large.jpg){width=400px}\n\n\n`rhoneStarry` = '#073359', '#27668C', '#5A98BF', '#60734D', '#A3A658'\n\n![](https://uploads0.wikiart.org/00175/images/vincent-van-gogh/starry-night-over-the-rhone.jpg!Large.jpg){width=400px}\n\n\n`irises` = '#415AA6', '#6382BF', '#65A67C', '#8CA653', '#A66D58' \n\n![](https://uploads0.wikiart.org/00213/images/vincent-van-gogh/antique-3840759.jpg!Large.jpg){width=400px}\n\n\n\n`almondBlossoms` = '#236E8C', '#20788C', '#49B3BF', '#41BFBF', '#BDBF75'\n\n![](https://uploads6.wikiart.org/images/vincent-van-gogh/branches-with-almond-blossom-1890(1).jpg!Large.jpg){width=400px}\n\n\n### See also\n\n* [tayloRswift package](https://github.com/asteves/tayloRswift)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatelyndiaz%2FggRtsy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatelyndiaz%2FggRtsy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatelyndiaz%2FggRtsy/lists"}