Skip to content

Instantly share code, notes, and snippets.

View matt-bernhardt's full-sized avatar
💭
Learning Rails...

Matthew Bernhardt matt-bernhardt

💭
Learning Rails...
View GitHub Profile
@matt-bernhardt
matt-bernhardt / html_scraper_schedule.pde
Created January 10, 2015 06:13
The Processing sketch used to scrape the 2015 MLS schedule into a CSV format. The output of this sketch was parsed further in OpenRefine, and posted at https://gist.github.com/matt-bernhardt/7443a60c67dd69d231d5
/* HTML Scraper via jSoup
* ---
* This takes a URL (at url in setup() )
* and crawls the returned markup via the pattern defined in doc.select()
* This version then dumps the resulting content into a text file
* for further processing with Google Refine
*/
// Import libraries
import org.jsoup.safety.*;
@matt-bernhardt
matt-bernhardt / README.md
Last active August 29, 2015 14:13 — forked from mbostock/.block

A treemap recursively subdivides area into rectangles; the area of any node in the tree corresponds to its value. This example uses color to encode different packages of the Flare visualization toolkit. Treemap design invented by Ben Shneiderman. Squarified algorithm by Bruls, Huizing and van Wijk. Data courtesy Jeff Heer.

@matt-bernhardt
matt-bernhardt / departments.json
Last active August 29, 2015 14:14 — forked from MoritzStefaner/.block
Collaboration networks among departments at MIT
{
"nodes":[
{"name":"School of Architecture and Planning","group":1},
{"name":"Architecture","group":1},
{"name":"Media Arts and Sciences","group":1},
{"name":"Urban Studies and Planning","group":1},
{"name":"School of Engineering","group":2},
{"name":"Aeronautics and Astronautics","group":2},
{"name":"Biological Engineering","group":2},
@matt-bernhardt
matt-bernhardt / README.md
Last active August 29, 2015 14:14
Departmental Collaboration at MIT
@matt-bernhardt
matt-bernhardt / README.md
Last active August 29, 2015 14:14
Better Departmental Chord Diagram

Please, let this work. Now with faked CSV in the right format.

@matt-bernhardt
matt-bernhardt / README.md
Last active August 29, 2015 14:15
Node Combinations

A framework for visualizing a network of combinations among a single list of nodes.

@matt-bernhardt
matt-bernhardt / README.md
Last active August 29, 2015 14:15 — forked from mbostock/.block
Choropleth map example

This choropleth encodes employed populations from recent census data.

@matt-bernhardt
matt-bernhardt / README.md
Last active August 29, 2015 14:15 — forked from mbostock/.block

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

Compare this display to a force layout with curved links, a force layout with fisheye distortion and a matrix diagram.

@matt-bernhardt
matt-bernhardt / combinations.css
Last active August 29, 2015 14:15
Combination of list items
svg {
font: 10px sans-serif;
}
.cell,
.label {
opacity: 0.5;
}
.cell:hover,
@matt-bernhardt
matt-bernhardt / README.md
Last active August 29, 2015 14:15
Combination of list items, v2

This is an attempt to build a visualization pattern showing combinations among items in a single list. It is inspired by a device I remember from printed maps, showing distances between cities - usually printed in an unused corner.

This pattern currently works best for combinations that are direction-agnostic. In this example, the datasete illustrates how often a group of soccer players appeared together over the course of a single season. For bi-directional combinations a different strategy may be needed, or perhaps a more nuanced design at each intersection.