Transitions
MAT 259, 2021
Ingmar Sturm

Concept
In this project, I ask the questions "are the same library items classified in the same Dewey class over time?" and "If not, how do they change?". My idea is to visualize items over the course of their lifespan in the library and trace their respective Dewey classes. I choose a 3-D cube so that the dimensions are clear and so that the transitions of Dewey classes over time is easily visible. Each item is visualized as a line, which represents a stream of check-out events. When the item changes its Dewey class, the change-point is represented as a small sphere.

One of my main sources of inspiration came from an alluvial plot published in the Wire:



Query
SELECT * # Select all columns from the database
    FROM   spl_2016.outraw AS a # here I save one copy of the whole database as "a"
    WHERE  EXISTS(
                 # here I start a filter, anything that follows from here just serves to filter "a"
                 SELECT 1
                  # this could be really anything (e.g. select *) because we just want to have the row-indices for which to filter
                  FROM  (SELECT itemnumber,
                                Count(DISTINCT( deweyclass )) AS deweyct
                         # this counts the deweyclasses per item
                         FROM   spl_2016.outraw
                             WHERE deweyClass REGEXP '^[7|8].*' # regex finds all deweyClasses that start with 7 or 8.
                         GROUP  BY itemnumber
                         HAVING deweyct > 1) AS b
                  # then we take only those items that have more than 1 deweyclass and save this whole filter dataset to "b"
                  WHERE  a.itemnumber = b.itemnumber
                 # here is where the magic happens: we filter a by the itemnumbers that occur in the dataset "b" ➤ this returns a dataset with all columns but filtered to those itemnumbers that have more than 1 deweyclass.
                 ) 
    

Preliminary sketches
The main idea consists of a basic cube with spheres representing items and colors representing the Dewey class.




Process
The first intermediary step was to plot the data in 2D. The plot clearly shows how some items change their Dewey class over time.




Final result
The items are color-coded according to the Dewey classes they are in. A presentation mode has been added so that the viewer does not need to manually navigate the visualization. Screenshots can be made by pressing the 's' key.






Code
All work is developed within Processing
Source Code + Data