Choropleth charts built with the d3.chart framework. choropleth_chart.js
is the chart type definition, which allows for rapid iteration of different quantize-scale domain/range, colors, and projections. The colors are based on color brewer, and you can pass any of the sequential scale abbreviations ('BuGn', 'PuBuGn', etc) to the range
parameter to iterate on colors.
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
PATH := node_modules/.bin:bin:$(PATH) | |
HEAD = \ | |
vendor/raven-1.0.*.js \ | |
vendor/modernizr-2.6.*.js | |
VENDOR = \ | |
vendor/jquery-1.9.*.js \ | |
vendor/jquery.imagesloaded-2.1.*.js \ | |
vendor/lodash-1.0.*.js \ |
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
Tail = require('tail').Tail; | |
Winston = require('winston'); | |
tail = new Tail('logs/default.log'); | |
logger = new Winston.Logger(); | |
logger.add(Winston.transports.Console, {colorize:true}); | |
tail.on('line', function(data){ | |
var json, date; | |
try { |
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
var fs = require('fs'), | |
path = require('path'), | |
cancer = '.coffee', | |
body = './body', | |
totalCells, | |
cellsChecked; | |
function killCancerCell(cell) { | |
fs.unlinkSync(path.join(body, cell)); |
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
everything i write on medium is a lie | |
xoxo j$ |
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
var a = Array( 3 ); | |
a; // [] | |
a.length; // 3 | |
a.map( function( v, idx ){ return idx; } ); // [ ] <-- WTF? | |
var b = Array.apply( null, Array(3) ); | |
b; // [undefined,undefined,undefined] | |
b.length; // 3 | |
b.map( function( v, idx ){ return idx; } ); // [0,1,2] <-- :) |
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
license: gpl-3.0 |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
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
"interestsUrl","house","dateUpdated","dateScraped","politicianName" | |
"http://www.aph.gov.au//%7E/media/03%20Senators%20and%20Members/32%20Members/Register/44p/AB/ButlerTerri_44P.pdf","lower","17 July 2015","2015-07-22","Ms Terri Butler" | |
"http://www.aph.gov.au//%7E/media/03%20Senators%20and%20Members/32%20Members/Register/44p/GK/GambaroT_44P.pdf","lower","13 July 2015","2015-07-22","The Hon Teresa Gambaro" | |
"http://www.aph.gov.au//%7E/media/03%20Senators%20and%20Members/32%20Members/Register/44p/PS/RoyW_44P.pdf","lower","20 July 2015","2015-07-22","Mr Wyatt Roy" | |
"http://www.aph.gov.au/~/media/Committees/Senate/committee/interests_ctte/statements2014/BackC_Astat_150717.pdf?la=en","upper","17 July 2015","2015-07-23","Christopher John Back" | |
"http://www.aph.gov.au/~/media/Committees/Senate/committee/interests_ctte/statements2014/RhiannonL_Astat_140805.pdf?la=en","upper","22 July 2015","2015-07-23","Lee Rhiannon" | |
"http://www.aph.gov.au//%7E/media/03%20Senators%20and%20Members/32%20Members/Register/44p/AB/BandtA_44P.p |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const byExtension = (obj) => Object.keys(obj).map((k) => Object.assign({ | |
test: new RegExp(`\.(${k})$`), | |
}, obj[k])); | |
if (process.env.NODE_ENV === 'production' && !process.env.API_URL) { | |
throw new Error('when NODE_ENV is "production", API_URL must be set'); |
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
// All of the following are ways that template literals are *NOT* `strictly better` than " or ' delimited strings | |
// RE: https://ponyfoo.com/articles/template-literals-strictly-better-strings | |
// valid syntax, but doesn't turn on strict mode | |
`use strict`; | |
// invalid syntax | |
const x = { `hello world`: 42 }; | |
// invalid syntax |