Skip to content
/ ggaoc Public

The ggaoc package provides a theme, palette, and other useful functions to customise ggplots and give them a Alexandria Ocasio-Cortez inspired look.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

jrosell/ggaoc

Repository files navigation

ggaoc: Alexandria Ocasio-Cortez inspired ggplots

The ggaoc package provides a theme, palette, and other useful functions to customise ggplots and give them a Alexandria Ocasio-Cortez inspired look.

Why

All begins with this tweet:

Plot by Alexandria Ocasio-Cortez

How

To install the development version from GitHub:

# install.packages("pak")
pak::pak("jrosell/ggaoc")

What

Here an example.

Before:

library(gapminder)
library(ggplot2)

americas <- gapminder[gapminder$continent == "Americas",]

ggplot(americas) +
    geom_jitter(aes(year, lifeExp, colour = "Points")) +
    geom_smooth(aes(year, lifeExp, colour = "Trend")) +
    labs(  # Use insprired labels
      title = "Americas | Life Expectation by Year",
      x = "Year",
      y = "Age by Country"
    )
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

After:

library(gapminder)
library(ggplot2)
library(ggaoc)

theme_set(theme_aoc()) # Set the theme
#> Loading required namespace: showtext
#> Loading required package: sysfonts
#> Loading required package: showtextdb

americas <- gapminder[gapminder$continent == "Americas",]

ggplot(americas) +
    geom_jitter(aes(year, lifeExp, colour = "Points")) +
    geom_smooth(aes(year, lifeExp, colour = "Trend")) +
    scale_color_aoc() + # Use insprired colors
    labs_aoc(  # Use insprired labels
      title = "Americas | Life Expectation by Year",
      x = "Year",
      y = "Age by Country"
    )
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

About

The ggaoc package provides a theme, palette, and other useful functions to customise ggplots and give them a Alexandria Ocasio-Cortez inspired look.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages