Skip to content

Instantly share code, notes, and snippets.

View dhoboy's full-sized avatar

Daniel dhoboy

View GitHub Profile
@dhoboy
dhoboy / flavorbible2.csv
Created March 19, 2012 22:41
visualizing the flavor bible data
ingredient1 ingredient2 quality
chard anchovies heaven
chard bacon high_rec
chard basil freq_rec
chard bcheese rec
@dhoboy
dhoboy / README.md
Last active August 29, 2015 14:12
Song Tea and Ceramics Map

This is a map of Song Tea and Ceramics's 2014 tea collection. Click each marker on the map to see where the teas are from. Tea collection information taken from their website. This map was made with d3 and leaflet.

@dhoboy
dhoboy / index.html
Created January 13, 2015 06:01
Basic scatterplot
<html>
<head>
<script src="http://d3js.org/d3.v3.js"></script>
</head>
<body>
<script>
var dataset = [
[5, 20], [480, 90], [250, 50], [100, 33], [330, 95],
[410, 12], [475, 44], [25, 67], [85, 21], [220, 88],
@dhoboy
dhoboy / index.html
Created January 14, 2015 01:46
More interesting Scatterplot
<html>
<head>
<script src="http://d3js.org/d3.v3.js"></script>
<style>
.axis path,
.axis line {
fill: none;
stroke: green;
stroke-width: 3px;
shape-rendering: crispEdges;
@dhoboy
dhoboy / README.md
Last active October 26, 2015 02:13
Cool pack layout mistake

This is an accident that occured while I was learning d3's Pack Layout. I saved it becasue it looks really cool.

@dhoboy
dhoboy / README.md
Last active October 26, 2015 02:05
Outliers!

Each bubble is a School District total of the percentage of students either Overweight or Obese in New York State school systems, since 2010. Dataset here.

Bubbles get bigger as the percentage of overweight/obese students goes up. This example uses the same quantized, divergent color scale as Overweight NY Students: #2.

Color scale from Color Brewer.

This example shows outliers really well.

@dhoboy
dhoboy / README.md
Last active October 26, 2015 01:48
Overweight NY students: #1

Each bubble is a School District total of the percentage of students either Overweight or Obese in New York State school systems, since 2010. Dataset here.

This is an example of the d3 Pack layout with a linear, sequential color scale. Bubbles get bigger and become more red as their percentage of overweight/obese students increases.

@dhoboy
dhoboy / README.md
Last active October 26, 2015 01:54
Overweight NY students: #2

Each bubble is a School District total of the percentage of students either Overweight or Obese in New York State school systems, since 2010. Dataset here.

This is an example of the d3 Pack layout with a quantized, divergent color scale. Color scale thanks to Color Brewer.

Bubbles get bigger as the percentage of overweight/obese students goes up.

@dhoboy
dhoboy / README.md
Last active October 26, 2015 02:07
Force layout #1

Example #1 from learning the Force Layout in d3. The charge is too strong in this example. The big red outlier gets buried inside the mass of bubbles. Not what I wanted. However, I like the tight curve of the entire pack of bubbles.

@dhoboy
dhoboy / README.md
Last active October 26, 2015 02:10
Force layout #2

Example #2 from learning the d3 Force Layout. I loosed the charge from Force Layout #1, but I still don't think the outlier bubbles are sufficiently separate from the pack here.