aagipalettes

AAGI Colours and Colour Palettes for R

https://github.com/aagi-aus/aagipalettes

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

AAGI Colours and Colour Palettes for R

Basic Info
Statistics
  • Stars: 3
  • Watchers: 4
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created almost 2 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codemeta

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```


[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/AAGI-AUS/AAGIPalettes/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/AAGI-AUS/AAGIPalettes/actions/workflows/R-CMD-check.yaml)


# {AAGIPalettes} AAGI Colours and Colour Palettes for R 

This repository contains the code for the R package {AAGIPalettes}, which once installed in your R session (local or RStudio Server), provides helper functions, data and palettes for working with AAGI colours.


## Installation instructions

{AAGIPalettes} is available through the [R-Universe](https://r-universe.dev/search) with pre-built binaries (this is the easy way).

To get started:

### Enable this universe

```r
options(repos = c(
    aagi_aus = 'https://aagi-aus.r-universe.dev',
    CRAN = 'https://cloud.r-project.org'))
```


### Install

```r
install.packages("AAGIPalettes")
```

### The hard(er) way

```r
o <- options() # store default options

options(pkg.build_vignettes = TRUE)
if (!require("pak"))
  install.packages("pak")
pak::pak("AAGI-AUS/AAGIPalettes")

options(o) # reset options
```

## Quick start

Following are some quick examples of {AAGIPalettes} functionality.

### Official Colours

{AAGIPalette} provides a data object of the official AAGI colours from the comms guide.
You can see the hex code values in a named vector like so.

```{r view_official_colours}
library(AAGIPalettes)

aagi_colours
```

### Viewing Colours

{AAGIPalettes} provides limited functionality for viewing and working with colours.
You can plot the colours or palettes in the package as follows.

```{r plot_official_colours, fig.cap = "A plot of the official AAGI colours."}
display_aagi_cols("aagi_colours")
```

Display the "aagi_BuOr" palette with 9 stops.

```{r plot_BuOR, fig.cap = "A plot of the AAGI BuOr palette with 9 stops."}
display_aagi_cols(name = "aagi_BuOr", n = 9)
```

### Interpolating Colours

```{r interpolate_colours, fig.cap = "A plot demonstrating the colour interpolation functionality of the package."}
library(ggplot2)

x <- interpolate_aagi_colours()
# round the weights to clean up the legend, this is just an e.g. after all...
wt_vals <- x(length(unique(round(mtcars$wt, 1))))

ggplot(mtcars, aes(x = mpg, y = hp, colour = as.factor(round(wt, 1)))) +
  geom_point() +
  scale_colour_manual("Weight", values = wt_vals)
```

## Code of Conduct

Please note that the AAGIPalettes project is released with a [Contributor Code of Conduct](https://AAGI-AUS.github.io/AAGIPalettes/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

## Logo Rights

The logo of this project and the AAGI strategic partners do not come under MIT License.
The Analytics for the Australian Grains Industry (AAGI) project retains full rights to the AGGI logo and the Grains Research and Development Corporation (GRDC) and strategic partners, Curtin University, the University of Queensland and Adelaide University, retain full rights to their own logos, respectively.

Owner

  • Name: Analytics for the Australian Grains Industry
  • Login: AAGI-AUS
  • Kind: organization
  • Email: aagi@uq.edu.au
  • Location: Australia

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "AAGIPalettes",
  "description": "Colour palettes based on the official Analytics for the Australian Grains Industry ('AAGI') comms guide and others designed to work harmoniously with the official 'AAGI' colours while being colour vision deficient (CVD) friendly.",
  "name": "AAGIPalettes: AAGI Colours and Colour Palettes",
  "relatedLink": "https://AAGI-AUS.github.io/AAGIPalettes/",
  "codeRepository": "https://github.com/AAGI-AUS/AAGIPalettes",
  "issueTracker": "https://github.com/AAGI-AUS/AAGIPalettes/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.0.1",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.5.1 (2025-06-13)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Adam H.",
      "familyName": "Sparks",
      "email": "adamhsparks@gmail.com",
      "@id": "https://orcid.org/0000-0002-0061-8359"
    }
  ],
  "copyrightHolder": [
    {
      "@type": "Organization",
      "name": "Curtin University"
    },
    {
      "@type": "Organization",
      "name": "Grains Research and Development Corporation"
    },
    {
      "@type": "Organization",
      "name": "Curtin University"
    }
  ],
  "funder": [
    {
      "@type": "Organization",
      "name": "Grains Research and Development Corporation"
    },
    {
      "@type": "Organization",
      "name": "Curtin University"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Adam H.",
      "familyName": "Sparks",
      "email": "adamhsparks@gmail.com",
      "@id": "https://orcid.org/0000-0002-0061-8359"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 2.10"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "cli",
      "name": "cli",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=cli"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "rlang",
      "name": "rlang",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rlang"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "scales",
      "name": "scales",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=scales"
    },
    "SystemRequirements": null
  },
  "applicationCategory": "Tools",
  "isPartOf": "https://grdc.com.au/research/partnerships-and-initiatives/strategic-partnerships/aagi",
  "fileSize": "169.442KB",
  "releaseNotes": "https://github.com/AAGI-AUS/AAGIPalettes/blob/master/NEWS.md",
  "readme": "https://github.com/AAGI-AUS/AAGIPalettes/blob/main/README.md",
  "contIntegration": "https://github.com/AAGI-AUS/AAGIPalettes/actions/workflows/R-CMD-check.yaml",
  "developmentStatus": "https://www.repostatus.org/#active"
}

GitHub Events

Total
  • Release event: 1
  • Watch event: 1
  • Push event: 48
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 1
  • Push event: 48
  • Create event: 1

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 2.10 depends
  • cli * imports
  • rlang * imports
  • scales * imports
  • ggplot2 * suggests
  • testthat >= 3.0.0 suggests
.github/workflows/test-coverage.yaml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite