Python / SQL / Processing | WINTER 2016

A data visualization to understand the dependency of the number of checkouts in Seattle Public Library to the weather conditions in Seattle.



In Seattle, they have a saying: “If you don’t like the weather, wait five minutes and then shoot yourself in the face”.
With this project, I wanted to understand the emphasis of weather on the culture of Seattle. I expected the number of checkouts of books in Seattle correspond to weather and hence the overall mood of the city on that day.
Does the weather in Seattle really affect people and their activities, or is it just an assumption we make?


To achieve the goals of this project I had to utilize and extract data from two distinct sources.

  1. As a part of the curriculum, we had the access to data giving information of the number, type and other details of the checkouts from Seattle Public library over the past 9 years. This data has been collected as a part of the “Making Visible the Invisible” project by Professor George Legrady.
  2. I wrote a data crawler using Python and the Beautiful Soup library to go on the web address and extract the daily average precipitation and temperature from there and store in a CSV format.

The next step was to club these two tables into one database and work on SQL workbench to get the appropriate data set, to be used to visualize the data and know more about what was really happening!


Implemented on Processing (JAVA) and also on P5.js

I imagined the dataset in a spherical grid and sketched it out as:

IMG_4020 (1)

In this visualization, as we move along the radius we are moving in time from 1st Jan 2006 to 31st Dec 2015. Every concentric circle depicts a particular date. Every arc depicts the range of precipitation/temperature. When we go around the grid in the clockwise direction, starting from the horizontal baseline, we are moving from lower precipitation/temperature to higher precipitation/temperature. The last part is the color coding of these concentric arcs, which depicts the number of checkouts on that particular day.


I also added an interactive feature to ease the process of evaluating dependency on temperature as compared to precipitation.


Temperature Dependent Checkouts

The visualization of this data depicts that the Seattle Public library was visited majorly during the moderate temperatures. But, the number of checkouts during very hot or very cold days is also quite impressive. Rather even during extreme summers (mid-2009,2013,2014) and winters (end-2009,2010,2013), the number of checkouts were more or less towards the upper limit. This implied that extreme weather did not hinder the people of Seattle from visiting the library.

Precipitation Dependent Checkouts

The visualization of this data depicts that the Seattle Public library was visited majorly during minimal rainfall days. The effect of rain is not the same as temperature. Heavy rainfalls do hinder accessibility to Seattle Public library.

One thing that can be very clearly seen in this visualization, not pertaining to rain, is that there was a sudden increase in the number of checkouts in the time 2008-2011, maybe thanks to the heat wave then. According to sources online the Seattle Public Library was the most famous hangout spot in Seattle during the heat wave, probably because it was one of the only buildings in Seattle with Air Conditioning.