{"id":13711142,"url":"https://github.com/R-CoderDotCom/ggcats","last_synced_at":"2025-05-06T20:32:00.899Z","repository":{"id":208260702,"uuid":"333050510","full_name":"R-CoderDotCom/ggcats","owner":"R-CoderDotCom","description":"The geom you always wished for adding cats to ggplot2","archived":false,"fork":false,"pushed_at":"2021-07-15T16:42:35.000Z","size":1440,"stargazers_count":85,"open_issues_count":2,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-08-03T23:23:19.188Z","etag":null,"topics":["ggplot-extension","ggplot2","rstats","rstats-package"],"latest_commit_sha":null,"homepage":"https://r-charts.com/miscellaneous/ggcats/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/R-CoderDotCom.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,"governance":null}},"created_at":"2021-01-26T10:34:43.000Z","updated_at":"2024-03-19T10:58:15.000Z","dependencies_parsed_at":"2023-11-20T16:29:44.351Z","dependency_job_id":"6e100f22-8045-4e60-a322-e93b72b5f821","html_url":"https://github.com/R-CoderDotCom/ggcats","commit_stats":null,"previous_names":["r-coderdotcom/ggcats"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-CoderDotCom%2Fggcats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-CoderDotCom%2Fggcats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-CoderDotCom%2Fggcats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/R-CoderDotCom%2Fggcats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/R-CoderDotCom","download_url":"https://codeload.github.com/R-CoderDotCom/ggcats/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224528340,"owners_count":17326347,"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":["ggplot-extension","ggplot2","rstats","rstats-package"],"created_at":"2024-08-02T23:01:04.965Z","updated_at":"2024-11-13T21:31:32.212Z","avatar_url":"https://github.com/R-CoderDotCom.png","language":"R","funding_links":[],"categories":["Plot layers"],"sub_categories":[],"readme":"# ggcats\nThe geom you always wished for adding cats to ggplot2. This package is part of the memeverse.\nThe source code of this package is based on geom_image from ggimage.\n\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://user-images.githubusercontent.com/67192157/105871532-b0a48700-5ff9-11eb-9371-ecd915ded374.png\"\u003e\n\u003c/p\u003e\n\n\n\n+ Follow me on [Twitter](https://twitter.com/RCoderWeb)\n+ Follow me on [Facebook](https://www.facebook.com/RCODERweb)\n+ Visit my [R programming site](https://r-coder.com/)\n\n## What is the memeverse?\n\nA collection of funny packages which can be interesting to create plots to show on a first lesson to new R students in order to motivate them learning the language. The other package of the (small) memeverse are [ggdogs](https://github.com/R-CoderDotCom/ggdogs) and [ggbernie](https://github.com/R-CoderDotCom/ggbernie). Statistics and programming can be fun!\n\n## Installation\n```r\n# install.packages(\"remotes\")\nremotes::install_github(\"R-CoderDotCom/ggcats@main\")\n```\n\n\n## Available cats\n\nThere are 15 cats available:\n\n```r\n\"nyancat\" (default), \"bongo\", \"colonel\", \"grumpy\", \"hipster\", \"lil_bub\", \"maru\",\n\"mouth\", \"pop\", \"pop_close\", \"pusheen\", \"pusheen_pc\", \"toast\", \"venus\" and \"shironeko\"\n```\n\n## Some examples\n\n```r\ngrid \u003c- expand.grid(1:5, 3:1)\n\ndf \u003c- data.frame(x = grid[, 1],\n                 y = grid[, 2],\n                 image = c(\"nyancat\", \"bongo\", \"colonel\", \"grumpy\", \"hipster\",\n                           \"lil_bub\", \"maru\", \"mouth\", \"pop\", \"pop_close\", \n                           \"pusheen\", \"pusheen_pc\", \"toast\", \"venus\", \"shironeko\"))\n                           \nlibrary(ggplot2)\nggplot(df) +\n geom_cat(aes(x, y, cat = image), size = 5) +\n    xlim(c(0.25, 5.5)) + \n    ylim(c(0.25, 3.5))\n```\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://user-images.githubusercontent.com/67192157/106767679-6b0c3d80-663b-11eb-96f5-a21f2794bd84.png\"\u003e\n\u003c/p\u003e\n\n\n```r\nggplot(mtcars) +\n  geom_cat(aes(mpg, wt), cat = \"nyancat\", size = 5)\n```\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://user-images.githubusercontent.com/67192157/105848781-c86f1180-5fdf-11eb-8468-813a41235292.png\"\u003e\n\u003c/p\u003e\n\n\n```r\nggplot(mtcars) +\n  geom_cat(aes(mpg, wt, size = cyl), cat = \"toast\")\n```\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://user-images.githubusercontent.com/67192157/105849119-416e6900-5fe0-11eb-904e-6dc30be87546.png\"\u003e\n\u003c/p\u003e\n\n\nI took the most part of the following code from [Jonathan Hersh](https://twitter.com/DogmaticPrior).\n\n```r\nlibrary(Ecdat)\ndata(incomeInequality)\n\nlibrary(tidyverse)\nlibrary(ggcats)\nlibrary(gganimate)\n\n\n dat \u003c-\n   incomeInequality %\u003e%\n   select(Year, P99, median) %\u003e%\n   rename(income_median = median,\n          income_99percent = P99) %\u003e%\n   pivot_longer(cols = starts_with(\"income\"),\n                names_to = \"income\",\n                names_prefix = \"income_\")\n\ndat$cat \u003c- rep(NA, 132)\n\ndat$cat[which(dat$income == \"median\")] \u003c- \"nyancat\"\ndat$cat[which(dat$income == \"99percent\")] \u003c- rep(c(\"pop_close\", \"pop\"), 33)\n\nggplot(dat, aes(x = Year, y = value, group = income, color = income)) +\n   geom_line(size = 2) +\n   ggtitle(\"ggcats, a core package of the memeverse\") +\n   geom_cat(aes(cat = cat), size = 5) +\n   xlab(\"Cats\") +\n   ylab(\"Cats\") +\n   theme(legend.position = \"none\",\n         plot.title = element_text(size = 20),\n         axis.text = element_blank(),\n         axis.ticks = element_blank()) +\n   transition_reveal(Year)\n```\n\n\u003cp align=\"center\"\u003e\n \u003cimg src=\"https://user-images.githubusercontent.com/67192157/105854010-9ad99680-5fe6-11eb-9ee0-c42e9e257d48.gif\"\u003e\n\u003c/p\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FR-CoderDotCom%2Fggcats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FR-CoderDotCom%2Fggcats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FR-CoderDotCom%2Fggcats/lists"}