Skip to content

Commit

Permalink
Merge pull request #37 from katilingban/dev
Browse files Browse the repository at this point in the history
update README
  • Loading branch information
ernestguevarra authored Mar 3, 2024
2 parents 9021e09 + b2f0678 commit 836053c
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 26 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ Imports:
withr
Suggests:
knitr,
rmarkdown
rmarkdown,
spelling
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
VignetteBuilder: knitr
URL: https://github.com/katilingban/motif,http://katilingban.io/motif/
Language: en-GB
7 changes: 4 additions & 3 deletions R/theme_acdc.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ set_acdc_font <- function(alt = motif_fonts$motif_noto) {
#' [Google Fonts](https://fonts.google.com/).
#'
#' @param base_family Base font family using Africa CDC fonts. Default is set
#' by what Africa CDC font is available in the sytem via `set_acdc_font()`. If
#' none of the Africa CDC fonts are available, the default becomes Noto Sans.
#' by what Africa CDC font is available in the system via `set_acdc_font()`.
#' If none of the Africa CDC fonts are available, the default becomes Noto
#' Sans.
#' @param plot_title_family Font family to use for the plot title. Default is
#' `base_family`.
#' @param plot_title_colour Colour of the plot title text. Default
Expand All @@ -172,7 +173,7 @@ set_acdc_font <- function(alt = motif_fonts$motif_noto) {
#' @param plot_background_fill Fill colour for the plot background. Default is
#' NULL.
#' @param grid_col Grid colour. Default to `acdc_gold`.
#' @param axis_col Axis colors. Default to `acdc_gold`.
#' @param axis_col Axis colours. Default to `acdc_gold`.
#' @param grid Panel grid. Either `TRUE`, `FALSE`, or a combination of
#' `X` (major x grid), `x` (minor x grid), `Y` (major y grid), and/or
#' `y` (minor y grid). Default is TRUE.
Expand Down
20 changes: 10 additions & 10 deletions R/theme_motif.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ set_motif_font <- function() {
#' [Google Fonts](https://fonts.google.com/).
#'
#' @param base_family Base font family using Africa CDC fonts. Default is set
#' by what Africa CDC font is available in the sytem via `set_motif_font()`.
#' by what Africa CDC font is available in the system via `set_motif_font()`.
#' @param base_size Base font size. Default is 11.5.
#' @param plot_title_family Font family to use for the plot title. Default is
#' `base_family`.
Expand Down Expand Up @@ -120,7 +120,7 @@ set_motif_font <- function() {
#' @param plot_background_fill Fill colour for the plot background. Default is
#' NULL.
#' @param grid_col Grid colour. Default to NULL.
#' @param axis_col Axis colors. Default to NULL.
#' @param axis_col Axis colours. Default to NULL.
#' @param grid Panel grid. Either `TRUE`, `FALSE`, or a combination of
#' `X` (major x grid), `x` (minor x grid), `Y` (major y grid), and/or
#' `y` (minor y grid). Default is TRUE.
Expand Down Expand Up @@ -195,17 +195,17 @@ theme_motif <- function(base_family = set_motif_font(),
if (inherits(grid, "character") | grid == TRUE) {
design <- design +
ggplot2::theme(
panel.grid = ggplot2::element_line(color = grid_col, size = 0.2)
panel.grid = ggplot2::element_line(colour = grid_col, size = 0.2)
)

design <- design +
ggplot2::theme(
panel.grid.major = ggplot2::element_line(color = grid_col, size = 0.2)
panel.grid.major = ggplot2::element_line(colour = grid_col, size = 0.2)
)

design <- design +
ggplot2::theme(
panel.grid.minor = ggplot2::element_line(color = grid_col, size = 0.05)
panel.grid.minor = ggplot2::element_line(colour = grid_col, size = 0.05)
)

if (inherits(grid, "character")) {
Expand Down Expand Up @@ -234,7 +234,7 @@ theme_motif <- function(base_family = set_motif_font(),
if (inherits(axis, "character") | axis == TRUE) {
design <- design +
ggplot2::theme(
axis.line = ggplot2::element_line(color = axis_col, size = 0.15)
axis.line = ggplot2::element_line(colour = axis_col, size = 0.15)
)

if (inherits(axis, "character")) {
Expand All @@ -246,7 +246,7 @@ theme_motif <- function(base_family = set_motif_font(),
} else {
design <- design +
ggplot2::theme(
axis.line.x = ggplot2::element_line(color = axis_col, size = 0.15)
axis.line.x = ggplot2::element_line(colour = axis_col, size = 0.15)
)
}

Expand All @@ -256,18 +256,18 @@ theme_motif <- function(base_family = set_motif_font(),
} else {
design <- design +
ggplot2::theme(
axis.line.y = ggplot2::element_line(color = axis_col, size = 0.15)
axis.line.y = ggplot2::element_line(colour = axis_col, size = 0.15)
)
}
} else {
design <- design +
ggplot2::theme(
axis.line.x = ggplot2::element_line(color = axis_col, size = 0.15)
axis.line.x = ggplot2::element_line(colour = axis_col, size = 0.15)
)

design <- design +
ggplot2::theme(
axis.line.y = ggplot2::element_line(color = axis_col, size = 0.15)
axis.line.y = ggplot2::element_line(colour = axis_col, size = 0.15)
)
}
} else {
Expand Down
5 changes: 3 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ library(ggplot2)
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/katilingban/motif/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/katilingban/motif/actions/workflows/R-CMD-check.yaml)
[![test-coverage](https://github.com/katilingban/motif/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/katilingban/motif/actions/workflows/test-coverage.yaml)
[![Codecov test coverage](https://codecov.io/gh/katilingban/motif/branch/main/graph/badge.svg)](https://app.codecov.io/gh/katilingban/motif?branch=main)
[![CodeFactor](https://www.codefactor.io/repository/github/katilingban/motif/badge)](https://www.codefactor.io/repository/github/katilingban/motif)
<!-- badges: end -->
Expand All @@ -29,7 +30,7 @@ A collection of palettes, themes, and theme components based on publicly availab

## What does `motif` do?

`motif` provides or will be providing utilities for applying the visual identity and/or branding guidlines of various non-governmental organisations, government agencies, and United Nations units.
`motif` provides or will be providing utilities for applying the visual identity and/or branding guidelines of various non-governmental organisations, government agencies, and United Nations units.

Currently, `motif` has colours, palettes, and `ggplot2` themes based on the following organisations' branding/visual identity guidelines:

Expand All @@ -39,7 +40,7 @@ Additional colours, palettes, and themes will be provided over time.

## Installation

`motif` is not yet available on [CRAN](https://cran.r-project.org) but can be installed through the [Katilingban R universe](https://katilingban.r-universe.dev) resository as follows:
`motif` is not yet available on [CRAN](https://cran.r-project.org) but can be installed through the [Katilingban R universe](https://katilingban.r-universe.dev) repository as follows:

```R
install.packages(
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostat
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/katilingban/motif/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/katilingban/motif/actions/workflows/R-CMD-check.yaml)
[![test-coverage](https://github.com/katilingban/motif/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/katilingban/motif/actions/workflows/test-coverage.yaml)
[![Codecov test
coverage](https://codecov.io/gh/katilingban/motif/branch/main/graph/badge.svg)](https://app.codecov.io/gh/katilingban/motif?branch=main)
[![CodeFactor](https://www.codefactor.io/repository/github/katilingban/motif/badge)](https://www.codefactor.io/repository/github/katilingban/motif)
Expand All @@ -23,7 +24,7 @@ government agencies, and United Nations units.
## What does `motif` do?

`motif` provides or will be providing utilities for applying the visual
identity and/or branding guidlines of various non-governmental
identity and/or branding guidelines of various non-governmental
organisations, government agencies, and United Nations units.

Currently, `motif` has colours, palettes, and `ggplot2` themes based on
Expand All @@ -38,7 +39,7 @@ Additional colours, palettes, and themes will be provided over time.

`motif` is not yet available on [CRAN](https://cran.r-project.org) but
can be installed through the [Katilingban R
universe](https://katilingban.r-universe.dev) resository as follows:
universe](https://katilingban.r-universe.dev) repository as follows:

``` r
install.packages(
Expand Down
24 changes: 24 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Acumin
CMD
Calibri
CodeFactor
Codecov
Katilingban
Lifecycle
Noto
Pantone
Roboto
Rudis
WIP
bl
cmyk
computing's
ernest
guevarra
heirarchical
hrbrthemes
io
organisations’
pantone
pts
rgb
7 changes: 4 additions & 3 deletions man/theme_acdc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/theme_motif.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tests/spelling.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(requireNamespace('spelling', quietly = TRUE))
spelling::spell_check_test(vignettes = TRUE, error = FALSE,
skip_on_cran = TRUE)
6 changes: 3 additions & 3 deletions vignettes/motif.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ A **data visualisation design system** is a framework or set of guidelines that

Key components of a data visualisation design system include:

* **Style Guidelines:** Establishing consistent visual styles such as color palettes, typography, iconography, and layout principles to maintain coherence across all visualisations.
* **Style Guidelines:** Establishing consistent visual styles such as colour palettes, typography, iconography, and layout principles to maintain coherence across all visualisations.

* **Data visualisation Principles:** Defining principles for effective data visualisation design, such as emphasizing clarity, simplicity, accuracy, and relevance.

* **Component Library:** Providing a library of pre-designed visualisation components (e.g., charts, graphs, maps) that adhere to the established style guidelines. These components can be reused across different projects to ensure consistency.

* **Interaction Patterns:** Defining guidelines for interactive elements within visualisations, including hover effects, click interactions, tooltips, and filtering mechanisms, to enhance user engagement and exploration.

* **Accessibility Standards:** Ensuring that visualisations are accessible to all users, including those with disabilities, by following accessibility standards for color contrast, text size, alternative text, and keyboard navigation.
* **Accessibility Standards:** Ensuring that visualisations are accessible to all users, including those with disabilities, by following accessibility standards for colour contrast, text size, alternative text, and keyboard navigation.

* **Responsive Design:** Guidelines for designing visualisations that adapt gracefully to different screen sizes and devices, ensuring a consistent user experience across desktop, tablet, and mobile devices.

Expand All @@ -42,7 +42,7 @@ Overall, a data visualisation design system serves as a valuable resource for de

With more and more organisations developing their style guidelines and making them available publicly, the `motif` package aims to consolidate these guidelines and express them within the R language for statistical computing's graphics and publishing ecosystem.

`motif` provides or will be providing utilities for applying the visual identity and/or branding guidlines of various non-governmental organisations, government agencies, and United Nations units.
`motif` provides or will be providing utilities for applying the visual identity and/or branding guidelines of various non-governmental organisations, government agencies, and United Nations units.

Currently, `motif` has colours, palettes, and `ggplot2` themes based on the following organisations' branding/visual identity guidelines:

Expand Down

0 comments on commit 836053c

Please sign in to comment.