Skip to content

Instantly share code, notes, and snippets.

Beer & Breweries GraphGist

OpenBeerDB.com has a list of 1400+ breweries and 5900+ beers. Here’s a graph of the first 50 breweries from that list. The graph makes beer recommendations based on beer style, beer category, location, and alcohol content.

Schema

beer brewery2

(Beer)

What’s on the menu?

New York Public Library has over 45,000 menus from 1840s to present-day in its What’s on the menu? collection. This graph list dishes from four menus from that collection.

Schema

menu

(Menu)

@wykhuh
wykhuh / index.html
Created April 5, 2015 17:09
week 2: load parks.csv, create svg
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://d3js.org/d3.v3.min.js" ></script>
<style>
.clock {
fill: white;
stroke: black;
@wykhuh
wykhuh / index.html
Created May 3, 2015 00:10
multiple D3 charts
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://d3js.org/d3.v3.min.js" ></script>
<style>
svg {
border: 1px solid black;
display: block;
@wykhuh
wykhuh / barChart.js
Created May 3, 2015 09:23
week 3: National parks visitor count bar chart
var Chart = function() {
var width, height, barPadding, factor, len, svg;
var addComma = d3.format("0,000");
var init = function(options) {
width = options.width || 1000;
height = options.height || 1000;
barPadding = options.barPadding || 1;
factor = options.factor || 1;
var Chart = function() {
var width,
height,
barPadding,
len,
svg,
padding,
yScale,
xScale;
@wykhuh
wykhuh / index.html
Created May 3, 2015 21:03
week 5: scatterplot National Parks Visitors vs Campers
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>National Parks Visitors vs Campers</h1>
<p>This graph shows the total number of visitors (x axis) vs the total number of campers (y axis) at the various National Parks in 2014. The parks with no campers are marked in red.</p>
@wykhuh
wykhuh / gist:49b27b3c6a2c85fe3126
Created June 26, 2015 23:57
javascript examples
var a=true;
function f() {
console.log(a);
if (false) { var a = false; }
};
f();
// https://twitter.com/axiomer/status/614058868503642112
@wykhuh
wykhuh / install_node.md
Last active April 17, 2016 16:07
Installing Node

installing Node

Install Node version manager

Instead of directly downloading Node, it's recommended to install a Node version manager that lets you install and manage multiple versions of Node.

OSX users:

Use nvm https://github.com/creationix/nvm.

@wykhuh
wykhuh / .eslintrc
Last active June 16, 2016 19:54
files for node workshop
{
"extends": "airbnb/legacy",
"rules": {
"func-names": 0,
"no-else-return": 0,
"no-param-reassign": 0
}
}