Skip to content

Instantly share code, notes, and snippets.

@hyonschu
Last active August 29, 2015 14:08
Show Gist options
  • Save hyonschu/17c37f56a32927085669 to your computer and use it in GitHub Desktop.
Save hyonschu/17c37f56a32927085669 to your computer and use it in GitHub Desktop.
Tributary inlet
{"description":"Tributary inlet","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"tmp.tsv":{"default":true,"vim":false,"emacs":false,"fontSize":12},"tmp.csv":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"thumbnail":"http://i.imgur.com/HqTdcCh.png"}
var data = tributary.tmp;
var color = d3.scale.category10()
d3.select("svg")
.selectAll("irisplot")
.data(data)
.enter()
.append("circle")
// circle x position
.attr("cx", function (d, i) {
return i * 4.7
})
// circle y position
.attr("cy", function (d) {
return d.sepalL* 175-694
})
// circle radius
.attr("r", function(d) {
return d.sepalL*1.2
})
// circle color fill
.style('fill', function(d, i) {
if (i < 49) {
return '#a6912a';
} else if (i < 102) {
return '#a6912a'
} else {
return '#a6912a'
}
});
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
sepalL
3.7
4.9
4.7
4.6
5
5.4
4.6
5
4.4
5.3
5.4
4.8
4.8
8.1
7.59999999999982
5.7
5.4
5.1
5.7
5.1
5.4
5.1
4.6
5.1
4.8
5
5
5.2
5.2
4.7
4.8
5.4
5.2
5.5
4.9
5
5.5
4.9
4.4
5.1
5
4.5
4.4
5
5.1
4.8
5.1
4.6
5.3
5
7
6.4
6.9
5.5
6.5
5.7
6.3
4.9
6.6
5.2
5
5.9
6
6.1
5.6
6.7
5.6
5.8
6.2
5.6
5.9
6.1
6.3
6.1
6.4
6.6
6.8
6.7
6
5.7
5.5
5.5
5.8
6
5.4
6
6.7
6.3
5.6
5.5
5.5
6.1
5.8
5
5.6
5.7
5.7
6.2
5.1
5.7
6.3
5.8
7.1
6.3
6.5
7.6
4.9
7.3
6.7
7.2
6.5
6.4
6.8
5.7
5.8
6.4
6.5
8.9
7.7
6
6.9
5.6
7.7
6.3
6.7
7.2
6.2
6.1
6.4
7.2
7.4
7.9
6.4
6.3
6.1
7.7
6.3
6.4
6
6.9
6.7
6.9
5.8
6.8
6.7
6.7
6.3
6.5
6.2
5.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment