knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Well...
Imagine that...
You are about to have your house built. Where do you start? By creating the plans, right?
Well, it's the same with a {ggplot2}
graph. Start by building the plans of your data visualization: its organization, its colours, etc. In a familiar click-button environment (you will seen, Figma will do the job very well).
Like an architect who guides you in extracting the ideas you have in mind for the structure of your house and in transforming them into technical concepts, {architekter}
will build for you the basis of your theme()
function, by extracting the {ggplot2}
elements from your Figma model. You can then modify your theme()
function directly in R. But {architekter}
greatly prefers this work, especially if you are not yet very familiar with the construction of {ggplot2}
themes.
"architekter" means "architect" in Breton, a regional language spoken in France. And that Brittany is one of the most beautiful places in the world.
Figma is a the collaborative interface design tool.
Figma is free.
More information here: https://www.figma.com/design/
knitr::include_graphics("man/figures/logo_figma.svg")
You can install the development version of {architekter} from GitHub with:
# install.packages("devtools") devtools::install_github("ThinkR-open/architekter")
Create a Figma account (https://www.figma.com)
Duplicate the following Figma file: https://www.figma.com/community/file/1089210046480653802 You we get a copy on your Figma account, and you will be able to modify your version to create your own {ggplot2} maquettes in Figma
knitr::include_graphics("man/figures/figma_thumb.png")
Create a personal access token on your Figma account (https://www.figma.com/developers/api Section Access tokens)
Create an environment variable with your Figma Token:
Sys.setenv(FIGMA_TOKEN = "your-token-here")
Restart your R session
Load {architekter}
library(architekter)
get_figma_file_content(file_key = "your-file-key", acess_token = Sys.getenv("FIGMA_TOKEN")) %>% extract_ggplot_theme()
get_figma_file_content(file_key = "wRqIvMmymzSPuj0sEhnORb", acess_token = Sys.getenv("FIGMA_TOKEN")) %>% extract_ggplot_theme()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.