A visualization of Indian state finances (revenues and expenditures) for 2010-2011
created for India60
// https://github.com/felixge/node-mysql | |
// npm install mysql | |
var mysql = require('mysql'); | |
// http://nodejs.org/docs/v0.6.5/api/fs.html#fs.writeFile | |
var fs = require('fs'); | |
var client = mysql.createClient({ | |
user: 'root', | |
password: 'mysqlpassword' |
// https://github.com/tmpvar/jsdom | |
// npm install jsdom | |
var jsdom = require('jsdom'); | |
function scrapeDribbble (url, page) { | |
dribbbles[page-1] = []; | |
if (page > 1) { | |
url = dribbbleURL + '/shots?page=' + page; | |
} |
[ | |
{ | |
"abbr": "in", | |
"name": "Union", | |
"revenue": [ | |
{"name":"tax", "value": 574005}, | |
{"name":"non-tax", "value": 356008}, | |
{"name":"grants", "value": 2673} | |
], | |
"expenditure": [ |
A visualization of Indian state finances (revenues and expenditures) for 2010-2011
created for India60
India Map Data
Contours of San Francisco overlayed over OpenStreeMap vector tiles using code from mbostock's vector tiles with multiple layers example. View the hi-res file
See gist for code used to generate contours.
// https://en.wikipedia.org/wiki/Happy_number | |
function happy(n) { | |
if(typeof n === "undefined") throw new Error("Missing argument n"); | |
var result = { | |
n: n, | |
happy: true, | |
seq: [n], | |
toString: function() { | |
return this.happy |