Skip to content

Instantly share code, notes, and snippets.

@d--b
Last active August 29, 2015 14:04
Show Gist options
  • Save d--b/e74972f3a30c00cd053b to your computer and use it in GitHub Desktop.
Save d--b/e74972f3a30c00cd053b to your computer and use it in GitHub Desktop.
Updated through Spreadboard
{
"tablenames": {
"0": "table_0",
"1": "table_1"
},
"calctree": {
"0": [
["MSFT", "CSCO", "AAPL"],
["2013-01-01", "=A2", "=B2"],
["2014-01-01", "=A3", "=B3"],
["='select * from yahoo.finance.historicaldata where symbol = \"' + A1 + '\" and startDate = \"' + A2 + '\" and endDate = \"' + A3 + '\"'", "='select * from yahoo.finance.historicaldata where symbol = \"' + B1 + '\" and startDate = \"' + B2 + '\" and endDate = \"' + B3 + '\"'", "='select * from yahoo.finance.historicaldata where symbol = \"' + C1 + '\" and startDate = \"' + C2 + '\" and endDate = \"' + C3 + '\"'"],
[">yql(A4)", ">yql(B4)", ">yql(C4)"],
["=A_C5.map(function (o) {\n return {\n key: o.quote[0].Symbol,\n values: o.quote.map(function (d) {\n return {\n x: new Date(d.Date),\n y: d.Close / o.quote[o.quote.length - 1].Close\n };\n })\n };\n})", "", ""],
["", "", ""],
["", "", ""],
["", "", ""],
["Sparklines:", "", ""],
["=Chart.sparkline(A$5.quote.slice(0).reverse().map(function (x) {\n return x.Close;\n}))", "=Chart.sparkline(B$5.quote.slice(0).reverse().map(function (x) {\n return x.Close;\n}))", "=Chart.sparkline(C$5.quote.slice(0).reverse().map(function (x) {\n return x.Close;\n}))"],
["", "", ""],
["", "", ""],
["", "", ""],
["", "", ""],
["", "", ""],
["", "", ""]
],
"1": [
["={Display: function (element) {\n var chart = nv.models.lineChart().useInteractiveGuideline(true);\n chart.xAxis.tickFormat(function (d) {\n return d3.time.format('%x')(new Date(d));\n });\n d3.select(element).append('svg').datum(table_0.A6).call(chart);\n }}"]
]
},
"view": {
"TableDetails": {
"0": {
"left": 56,
"top": 32,
"nrows": 17,
"ncols": 3,
"colwidths": [95, 95, 87],
"rowheights": [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15]
},
"1": {
"left": 424,
"top": 32,
"nrows": 1,
"ncols": 1,
"colwidths": [407],
"rowheights": [271]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment