Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dill/emoGG
:chart_with_upwards_trend::heart_eyes_cat: Emoji in ggplot2 :heart_eyes_cat::chart_with_upwards_trend:
https://github.com/dill/emoGG
Last synced: 20 days ago
JSON representation
:chart_with_upwards_trend::heart_eyes_cat: Emoji in ggplot2 :heart_eyes_cat::chart_with_upwards_trend:
- Host: GitHub
- URL: https://github.com/dill/emoGG
- Owner: dill
- License: mit
- Created: 2015-11-27T04:30:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T00:09:18.000Z (almost 2 years ago)
- Last Synced: 2024-08-06T03:04:27.133Z (4 months ago)
- Language: R
- Homepage:
- Size: 4 MB
- Stars: 210
- Watchers: 16
- Forks: 23
- Open Issues: 8
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - dill/emoGG - :chart_with_upwards_trend::heart_eyes_cat: Emoji in ggplot2 :heart_eyes_cat::chart_with_upwards_trend: (R)
README
---
---```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "figure/",
fig.height = 1
)
```# emoGG(plot)
Use emoji in your `ggplot2` plots.
This is silly.
## Installation
```r
devtools::install_github("dill/emoGG")
```## Usage
```{r, load-package}
library(ggplot2)
library(emoGG)
```First need to find an emoji, using the `emoji_search` function. First look for a tulip:
```{r find-tulip}
emoji_search("tulip")
```The `iris` example with **real** irises (well, tulips...)
```{r iris_ex, fig.height=4, fig.width=4}
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
geom_emoji(emoji="1f337")
```What about plotting `mtcars` with **real** cars?
```{r mtcars, fig.height=4, fig.width=4}
ggplot(mtcars, aes(wt, mpg))+ geom_emoji(emoji="1f697")
```Want to map `emoji` as an aesethetic? [Check out this gist](https://gist.github.com/dill/28bb04fc35b51326f01b23d078f5021e)!
Some random cats?
```{r, catplotlib, fig.height=4, fig.width=4}
posx <- runif(50, 0, 10)
posy <- runif(50, 0, 10)
ggplot(data.frame(x = posx, y = posy), aes(x, y)) + geom_emoji(emoji="1f63b")
```We can also just put a big emoji in the background:
```{r big-emoji, fig.height=4, fig.width=4}
qplot(x=Sepal.Length, y=Sepal.Width, data=iris, geom="point") + add_emoji(emoji="1f337")
```## Acknowledgements
Emoji lookup is from @muan's [`emojilib`](https://github.com/muan/emojilib).
Emoji are loaded from a CDN using Twitter's [`twemoji`](https://github.com/twitter/twemoji), which is [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/) licensed. You can get attribution details [on the project page](https://github.com/twitter/twemoji#attribution-requirements).
With apologies, DLM.