Emoji Search Table ๐Ÿ˜

tutorial r markdown DT package

Quickly build a search table for emojis in R Markdown

Sam Parmar https://parmsam.github.io/
01-15-2021

If itโ€™s not clear already, I enjoy using emoji (plural) in my blog posts. I feel theyโ€™re underused on internet blogs and they can add some much needed flavor to otherwise boring text.

Hereโ€™s a search table I quickly threw together for myself using the DT package and the emo package, with some Tidyverse. Super necessary for texting. Code included below.

#devtools::install_github("hadley/emo")
library(tidyverse)
library(DT)
library(emo)

b <- emo::jis %>% 
  select(name, emoji, group, subgroup, keywords, aliases) %>%
  mutate(keywords = map(keywords, toString)) %>% 
  mutate(aliases = map(aliases, toString)) %>%
  mutate(keywords = str_replace_all(keywords, "_", " ")) %>% 
  mutate(aliases = str_replace_all(aliases,"_", " "))

b %>% 
  datatable(rownames = FALSE, extensions = 'Responsive',
            caption = htmltools::tags$caption(
              style = 'caption-side: top; text-align: center;', 
              htmltools::em('Table 1: Emoji Search Table')),
            options = list(
              searchHighlight = TRUE,
              columnDefs = list(list(className = 'dt-center', 
                                     targets = 0:5)),
              lengthMenu = c(5, 10, 15, 20)
              ))

Corrections

If you see mistakes or want to suggest changes, please create an issue on the source repository.

Citation

For attribution, please cite this work as

Parmar (2021, Jan. 15). Data Breadcrumbs: Emoji Search Table ๐Ÿ˜. Retrieved from https://databreadcrumbs.com/posts/2021-01-15-emoji-search/

BibTeX citation

@misc{parmar2021emoji,
  author = {Parmar, Sam},
  title = {Data Breadcrumbs: Emoji Search Table ๐Ÿ˜},
  url = {https://databreadcrumbs.com/posts/2021-01-15-emoji-search/},
  year = {2021}
}