Skip to content
Merged

up #30

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Suggests:
ggplot2,
dplyr,
ragg,
fontawesome,
systemfonts,
knitr,
rmarkdown,
testthat (>= 3.0.0)
Expand Down
10 changes: 7 additions & 3 deletions vignettes/MultiFactor.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,19 @@ remotes::install_github("minotau-R/MultiFactor")
```{r 'setup-multifactor'}
library(MultiFactor)
library(ggplot2)
library(fontawesome)
library(systemfonts)
library(dplyr)

# Load demo data
set.seed(2612)
tp <- trade_posts()
```

```{r 'prep-plot', echo = FALSE}
require_font(
"Noto Color Emoji", repositories = "Google Fonts", verbose = FALSE
)
get_from_google_fonts("Noto Color Emoji")

e <- tapply(trade_posts(raw.data = TRUE), ~group, `[[<-`, "group", value = NULL)

.to_plot_df <- function(x, e) {
Expand Down Expand Up @@ -153,7 +157,7 @@ ggplot() +
rev(plot_dfs[-1]), function(x) list(
geom_tile(data = x, aes(fill = header), colour = "black", linewidth = 1/2),
geom_text(data = filter(x, header), aes(label = name), size = 4),
geom_text(data = filter(x, !header), aes(label = emoji), size = 5, family = "Noto Color Emoji")
geom_text(data = filter(x, !header), aes(label = emoji), size = 5)
)
) +
geom_tile( data = first_linkmap, aes(fill = header), colour = "black", linewidth = 1/2 ) +
Expand Down
Loading