Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 3.67 KB

README.md

File metadata and controls

68 lines (51 loc) · 3.67 KB

vdquil - Visualizing Data (in Quil!)

Ben Fry's Visualizing Data has been a lot of fun to work through. However, as an experienced programmer familiar with Java syntax and concepts, and having already played with Processing on my own before reading the book, I found that doing the exercises as-is wasn't challenging enough. I decided to have some fun by doing the Processing exercises in Clojure using the most excellent Quil library.

Similar work has been done with Matt Pearson's Generative Art.

My goals are to exactly match the Processing code's output and to write idiomatic Clojure. If you find an error (or just something non-idiomatic to Clojure) please contact me via github or via email (first name, period, last name, gmail). Pull requests welcome too.

Running the exercises

To see these sketches in action, first walk through the preprocessing, then data, then figures. For example, for Chapter 5:

  1. Evaluate the expressions in ch5preprocessing.clj first. (The team images and figure 8 data are already included in the git repository, so you can skip this step if you cloned the `/resources folder of this repo.) Change sample data (e.g. dates) as desired. Note that the second section (grabbing data across a date range) is not needed until figure 8.
  2. Evaluate the expressions in ch5data.clj.
  3. Evaluate the expressions in figure5-6.clj. If you want to compare different versions of the sketch, comment out the marked code blocks.

Compare my code output to that of the original by downloading the Processing source and running the examples on your machine. If you have any questions drop me a line.

Screenshots!

That's all well and good, but what if you just want to see what this stuff looks like without the hassle of running the code yourself? Well, that's too bad, because you're missing out on a lot of cool interactivity. But here are some screenshots to hold you over.

Chapter 3 - Plotting (arbitrary) data spatially:

Screenshot of Chapter 3, figure 7

Chapter 4 - Graphing milk, tea, and coffee prices as a time series:

Screenshot of Chapter 4, figure 14

Chapter 5 - Correlating separate win/loss and salary datasets for Major League Baseball teams:

Screenshot of Chapter 5, figure 8

Chapter 6: Mapping zipcodes as a scatterplot: Screenshot of Chapter 6, whole map

Screenshot of Chapter 6, zoomed in

Chapter 7: Treemapping word usage in Mark Twain's Following the Equator: Screenshot of Chapter 7, figure 2

Attribution

This project is based on code and examples in Visualizing Data, First Edition by Ben Fry, copyright 2008 Ben Fry, 9780596514556.