Skip to content

Commit

Permalink
Try to fix unfound symbol warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jrnold committed Feb 9, 2024
1 parent 833afd3 commit 0306e2a
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions data-raw/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ suppressPackageStartupMessages({
library("purrr")
library("tibble")
library("rlang")
library("here")
library("yaml")
library("xml2")
})
Expand Down Expand Up @@ -75,7 +74,7 @@ load_manyeyes <- function() {
ggthemes_data$manyeyes <- load_manyeyes()

load_fivethirtyeight <- function() {
yaml.load_file(here("data-raw", "theme-data", "fivethirtyeight.yml")) %>%
yaml.load_file(here::here("data-raw", "theme-data", "fivethirtyeight.yml")) %>%
map_dfr(as_tibble)
}
ggthemes_data$fivethirtyeight <- load_fivethirtyeight()
Expand All @@ -90,13 +89,13 @@ tableau_palette <- function(x) {
}

tableau_classic <- function() {
read_xml(here("data-raw", "theme-data", "tableau-classic.xml")) %>%
read_xml(here::here("data-raw", "theme-data", "tableau-classic.xml")) %>%
xml_children() %>%
map(tableau_palette)
}

load_tableau <- function() {
tableau <- yaml.load_file(here("data-raw", "theme-data", "tableau.yml"))
tableau <- yaml.load_file(here::here("data-raw", "theme-data", "tableau.yml"))
tableau[["color-palettes"]] <- map(
tableau[["color-palettes"]],
function(x) {
Expand Down Expand Up @@ -136,7 +135,7 @@ best_colors <- function(colors, accent, n = 1) {
}

load_solarized <- function(x) {
out <- yaml.load_file(here("data-raw", "theme-data", "solarized.yml"))
out <- yaml.load_file(here::here("data-raw", "theme-data", "solarized.yml"))
out$Accents <- map_dfr(out[["Accents"]], as_tibble)
out$Base <- map_dfr(out[["Base"]], as_tibble)
colors <- deframe(out[["Accents"]])
Expand All @@ -151,33 +150,33 @@ load_solarized <- function(x) {
ggthemes_data$solarized <- load_solarized()

load_excel <- function() {
out <- yaml.load_file(here("data-raw", "theme-data", "excel.yml"))
out <- yaml.load_file(here::here("data-raw", "theme-data", "excel.yml"))
out$shapes <- map_dfr(out$shapes, as_tibble) %>%
mutate(pch = utf_8_to_pch(character))
out$themes <-
yaml.load_file(here("data-raw", "theme-data", "excel-themes.yml"))
yaml.load_file(here::here("data-raw", "theme-data", "excel-themes.yml"))
out
}
ggthemes_data$excel <- load_excel()

load_calc <- function() {
out <- yaml.load_file(here("data-raw", "theme-data", "libreoffice.yml")) %>%
out <- yaml.load_file(here::here("data-raw", "theme-data", "libreoffice.yml")) %>%
map(~ map_dfr(., as_tibble))
out$shapes <- mutate(out$shapes, pch = utf_8_to_pch(character))
out
}
ggthemes_data$calc <- load_calc()

load_gdocs <- function() {
out <- yaml.load_file(here("data-raw", "theme-data", "gdocs.yml")) %>%
out <- yaml.load_file(here::here("data-raw", "theme-data", "gdocs.yml")) %>%
map(~ map_dfr(., as_tibble))
out$shapes <- mutate(out$shapes, pch = utf_8_to_pch(character))
out
}
ggthemes_data$gdocs <- load_gdocs()

load_shapes <- function() {
out <- yaml.load_file(here("data-raw", "theme-data", "shapes.yml"))
out <- yaml.load_file(here::here("data-raw", "theme-data", "shapes.yml"))
out$cleveland$default <- mutate(map_dfr(out$cleveland$default, as_tibble),
pch = utf_8_to_pch(character)
)
Expand All @@ -191,7 +190,7 @@ ggthemes_data$shapes <- load_shapes()


load_hc <- function() {
yaml.load_file(here("data-raw", "theme-data", "hc.yml"))
yaml.load_file(here::here("data-raw", "theme-data", "hc.yml"))
}
ggthemes_data$hc <- load_hc()

Expand Down

0 comments on commit 0306e2a

Please sign in to comment.