This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { | |
| // no easing, no acceleration | |
| linear: function (t) { return t }, | |
| // accelerating from zero velocity | |
| easeInQuad: function (t) { return t*t }, | |
| // decelerating to zero velocity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /****** | |
| d3.csv is d3 function quite usefull when it comes to retrieve data from a csv file. | |
| It parses the csv and return a list object, each object corresponding to one rows in the original file. | |
| See: https://github.com/d3/d3-3.x-api-reference/blob/master/CSV.md#csv | |
| ******/ | |
| d3.csv('rows.csv',function(rows){ | |
| /****** | |
| For the sake of this example, here's the object return by d3.csv: | |
| rows = [{person_id:"122", question_id:"A", answer:"ABC"}, | |
| {person_id:"122", question_id:"B", answer:"DEF"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"date": "2014-09-19", "value": 1}, {"date": "2014-09-18", "value": 5}, {"date": "2014-09-17", "value": 5}, {"date": "2014-09-16", "value": 5}, {"date": "2014-09-12", "value": 4}, {"date": "2014-09-11", "value": 5}, {"date": "2014-09-10", "value": 6}, {"date": "2014-09-09", "value": 2}, {"date": "2014-09-05", "value": 5}, {"date": "2014-09-04", "value": 4}, {"date": "2014-09-03", "value": 5}, {"date": "2014-08-22", "value": 2}, {"date": "2014-08-21", "value": 5}, {"date": "2014-08-20", "value": 4}, {"date": "2014-08-19", "value": 6}, {"date": "2014-08-15", "value": 6}, {"date": "2014-08-14", "value": 5}, {"date": "2014-08-13", "value": 5}, {"date": "2014-08-12", "value": 5}, {"date": "2014-08-08", "value": 4}, {"date": "2014-08-07", "value": 5}, {"date": "2014-08-06", "value": 6}, {"date": "2014-08-05", "value": 6}, {"date": "2014-07-25", "value": 4}, {"date": "2014-07-24", "value": 6}, {"date": "2014-07-23", "value": 5}, {"date": "2014-07-22", "value": 4}, {"date": "2014-07-21", "value": 1}, {"date": "2014- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.