LeWei – Project 2 Final – InfoViz

by Le Wei @ 8:38 am 26 January 2011

Coin Collection


I went through quite a few ideas before I settled on my final concept. Initially, I wanted to do a scrape of wikipedia to map out a family tree of a royal family, and supplement it with interesting historical facts to give each node of the tree more personality and depth. I then amended this idea to have it be a visualization comparing the structure of a ‘normal’, modern day family with that of a royal family. But since I didn’t have access to the family tree of a real family, I then thought about creating an “average” family tree using statistical data about population, birth rate, and families. Pretty soon I realized this was all spinning out of control, so I amended my focus to just looking at the lives of the British monarchs, which was my original interest anyway.

I remembered seeing British currency from different years and noticing that the portrait of the monarch on the coin changes throughout their lifetime. I thought if I could get a bunch of coins from different years I could flip through the images of the monarchs and see how they looked at different points in their life. I quickly found the main source of my data at http://www.coins-of-the-uk.co.uk/ and downloaded the images. After speaking with Golan on Monday, I decided that after going through the trouble of collecting all the images, it might be really interesting to do some analysis on them as coins instead of just as portraits of people.

Data Collection

To collect the images, I wrote a java program using the HtmlParser library to crawl through the links on the site to pages of coin images and download them all. I then created a spreadsheet to record the monarch on the coin, the name of the image file, and the year of the coin. I actually went through the site by hand to get the years, which was pretty silly of me because it definitely would not have been hard to get them programmatically. I was initially just worried about the years being in varying formats, but as it turns out that didn’t happen too often. I also weeded out any images that weren’t of entire coins or weren’t of a monarch (because I was still planning to do the monarch flipbook).

Data Analysis

After deciding to focus on circularity measurement, I started to write a little program using openCV to try to detect the coins in the image and show the result with a red outline. Since the images had such varying backgrounds and brightnesses of coins, the same thresholds and other variables wouldn’t work for everything. I then dabbled in using imageJ, which has built-in functionality to calculate circularity, but it was really hard to get it to do batch work effectively and I ran into the same problem of how different the images were. That ended up being a colossal waste of time but maybe it was a good experience. But probably not. I went back to processing and just had the program go through every image and show what it thought was the coin, and I recorded the circularities it found and noted which coins it got mostly write and which ones it didn’t. Changing the thresholds around a few times, I was able to get circularities for most of my images, but I missed a bunch of them.

Getting the average color was much, much easier. I found some code on the Processing Discourse forums that worked perfectly with just a tiny bit of modification.


Both displays were pretty simple to make and since I was running out of time Tuesday night, I didn’t go through that many versions. For the color display, I made each coin a 1 x 100 pixel line and placed them next to each other to create a rectangle of color over time. I made this image once, saved it, and just loaded it up for subsequent runs of the visualization. I also consulted this timeline from the BBC to get general eras in british history to see if any trends appear. For the circularity graph, I gave one pixel on the horizontal axis to each year, and divvied up the vertical pixels between 0 and 1. So each coin’s dot is placed at (year – some offset, circularity * height). For both visualizations, I added some mouseover action because I thought it was important to be able to get detail on each piece of data (mostly because I spent so much time getting it!!).



There were definitely a lot of problems with the circularity measurements, so the visualization of circularity and time was not completely correct. I feel if I had used a more reliable method of getting circularity, it would be easier to make inferences based on the visualization. At the very least, I would be able to trust it more even if it did show that there was not any interesting correlation. I’m much more satisfied with the color visualization, although it doesn’t actually show the original coin images. I actually did create a sketchy visualization of my original flipbook idea and showed it to a friend, who said it was a little nice in that it allowed you to actually see the coins clearly, which my final two visualizations didn’t do.


Project 2 Presentation – Le Wei


  1. Comments from PiratePad A:

    in photoshop, shadows/highlights >> will get rid of shadow problem, you can automate for all of them

    Nice clean layout. The data is cool. Good job!

    color timeline is most interesting

    Flipbook is a clever idea. Too bad it didn’t pan out.

    I’d be interested in seeing how coin patterns change through time. Maybe you could do some edge detection to find out how intricate the patterns are.

    Could you map it to this historical information?

    Interesting information. Have you sent this to the collector? I’m sure he/she would love it.

    Nice topic! I like the colors visualization. It’s interestesting how the middle is more yellowish.

    I think the random bits in the data is acceptable considering the sheer number of samples. The UI is nice on both, simple but effective. Timeline overlay was a cool idea, i dont know about the truth of it, but either way it looks very nice. Simple, clean, and cool end result. If you send it to him, and he responds post it on the blog.

    Flipbook sounds pretty cool, except I think the coins make the queen look younger when she is old, they don’t want to be mean. Not really sure what color averaging addsot really sure what color averaging adds – oh ok nevermind, i see.
    Photoshop automation usually works bettr than writing your own script. It is really easy and the image processing is more sophisticated than anything you can write or most open source libraries. e libraries.

    Really intersting idea, and it looks like a lot of work to get that dataset. The dates compared against the color wsa really interesting. The graph mouseover displays were really good. Clean font choices and nice design.

    You might also try using color brightness as a filter for the background of the coin. The mouseover info

    Interesting metrics. One probably doesn’t think to organize coins by their “circularity.” Great interaction with the mouseover. I think it adds tremendous usability and depth.

    Intriguing, the variation in circularity, I would imagine, would say something about the craftmanship/skill of the maker who forged it. If only that data were available somewhere along with this… Fond of the color visualization, the link to major historical events makes its very relevant and easy to create plausible speculation.

    Great interaction and labelling for your visualizations. would it be possible to have the two visualizations in the same program?

    Very interesting.. I like the colour visualization over time and it kinda does make sense in the context of time. Personally, I think the circularity is interesting but I’m wondering if there is a better way of representing it?

    I really like the data you are working with. Nice way of analyzing images for roundness, and way of removing the backgrounds. Really nice end result for your visualization. I think this is an effective and interesting way of looking at the collection. The interaction is a nice choice as well. I like how clean the visuals are. Oh and the color analysis too! Very nice, this could be a stand-alone visualization as well. I wonder if you could merge the color with the first chart? Maybe this would be too much though.

    Comment by Golan Levin — 26 January 2011 @ 3:11 pm
  2. Comments from PiratePad B:

    Interesting interesting interesting. How on earth did you focus down on this particular dataset? It’s juicy and unique. Nobody has studied this before.

    Your process was wonderful: Scraping the website, applying computer vision to the images to extract the contours, analyzing the contours, and creating a visualization. Also, the inquiry itself, which started as an interest in portraiture.

    Some of the spiky contours could be solved by performing smoothing on the contours. This is done by taking a geometric representation of the contour, then locally averaging neighboring points.

    For the coin color chart, would have been interesting to separate silver/ gold/ copper/ other into different timelines.

    Looks like there are a few vision snafus, would be good to settle those.

    Unique idea. I really appreciate the interactive element.

    I like that she stuck to the Pecha Kucha format
    Interesting process.
    Interactivity for the win!

    I really like the color visualization.(i’d like a print :)) You can definitely see a period of gold in the center before copper became more affordable. I think it would be cool to see both circularity and color correlated in the same vivisualization, since one axis of the color visualization is ignored.

    The interactivity in these visualizations is great.

    The color visualization is great: also, less room for funky errors like in the circularity visualization. it also looks much more slick; While I appreciate the mouse-over/see the coin thing, it looks a little funny; maybe keep the coins always appearing in the same place on the bottom?

    Very nice interface and interactivity in each visualization.

    I really like the color study and the theories we can draw from it. It might be cool to see if you can combine the studies, to see if there is a relationship between shape, color, and material.

    —> I bet the guy that runs that coin website would love to see the color visualization. :)

    is the threshold at the top 1? Is it a perfect circle?

    I like how you have different charts for different properties of the coins instead of trying to force everything into one chart.

    Comment by Golan Levin — 26 January 2011 @ 3:11 pm
  3. I emailed this blog post to the owner of the coin site. His response:

    “Interesting. The language you use in the text was somewhat bewildering at times…! [Ed. note: haha… :\]

    If by circularity you mean how circular the images of the coins are, bear in mind that
    many images are produced by scanners that are notoriously inexact in the number of pixels in the x and y directions.

    I can assure you that the actual circularity of coins from the reign of George III onwards will
    be excellent, while those hammered coins of Charles I or earlier are often not truly circular.”

    Comment by Le Wei — 31 January 2011 @ 9:48 am

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2021 Interactive Art & Computational Design / Spring 2011 | powered by WordPress with Barecity