MAT 259 - 2011W

Yun Teng | Project 2

Dewey Treemap


This project aims to use treemap to demonstrate the popularity of each dewey category. Daily data is used to draw each treemap.There are two layers of mapping. The first layer gives an overview of the 10 major dewey catagory(000,100,200...). Within each category, there's another layer to show all the subcategories. The box size is proportional to the amount of items borrowed in that category. The layout of the treemap is customized (users can experience with different algorithms).

Color is used to show the comparison between one particular day and a certain period before it. The box will be redish if the percentage of that category items borrowed is decreasing and greenish if it's increasing. The bigger the change, the bighter the color.

Reference: Ben Fry Treemap Smart Money

Source Code

Data Parsing

At first I wanted to make this project fully interactive. Users can select any day they want to see and it will make query from the database. But as the query is too slow. I checked out the data first and stored them as txt files. Each file keeps one day's data and is loaded into a hashmap when used. The key of the hashmap is the 3-digit dewey number and the value is the amount of the items checked out. I stored all the data from Jan 01, 2008 to Dec 31, 2010.

Source code: DeweyTreemap BoundsIntegrator RankedFloatArray buildTree deweyItem deweyModel deweyUtil


Built with Processing