Skip to content

Instantly share code, notes, and snippets.

@rufuspollock
Created January 5, 2013 13:48
Show Gist options
  • Save rufuspollock/4461651 to your computer and use it in GitHub Desktop.
Save rufuspollock/4461651 to your computer and use it in GitHub Desktop.
This is a first example.
{
"manifest_version": 1,
"created": "2012-12-28T20:32:39.564Z",
"scripts": [
{
"created": "2012-12-30T19:41:43.446Z",
"last_modified": "2012-12-30T19:41:43.446Z",
"language": "javascript",
"content": "print(\"hello world\");\nprint('Fields: ', dataset.fields);\n// let's compute inflation\ndataset.data = _.map(dataset.data.slice(1), function(record, idx) {\n record.inflation = 100 * (dataset.data[idx+1].CDKO - dataset.data[idx].CDKO)/dataset.data[idx].CDKO;\n return record;\n});\ndataset.fields.push({id: 'inflation'});\nprint(dataset.data[0]);\nsaveDataset(dataset);\nprint('here again 6');",
"id": "main.js"
}
],
"project_version": 1,
"source": {
"backend": "csv",
"url": "http://localhost/datasets/consumer-price-index-uk/data/cpi-uk-annual.csv"
},
"id": "dataexplorer-528307",
"last_modified": "2013-01-05T16:22:09.737Z",
"gist_id": "4461651",
"datasets": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment