Code Monkey home page Code Monkey logo

vdquil's Introduction

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.

vdquil's People

Contributors

daveliepmann avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.