{"id":13712686,"url":"https://github.com/ricardo-bion/ggtech","last_synced_at":"2025-05-06T22:31:30.055Z","repository":{"id":29782387,"uuid":"33326478","full_name":"ricardo-bion/ggtech","owner":"ricardo-bion","description":"ggplot2 tech themes, scales, and geoms","archived":false,"fork":false,"pushed_at":"2019-08-07T03:43:31.000Z","size":30652,"stargazers_count":391,"open_issues_count":2,"forks_count":62,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-11-13T23:32:26.807Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://twitter.com/ricardobion","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/ricardo-bion.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}},"created_at":"2015-04-02T19:00:39.000Z","updated_at":"2024-11-05T13:18:07.000Z","dependencies_parsed_at":"2022-08-09T01:00:04.385Z","dependency_job_id":null,"html_url":"https://github.com/ricardo-bion/ggtech","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/ricardo-bion%2Fggtech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardo-bion%2Fggtech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardo-bion%2Fggtech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardo-bion%2Fggtech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricardo-bion","download_url":"https://codeload.github.com/ricardo-bion/ggtech/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779066,"owners_count":21802875,"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:21.391Z","updated_at":"2025-05-06T22:31:25.017Z","avatar_url":"https://github.com/ricardo-bion.png","language":"R","funding_links":[],"categories":["Themes and aesthetics","R","Graphic Displays","ggplot"],"sub_categories":["Themes"],"readme":"---\ntitle: \"ggplot2 tech themes, scales, and geoms\"\noutput:\n  html_document:\n    fig_height: 5\n    fig_width: 10\n    keep_md: yes\n---\n\n\n```{r setup, include=FALSE}\n\nknitr::opts_chunk$set(dpi=500)\noptions(warn=-1)\nlibrary(ggplot2)\n\n```\n\n### Install ggtech:\n\n```{r, eval=FALSE}\n\n\ndevtools::install_github(\"ricardo-bion/ggtech\", \n                          dependencies=TRUE)\n\n```\n\n### Use ggtech:\n\nMake sure to install the required fonts (instructions at the end of this file).\n\n```{r}\n\nlibrary(ggtech)\n\nd \u003c- qplot(carat, data = diamonds[diamonds$color %in%LETTERS[4:7], ], geom = \"histogram\", bins=30, fill = color)\n\n\n```\n\n\nTech themes and scales:\n\n```{r}\n\nd + theme_tech(theme=\"airbnb\") + \n  scale_fill_tech(theme=\"airbnb\") + \n  labs(title=\"Airbnb theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n```{r}\n\nd + theme_airbnb_fancy() + \n  scale_fill_tech(theme=\"airbnb\")  + \n  labs(title=\"Airbnb theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n\n```{r}\n\nd + theme_tech(theme=\"etsy\") + \n  scale_fill_tech(theme=\"etsy\") + \n  labs(title=\"Etsy theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n\n```{r}\n\nd + theme_tech(theme=\"facebook\") +\n  scale_fill_tech(theme=\"facebook\") + \n  labs(title=\"Facebook theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n```{r}\n\nd + theme_tech(theme=\"google\") + \n  scale_fill_tech(theme=\"google\") + \n  labs(title=\"Google theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n```{r}\n\nd + theme_tech(theme=\"twitter\") + \n  scale_fill_tech(theme=\"twitter\") + \n  labs(title=\"Twitter theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n```{r}\n\nd + theme_tech(theme=\"X23andme\") + \n  scale_fill_tech(theme=\"X23andme\") + \n  labs(title=\"23andme theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\nTech color scales:\n\n```{r}\n\ndata(\"iris\")\n\nd1 \u003c- qplot(x  = Sepal.Length, y =Sepal.Width,colour = Species,data = iris,geom = \"point\")\n\n```\n\n```{r}\n\nd1 + theme_tech(theme=\"airbnb\") + \n  scale_color_tech(theme=\"airbnb\") + \n  labs(title=\"Airbnb theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n```{r}\n\nd1 + theme_airbnb_fancy() + \n  scale_color_tech(theme=\"airbnb\")  + \n  labs(title=\"Airbnb theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n\n```{r}\n\nd1 + theme_tech(theme=\"etsy\") + \n  scale_color_tech(theme=\"etsy\") + \n  labs(title=\"Etsy theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n\n```{r}\n\nd1 + theme_tech(theme=\"facebook\") +\n  scale_color_tech(theme=\"facebook\") + \n  labs(title=\"Facebook theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n```{r}\n\nd1 + theme_tech(theme=\"google\") + \n  scale_color_tech(theme=\"google\") + \n  labs(title=\"Google theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n```{r}\n\nd1 + theme_tech(theme=\"twitter\") + \n  scale_color_tech(theme=\"twitter\") + \n  labs(title=\"Twitter theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n```{r}\n\nd1 + theme_tech(theme=\"X23andme\") + \n  scale_color_tech(theme=\"X23andme\") + \n  labs(title=\"23andme theme\", \n       subtitle=\"now with subtitles for ggplot2 \u003e= 2.1.0\")\n\n```\n\n\n\n\nTech geoms, inspired by [emoGG](https://github.com/dill/emoGG).\n\n\n```{r}\nd2 \u003c- data.frame(x = c(1:4, 3:1), y=1:7)\n```\n\n\n```{r}\nggplot(aes(x,y), data=d2) + \n  geom_tech(size=0.25, theme=\"airbnb\") + \n  theme_tech(\"airbnb\") +\n  ggtitle(\"Airbnb geom\")\n```\n\n\n```{r}\nggplot(aes(x,y), data=d2) + \n  geom_tech(size=0.15, theme=\"etsy\") + \n  theme_tech(\"etsy\")+\n  ggtitle(\"Etsy geom\")\n```\n\n```{r}\nggplot(aes(x,y), data=d2) + \n  geom_tech(size=0.15, theme=\"facebook\") + \n  theme_tech(\"facebook\")+\n  ggtitle(\"Facebook geom\")\n```\n\n\n```{r}\nggplot(aes(x,y), data=d2) + \n  geom_tech(size=0.25, theme=\"google\") + \n  theme_tech(\"google\" ) +\n  ggtitle(\"Google geom\")\n```\n\n\n```{r}\nggplot(aes(x,y), data=d2) + \n  geom_tech(size=0.15, theme=\"twitter\") + \n  theme_tech(\"twitter\") +\n  ggtitle(\"Twitter geom\")\n```\n\n```{r}\nggplot(aes(x,y), data=d2) + \n  geom_tech(size=0.15, theme=\"X23andme\") + \n  theme_tech(\"X23andme\") +\n  ggtitle(\"23andme geom\")\n```\n\n### Install fonts:\n\nYou have to install the necessary fonts manually before using `ggtech`. Mofidy the `destfile` if you are using Windows or Unix.\n\n\n```{r, eval=FALSE}\n\nlibrary(extrafont)\n\n## Facebook \ndownload.file(\"http://social-fonts.com/assets/fonts/facebook-letter-faces/facebook-letter-faces.ttf\", \"/Library/Fonts/facebook-letter-faces.ttf\", method=\"curl\")\n\nfont_import(pattern = 'facebook-letter-faces.ttf', prompt=FALSE)\n\n\n## Google \ndownload.file(\"http://social-fonts.com/assets/fonts/product-sans/product-sans.ttf\", \"/Library/Fonts/product-sans.ttf\", method=\"curl\")\n\nfont_import(pattern = 'product-sans.ttf', prompt=FALSE)\n\n\n## Airbnb \ndownload.file(\"https://dl.dropboxusercontent.com/u/2364714/airbnb_ttf_fonts/Circular%20Air-Medium%203.46.45%20PM.ttf\", \"/Library/Fonts/Circular Air-Medium 3.46.45 PM.ttf\", method=\"curl\")\n\ndownload.file(\"https://dl.dropboxusercontent.com/u/2364714/airbnb_ttf_fonts/Circular%20Air-Bold%203.46.45%20PM.ttf\", \"/Library/Fonts/Circular Air-Bold 3.46.45 PM.ttf\", method=\"curl\")\n\nfont_import(pattern = 'Circular', prompt=FALSE)\n\n\n## Etsy \ndownload.file(\"https://www.etsy.com/assets/type/Guardian-EgypTT-Text-Regular.ttf\", \"/Library/Fonts/Guardian-EgypTT-Text-Regular.ttf\", method=\"curl\")\n\nfont_import(pattern = 'Guardian-EgypTT-Text-Regular.ttf', prompt=FALSE)\n\n\n## Twitter \ndownload.file(\"http://social-fonts.com/assets/fonts/pico-black/pico-black.ttf\", \"/Library/Fonts/pico-black.ttf\", method=\"curl\")\n\ndownload.file(\"http://social-fonts.com/assets/fonts/arista-light/arista-light.ttf\", \"/Library/Fonts/arista-light.ttf\", method=\"curl\")\n\nfont_import(pattern = 'pico-black.ttf', prompt=FALSE)\nfont_import(pattern = 'arista-light.ttf', prompt=FALSE)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardo-bion%2Fggtech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricardo-bion%2Fggtech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardo-bion%2Fggtech/lists"}