knitr::opts_chunk$set(
   collapse = TRUE,
  comment = "#>",
  fig.path = "man/figure/",
  fig.height = 4
)

ggbernie

ggbernie let's you add the dripped out Bernie Sanders from the Biden inauguration to any ggplot.

The code is based off the ggtech package and ggnba package

Installation

You can install ggbernie from github with the following

remotes::install_github("murrayjw/ggbernie")

Using ggbernie

library(ggplot2)
library(ggbernie)
library(dplyr)
library(gapminder)


tibble(x = 1, y = 1) %>% 
  ggplot(aes(x, y)) +
  geom_bernie(size = 1) + 
  theme_minimal()
library(ggplot2)
library(ggbernie)
library(dplyr)
library(gapminder)

df <- gapminder::gapminder %>% 
  filter(country == "United States")

df %>% 
  ggplot(aes(year, lifeExp)) +
  geom_bernie() + 
  labs(x = "Year",
       y = "Life Expectancy",
       title = "Life Expectancy in the United States") +
  theme_minimal()


murrayjw/ggbernie documentation built on Jan. 22, 2021, 12:36 a.m.