Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
// 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 |
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.
India Map Data
- Outline & major cities in TopoJSON
- States in TopoJSON
- 2011 Population in JSON
- d3.geo.mercator projection
- d3.geo.tile plugin
- Natural Earth II tiles
A visualization of Indian state finances (revenues and expenditures) for 2010-2011
created for India60
This file contains 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
[ | |
{ | |
"abbr": "in", | |
"name": "Union", | |
"revenue": [ | |
{"name":"tax", "value": 574005}, | |
{"name":"non-tax", "value": 356008}, | |
{"name":"grants", "value": 2673} | |
], | |
"expenditure": [ |
This file contains 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
// 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; | |
} |
This file contains 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
// 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' |