diff --git a/README.md b/README.md index 4d4d0af..935e034 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Flowmap.blue R widget +# Flowmap.blue R widget flowmapblue website diff --git a/README.qmd b/README.qmd index 7e1dd3c..df1e493 100644 --- a/README.qmd +++ b/README.qmd @@ -7,7 +7,7 @@ eval: false default-image-extension: "" --- -# Flowmap.blue R widget +# Flowmap.blue R widget flowmapblue website [![CRAN status](https://www.r-pkg.org/badges/version/flowmapblue)](https://CRAN.R-project.org/package=flowmapblue){target="_blank"} diff --git a/man/figures/logo.png b/man/figures/logo.png new file mode 100644 index 0000000..530e228 Binary files /dev/null and b/man/figures/logo.png differ diff --git a/man/figures/logo.svg b/man/figures/logo.svg new file mode 100644 index 0000000..0666945 --- /dev/null +++ b/man/figures/logo.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{flowmapblue} +github.com/FlowmapBlue/flowmapblue.R + + + + diff --git a/man/figures/logo_raw.svg b/man/figures/logo_raw.svg new file mode 100644 index 0000000..702c8d3 --- /dev/null +++ b/man/figures/logo_raw.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Layer 1 + + + + + + \ No newline at end of file diff --git a/tools/generate_package_logo.R b/tools/generate_package_logo.R new file mode 100644 index 0000000..56e00db --- /dev/null +++ b/tools/generate_package_logo.R @@ -0,0 +1,38 @@ +# Install required packages if not already installed +if (!requireNamespace("hexSticker", quietly = TRUE)) install.packages("hexSticker") +if (!requireNamespace("magick", quietly = TRUE)) install.packages("magick") + +library(hexSticker) +library(magick) + + +# Save the SVG to a temporary file +raw_svg <- "man/figures/logo_raw.svg" + + +# Create the hex sticker function +create_sticker <- function(file_name) { + sticker(raw_svg, + package = "{flowmapblue}", + p_size = 5.5, + p_y = 1.5, + p_color = "#1A70A7", + p_family = "sans", + s_x = 1, + s_y = 0.86, + s_width = 0.5, + s_height = 0.5, + h_fill = "white", + h_color = "#1A70A7", + url = "github.com/FlowmapBlue/flowmapblue.R", + u_color = "#1A70A7", + u_family = "sans", + u_size = 1.3, + filename = file_name, + dpi = 300 + ) + +} + +create_sticker("man/figures/logo.png") +create_sticker("man/figures/logo.svg")