Skip to content

Instantly share code, notes, and snippets.

@gelicia gelicia/_.md

Last active Aug 29, 2015
Embed
What would you like to do?
halp paths
{"description":"halp paths","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"data.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"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/KD06kOU.png","inline-console":true}
[{"id":"5429bf7b0cf221d932681b2e","time":"2013-02-05T11:52:00Z","dataFieldValue":286.606432},{"id":"5429bf7b0cf221d932681b2f","time":"2013-02-05T11:53:00Z","dataFieldValue":300.589683},{"id":"5429bf7b0cf221d932681b30","time":"2013-02-05T11:54:00Z","dataFieldValue":282.974037},{"id":"5429bf7b0cf221d932681b31","time":"2013-02-05T11:55:00Z","dataFieldValue":270.546413},{"id":"5429bf7b0cf221d932681b32","time":"2013-02-05T11:56:00Z","dataFieldValue":269.103204},{"id":"5429bf7b0cf221d932681b33","time":"2013-02-05T11:57:00Z","dataFieldValue":283.139112},{"id":"5429bf7b0cf221d932681b34","time":"2013-02-05T11:58:00Z","dataFieldValue":274.729928},{"id":"5429bf7b0cf221d932681b35","time":"2013-02-05T11:59:00Z","dataFieldValue":276.393465},{"id":"5429bf7b0cf221d932681b36","time":"2013-02-05T12:00:00Z","dataFieldValue":280.424861},{"id":"5429bf7b0cf221d932681b37","time":"2013-02-05T12:01:00Z","dataFieldValue":268.77957},{"id":"5429bf7b0cf221d932681b38","time":"2013-02-05T12:02:00Z","dataFieldValue":319.524499},{"id":"5429bf7b0cf221d932681b39","time":"2013-02-05T12:03:00Z","dataFieldValue":369.26431},{"id":"5429bf7b0cf221d932681b3a","time":"2013-02-05T12:04:00Z","dataFieldValue":380.240888},{"id":"5429bf7b0cf221d932681b3b","time":"2013-02-05T12:05:00Z","dataFieldValue":367.094619},{"id":"5429bf7b0cf221d932681b3c","time":"2013-02-05T12:06:00Z","dataFieldValue":378.839459},{"id":"5429bf7b0cf221d932681b3d","time":"2013-02-05T12:07:00Z","dataFieldValue":380.49891},{"id":"5429bf7b0cf221d932681b3e","time":"2013-02-05T12:08:00Z","dataFieldValue":393.070331},{"id":"5429bf7b0cf221d932681b3f","time":"2013-02-05T12:09:00Z","dataFieldValue":395.367956},{"id":"5429bf7b0cf221d932681b40","time":"2013-02-05T12:10:00Z","dataFieldValue":328.801554},{"id":"5429bf7b0cf221d932681b41","time":"2013-02-05T12:11:00Z","dataFieldValue":308.788147},{"id":"5429bf7b0cf221d932681b42","time":"2013-02-05T12:12:00Z","dataFieldValue":283.991146},{"id":"5429bf7b0cf221d932681b43","time":"2013-02-05T12:13:00Z","dataFieldValue":287.183025},{"id":"5429bf7b0cf221d932681b44","time":"2013-02-05T12:14:00Z","dataFieldValue":329.507296},{"id":"5429bf7b0cf221d932681b45","time":"2013-02-05T12:15:00Z","dataFieldValue":336.715351},{"id":"5429bf7b0cf221d932681b46","time":"2013-02-05T12:16:00Z","dataFieldValue":319.772671},{"id":"5429bf7b0cf221d932681b47","time":"2013-02-05T12:17:00Z","dataFieldValue":340.773694},{"id":"5429bf7b0cf221d932681b48","time":"2013-02-05T12:18:00Z","dataFieldValue":335.426815},{"id":"5429bf7b0cf221d932681b49","time":"2013-02-05T12:19:00Z","dataFieldValue":323.087179},{"id":"5429bf7b0cf221d932681b4a","time":"2013-02-05T12:20:00Z","dataFieldValue":343.323242},{"id":"5429bf7b0cf221d932681b4b","time":"2013-02-05T12:21:00Z","dataFieldValue":344.171616},{"id":"5429bf7b0cf221d932681b4c","time":"2013-02-05T12:22:00Z","dataFieldValue":293.09296},{"id":"5429bf7b0cf221d932681b4d","time":"2013-02-05T12:23:00Z","dataFieldValue":283.096995},{"id":"5429bf7b0cf221d932681b4e","time":"2013-02-05T12:24:00Z","dataFieldValue":277.042225},{"id":"5429bf7b0cf221d932681b4f","time":"2013-02-05T12:25:00Z","dataFieldValue":291.116147},{"id":"5429bf7b0cf221d932681b50","time":"2013-02-05T12:26:00Z","dataFieldValue":286.399881},{"id":"5429bf7b0cf221d932681b51","time":"2013-02-05T12:27:00Z","dataFieldValue":290.34066},{"id":"5429bf7b0cf221d932681b52","time":"2013-02-05T12:28:00Z","dataFieldValue":272.68765},{"id":"5429bf7b0cf221d932681b53","time":"2013-02-05T12:29:00Z","dataFieldValue":251.760886},{"id":"5429bf7b0cf221d932681b54","time":"2013-02-05T12:30:00Z","dataFieldValue":282.848934},{"id":"5429bf7b0cf221d932681b55","time":"2013-02-05T12:31:00Z","dataFieldValue":269.825663},{"id":"5429bf7b0cf221d932681b56","time":"2013-02-05T12:32:00Z","dataFieldValue":283.763801},{"id":"5429bf7b0cf221d932681b57","time":"2013-02-05T12:33:00Z","dataFieldValue":293.313582},{"id":"5429bf7b0cf221d932681b58","time":"2013-02-05T12:34:00Z","dataFieldValue":299.493238},{"id":"5429bf7b0cf221d932681b59","time":"2013-02-05T12:35:00Z","dataFieldValue":299.689887},{"id":"5429bf7b0cf221d932681b5a","time":"2013-02-05T12:36:00Z","dataFieldValue":316.837467},{"id":"5429bf7b0cf221d932681b5b","time":"2013-02-05T12:37:00Z","dataFieldValue":332.470194},{"id":"5429bf7b0cf221d932681b5c","time":"2013-02-05T12:38:00Z","dataFieldValue":332.494426},{"id":"5429bf7b0cf221d932681b5d","time":"2013-02-05T12:39:00Z","dataFieldValue":334.832607},{"id":"5429bf7b0cf221d932681b5e","time":"2013-02-05T12:40:00Z","dataFieldValue":324.095462},{"id":"5429bf7b0cf221d932681b5f","time":"2013-02-05T12:41:00Z","dataFieldValue":304.189304},{"id":"5429bf7b0cf221d932681b60","time":"2013-02-05T12:42:00Z","dataFieldValue":286.298068},{"id":"5429bf7b0cf221d932681b61","time":"2013-02-05T12:43:00Z","dataFieldValue":298.067011},{"id":"5429bf7b0cf221d932681b62","time":"2013-02-05T12:44:00Z","dataFieldValue":288.814178},{"id":"5429bf7b0cf221d932681b63","time":"2013-02-05T12:45:00Z","dataFieldValue":281.115265},{"id":"5429bf7b0cf221d932681b64","time":"2013-02-05T12:46:00Z","dataFieldValue":268.898216},{"id":"5429bf7b0cf221d932681b65","time":"2013-02-05T12:47:00Z","dataFieldValue":266.43703},{"id":"5429bf7b0cf221d932681b66","time":"2013-02-05T12:48:00Z","dataFieldValue":288.311314},{"id":"5429bf7b0cf221d932681b67","time":"2013-02-05T12:49:00Z","dataFieldValue":273.571073},{"id":"5429bf7b0cf221d932681b68","time":"2013-02-05T12:50:00Z","dataFieldValue":284.498639},{"id":"5429bf7b0cf221d932681b69","time":"2013-02-05T12:51:00Z","dataFieldValue":290.140088},{"id":"5429bf7b0cf221d932681b6a","time":"2013-02-05T12:52:00Z","dataFieldValue":295.012458},{"id":"5429bf7b0cf221d932681b6b","time":"2013-02-05T12:53:00Z","dataFieldValue":287.194398},{"id":"5429bf7b0cf221d932681b6c","time":"2013-02-05T12:54:00Z","dataFieldValue":277.244457},{"id":"5429bf7b0cf221d932681b6d","time":"2013-02-05T12:55:00Z","dataFieldValue":299.000631},{"id":"5429bf7b0cf221d932681b6e","time":"2013-02-05T12:56:00Z","dataFieldValue":254.790089},{"id":"5429bf7b0cf221d932681b6f","time":"2013-02-05T12:57:00Z","dataFieldValue":275.821457},{"id":"5429bf7b0cf221d932681b70","time":"2013-02-05T12:58:00Z","dataFieldValue":285.109578},{"id":"5429bf7b0cf221d932681b71","time":"2013-02-05T12:59:00Z","dataFieldValue":266.639669},{"id":"5429bf7b0cf221d932681b72","time":"2013-02-05T13:00:00Z","dataFieldValue":266.057432},{"id":"5429bf7b0cf221d932681b73","time":"2013-02-05T13:01:00Z","dataFieldValue":304.130078},{"id":"5429bf7b0cf221d932681b74","time":"2013-02-05T13:02:00Z","dataFieldValue":293.232979},{"id":"5429bf7b0cf221d932681b75","time":"2013-02-05T13:03:00Z","dataFieldValue":269.317679},{"id":"5429bf7b0cf221d932681b76","time":"2013-02-05T13:04:00Z","dataFieldValue":313.652985},{"id":"5429bf7b0cf221d932681b77","time":"2013-02-05T13:05:00Z","dataFieldValue":302.926604},{"id":"5429bf7b0cf221d932681b78","time":"2013-02-05T13:06:00Z","dataFieldValue":306.083561},{"id":"5429bf7b0cf221d932681b79","time":"2013-02-05T13:07:00Z","dataFieldValue":301.517558},{"id":"5429bf7b0cf221d932681b7a","time":"2013-02-05T13:08:00Z","dataFieldValue":289.198108},{"id":"542a1d5e0cf221d93268213d","time":"2013-02-05T11:52:00Z","dataFieldValue":286.606432},{"id":"542a1d5e0cf221d93268213e","time":"2013-02-05T11:53:00Z","dataFieldValue":300.589683},{"id":"542a1d5e0cf221d93268213f","time":"2013-02-05T11:54:00Z","dataFieldValue":282.974037},{"id":"542a1d5e0cf221d932682140","time":"2013-02-05T11:55:00Z","dataFieldValue":270.546413},{"id":"542a1d5e0cf221d932682141","time":"2013-02-05T11:56:00Z","dataFieldValue":269.103204},{"id":"542a1d5e0cf221d932682142","time":"2013-02-05T11:57:00Z","dataFieldValue":283.139112},{"id":"542a1d5e0cf221d932682143","time":"2013-02-05T11:58:00Z","dataFieldValue":274.729928},{"id":"542a1d5e0cf221d932682144","time":"2013-02-05T11:59:00Z","dataFieldValue":276.393465},{"id":"542a1d5e0cf221d932682145","time":"2013-02-05T12:00:00Z","dataFieldValue":280.424861},{"id":"542a1d5e0cf221d932682146","time":"2013-02-05T12:01:00Z","dataFieldValue":268.77957},{"id":"542a1d5e0cf221d932682147","time":"2013-02-05T12:02:00Z","dataFieldValue":319.524499},{"id":"542a1d5e0cf221d932682148","time":"2013-02-05T12:03:00Z","dataFieldValue":369.26431},{"id":"542a1d5e0cf221d932682149","time":"2013-02-05T12:04:00Z","dataFieldValue":380.240888},{"id":"542a1d5e0cf221d93268214a","time":"2013-02-05T12:05:00Z","dataFieldValue":367.094619},{"id":"542a1d5e0cf221d93268214b","time":"2013-02-05T12:06:00Z","dataFieldValue":378.839459},{"id":"542a1d5e0cf221d93268214c","time":"2013-02-05T12:07:00Z","dataFieldValue":380.49891},{"id":"542a1d5e0cf221d93268214d","time":"2013-02-05T12:08:00Z","dataFieldValue":393.070331},{"id":"542a1d5e0cf221d93268214e","time":"2013-02-05T12:09:00Z","dataFieldValue":395.367956},{"id":"542a1d5e0cf221d93268214f","time":"2013-02-05T12:10:00Z","dataFieldValue":328.801554},{"id":"542a1d5e0cf221d932682150","time":"2013-02-05T12:11:00Z","dataFieldValue":308.788147},{"id":"542a1d5e0cf221d932682151","time":"2013-02-05T12:12:00Z","dataFieldValue":283.991146},{"id":"542a1d5e0cf221d932682152","time":"2013-02-05T12:13:00Z","dataFieldValue":287.183025},{"id":"542a1d5e0cf221d932682153","time":"2013-02-05T12:14:00Z","dataFieldValue":329.507296},{"id":"542a1d5e0cf221d932682154","time":"2013-02-05T12:15:00Z","dataFieldValue":336.715351},{"id":"542a1d5e0cf221d932682155","time":"2013-02-05T12:16:00Z","dataFieldValue":319.772671},{"id":"542a1d5e0cf221d932682156","time":"2013-02-05T12:17:00Z","dataFieldValue":340.773694},{"id":"542a1d5e0cf221d932682157","time":"2013-02-05T12:18:00Z","dataFieldValue":335.426815},{"id":"542a1d5e0cf221d932682158","time":"2013-02-05T12:19:00Z","dataFieldValue":323.087179},{"id":"542a1d5e0cf221d932682159","time":"2013-02-05T12:20:00Z","dataFieldValue":343.323242},{"id":"542a1d5e0cf221d93268215a","time":"2013-02-05T12:21:00Z","dataFieldValue":344.171616},{"id":"542a1d5e0cf221d93268215b","time":"2013-02-05T12:22:00Z","dataFieldValue":293.09296},{"id":"542a1d5e0cf221d93268215c","time":"2013-02-05T12:23:00Z","dataFieldValue":283.096995},{"id":"542a1d5e0cf221d93268215d","time":"2013-02-05T12:24:00Z","dataFieldValue":277.042225},{"id":"542a1d5e0cf221d93268215e","time":"2013-02-05T12:25:00Z","dataFieldValue":291.116147},{"id":"542a1d5e0cf221d93268215f","time":"2013-02-05T12:26:00Z","dataFieldValue":286.399881},{"id":"542a1d5e0cf221d932682160","time":"2013-02-05T12:27:00Z","dataFieldValue":290.34066},{"id":"542a1d5e0cf221d932682161","time":"2013-02-05T12:28:00Z","dataFieldValue":272.68765},{"id":"542a1d5e0cf221d932682162","time":"2013-02-05T12:29:00Z","dataFieldValue":251.760886},{"id":"542a1d5e0cf221d932682163","time":"2013-02-05T12:30:00Z","dataFieldValue":282.848934},{"id":"542a1d5e0cf221d932682164","time":"2013-02-05T12:31:00Z","dataFieldValue":269.825663},{"id":"542a1d5e0cf221d932682165","time":"2013-02-05T12:32:00Z","dataFieldValue":283.763801},{"id":"542a1d5e0cf221d932682166","time":"2013-02-05T12:33:00Z","dataFieldValue":293.313582},{"id":"542a1d5e0cf221d932682167","time":"2013-02-05T12:34:00Z","dataFieldValue":299.493238},{"id":"542a1d5e0cf221d932682168","time":"2013-02-05T12:35:00Z","dataFieldValue":299.689887},{"id":"542a1d5e0cf221d932682169","time":"2013-02-05T12:36:00Z","dataFieldValue":316.837467},{"id":"542a1d5e0cf221d93268216a","time":"2013-02-05T12:37:00Z","dataFieldValue":332.470194},{"id":"542a1d5e0cf221d93268216b","time":"2013-02-05T12:38:00Z","dataFieldValue":332.494426},{"id":"542a1d5e0cf221d93268216c","time":"2013-02-05T12:39:00Z","dataFieldValue":334.832607},{"id":"542a1d5e0cf221d93268216d","time":"2013-02-05T12:40:00Z","dataFieldValue":324.095462},{"id":"542a1d5e0cf221d93268216e","time":"2013-02-05T12:41:00Z","dataFieldValue":304.189304},{"id":"542a1d5e0cf221d93268216f","time":"2013-02-05T12:42:00Z","dataFieldValue":286.298068},{"id":"542a1d5e0cf221d932682170","time":"2013-02-05T12:43:00Z","dataFieldValue":298.067011},{"id":"542a1d5e0cf221d932682171","time":"2013-02-05T12:44:00Z","dataFieldValue":288.814178},{"id":"542a1d5e0cf221d932682172","time":"2013-02-05T12:45:00Z","dataFieldValue":281.115265},{"id":"542a1d5e0cf221d932682173","time":"2013-02-05T12:46:00Z","dataFieldValue":268.898216},{"id":"542a1d5e0cf221d932682174","time":"2013-02-05T12:47:00Z","dataFieldValue":266.43703},{"id":"542a1d5e0cf221d932682175","time":"2013-02-05T12:48:00Z","dataFieldValue":288.311314},{"id":"542a1d5e0cf221d932682176","time":"2013-02-05T12:49:00Z","dataFieldValue":273.571073},{"id":"542a1d5e0cf221d932682177","time":"2013-02-05T12:50:00Z","dataFieldValue":284.498639},{"id":"542a1d5e0cf221d932682178","time":"2013-02-05T12:51:00Z","dataFieldValue":290.140088},{"id":"542a1d5e0cf221d932682179","time":"2013-02-05T12:52:00Z","dataFieldValue":295.012458},{"id":"542a1d5e0cf221d93268217a","time":"2013-02-05T12:53:00Z","dataFieldValue":287.194398},{"id":"542a1d5e0cf221d93268217b","time":"2013-02-05T12:54:00Z","dataFieldValue":277.244457},{"id":"542a1d5e0cf221d93268217c","time":"2013-02-05T12:55:00Z","dataFieldValue":299.000631},{"id":"542a1d5e0cf221d93268217d","time":"2013-02-05T12:56:00Z","dataFieldValue":254.790089},{"id":"542a1d5e0cf221d93268217e","time":"2013-02-05T12:57:00Z","dataFieldValue":275.821457},{"id":"542a1d5e0cf221d93268217f","time":"2013-02-05T12:58:00Z","dataFieldValue":285.109578},{"id":"542a1d5e0cf221d932682180","time":"2013-02-05T12:59:00Z","dataFieldValue":266.639669},{"id":"542a1d5e0cf221d932682181","time":"2013-02-05T13:00:00Z","dataFieldValue":266.057432},{"id":"542a1d5e0cf221d932682182","time":"2013-02-05T13:01:00Z","dataFieldValue":304.130078},{"id":"542a1d5e0cf221d932682183","time":"2013-02-05T13:02:00Z","dataFieldValue":293.232979},{"id":"542a1d5e0cf221d932682184","time":"2013-02-05T13:03:00Z","dataFieldValue":269.317679},{"id":"542a1d5e0cf221d932682185","time":"2013-02-05T13:04:00Z","dataFieldValue":313.652985},{"id":"542a1d5e0cf221d932682186","time":"2013-02-05T13:05:00Z","dataFieldValue":302.926604},{"id":"542a1d5e0cf221d932682187","time":"2013-02-05T13:06:00Z","dataFieldValue":306.083561},{"id":"542a1d5e0cf221d932682188","time":"2013-02-05T13:07:00Z","dataFieldValue":301.517558},{"id":"542a1d5e0cf221d932682189","time":"2013-02-05T13:08:00Z","dataFieldValue":289.198108}]
//why does the path keep connecting?!?!?!?!?!
var data = tributary.data;
//154 items - console.log(data.length)
//item 78 is what's drawing the line
//data = data.slice(0, 78);
//Oh, the data repeats itself... draws the line on top of itself
var dataOfInterest = 79
var dataOfInterest2 = 2;
console.log("DOI #" + dataOfInterest, data[dataOfInterest]);
console.log("DOI2 #" + dataOfInterest2, data[dataOfInterest2]);
var dataExtent = d3.extent(data, function(d){return d.dataFieldValue;});
var minDate = new Date(1360065100000);
var maxDate = new Date(1360069700000);
var xScale = d3.time.scale().range([0, 500]).domain([minDate, maxDate]);
var yScale = d3.scale.linear().range([0, 200]).domain(dataExtent);
var svg = d3.select("svg");
var g = svg.append("g").attr("transform", "translate(50,50)");
var line = d3.svg.line()
.x(function(d) { return xScale(new Date(d.time)); })
.y(function(d) { return yScale(d.dataFieldValue); })
.interpolate("linear");
g.append("path")
.attr({
"class": "quickPlotData",
"d": line(data),
"stroke": "blue",
"fill": "none"
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.