Dear Data Challenge

I am Asiel ツ
4 min readAug 18, 2020

In this story, you will learn how to make a beautiful visualization in R, originally published in the book, Dear Data.

If you haven’t seen the book, Dear Data is the story of Giorgia Lupi and Stefanie Posavec, two creative ladies with a passion for collecting and organizing data even from the most common aspects of the world around them. When they met, they quickly discovered how similar lives they were living. Both were visual designers, both were only-child collecting data since an early age, and both crossed the Atlantic Ocean to live on the other side. It was natural for them to develop a friendship soon after, but instead of learning more from each other in the common ways other people would have done, they decided to portray their friendship through data. This was done by sending one weekly postcard to each other during 52 weeks, in which they documented, counted, visualized, explained, and drew their weekly events. These postcards represented not only an opportunity to tell something, but also to express themselves, to free their imagination, to cultivate their talents, to practice their passion, and eventually, a chance for us, the readers, to appreciate the data around us, no matter if big or small.

Dear Data: A Week of Clocks

Fig. 1 shows just one of the 104 beautiful postcards in Dear Data. In this one, Stefanie tells Giorgia how many time she looked up the clock during the week. She used a circular visualization in which the hour of the day goes from 00:00 to 23:00 in a clockwise direction, and the day of the week goes from the center towards the edge as days move from Monday to Sunday. Each symbol in her graph represents the moment she looked a clock, as well as what kind of clock it was.

Fig. 1. Visualization in a postcard from Stefanie to Giorgia. How many times did she look at the clock in 1 week? [Photo from Dear Data by Giorgia Lupi and Stefanie Posavec]

As soon as I saw this wonderful visualization, I wondered if I could reproduce it in R using ggplot2, my favorite data visualization package. The more I thought about it, the more ideas I got to actually do it, at least partially.

My Dear Data Challenge

Fig. 2. Fill data into a csv file. (Only partial data is shown)

First step was to get the data into a csv file. I did this by filling each event as a row in a spreadsheet which I later read with R and saved it as a dataframe named, Clocks, which included the hour and day of each clock observation as well as the kind of clock. I wasn’t sure about the best option to visualize the days of the week so I filled them in the csv with names and numbers. I also included the number of the event at a particular hour and day for reasons I will explain you later.

I thought about drawing the days with geom_segment(), so I used a for loop to populate a dataframe with two pairs of (x, y) coordinates, one for the initial point of the segment and another for the end point. I later merged the Clocks and Segments dataframes and added the variable height to indicate where the data points should appear.

Code. 1. Code to populate a dataframe.

Once the dataframe is complete we can create a simplified visualization with circle-shaped data points, since the original symbols used by Stefanie are not included in R. The advantage here is that we can use colored symbols in order to distinguish the type of clocks plotted. Here, I decided to reduce the original 9 categories of clocks to only 4 for the sake of simplicity. Also, I created some extra space in the center to avoid agglomeration.

Code. 2. Code to generate plot

Final thoughts

I hope you had enjoyed reading this article as much as I enjoyed trying to reproduce Giorgia’s and Stefanie’s work. Their visualization really ignites my mind to attempt new ways to visualize my data and to practice my R skills. Maybe you can challenge yourself and finish the plot, add some details, and make it look more like the original.

--

--

I am Asiel ツ

My place to enjoy numbers, data, and visualizations about the things I find exciting!