This document is adapted from the Case Studies section of the Altair Example Gallery.

Our first step is to set up our environment:

library("altair")
library("tibble")
library("dplyr")
library("readr")
library("jsonlite")
library("stringr")

vega_data <- import_vega_data()

Anscombe’s Quartet

Altair example

Chart

Atmospheric CO2 Concentration

Altair example

Chart

Becker’s Barley Trellis Plot

Altair example

Chart

Cumulative Wikipedia Donations

Altair example

This chart shows cumulative donations to Wikipedia over the past 10 years. Inspired by this Reddit post but using lines instead of areas.

Chart