I recently was reading the book “Functional Art” and came across the work of Stefanie Posavec. Her Sentence Drawings (click here to see and click here to learn) caught my attention. Here is a ggplot2 rendition:

From what I understand about this visualization technique it’s meant to show the aesthetic and organic beauty of language (click here for interview with artist). I was captivated and thus I began the journey of using ggplot2 to recreate a Sentence Drawing.

Getting Started

I decided to use data sets from the qdap package. This requires downloading the development version which in turn requires downloading a few development version dependencies. Be patient, this may take a minute or two to install.

Installing Packages from GitHub

# install.packages("devtools") library(devtools) install_github(c("slidify", "slidifyLibraries"), "ramnathv", ref = "dev") install_github("knitcitations", "cboettig") install_github(c("reports", "qdapDictionaries", "qdap"), "trinker") install_github("ggthemes", "jrnold") install.packages("scales") invisible(lapply(c("qdap", "ggplot2", "ggthemes", "scales", "grid"), require, character.only = TRUE))

Right Turn Function

Stefanie Posavec describes the process for creating the Sentence Drawing by making a right turn at the end of each sentence. I went straight to work creating an inefficient solution to making right hand turns. Realizing the inefficiency, I asked for help and utilized this response from flodel. Here is the solution as a function that you’ll need to run.