Why a bar chart for 800 rows of data will end in tears and repetitive strain injury.
Data is political donations above £7500 made to Labour, Conservative and Liberal Democrat parties in the United Kingdom between May 2010 and August 2013.
Kt | |
Bt | |
Bart | |
Esq | |
MNM | |
VC | |
GC | |
KG | |
LG | |
KT |
Mr | |
Mrs | |
Master | |
Miss | |
Ms | |
Mx | |
Dr | |
Admiral | |
Air Comm | |
Ambassador |
{"ec_ref" : {{jsonize(cells["ECRef"].value)}},"regulated_entity_name" : {{jsonize(cells["RegulatedEntityName"].value)}},"regulated_entity_type" : {{jsonize(cells["RegulatedEntityType"].value)}},"value" : {{jsonize(cells["Value"].value)}},"accepted_date" : {{jsonize(cells["AcceptedDate"].value)}},"accounting_unit_name" : {{jsonize(cells["AccountingUnitName"].value)}},"donor_name" : {{jsonize(cells["DonorName"].value)}},"accounting_units_as_central_party" : {{jsonize(cells["AccountingUnitsAsCentralParty"].value)}},"is_sponsorship" : {{jsonize(cells["IsSponsorship"].value)}},"donor_status" : {{jsonize(cells["DonorStatus"].value)}},"regulated_donee_type" : {{jsonize(cells["RegulatedDoneeType"].value)}},"company_registration_number" : {{jsonize(cells["CompanyRegistrationNumber"].value)}},"postcode" : {{jsonize(cells["Postcode"].value)}},"donation_type" : {{jsonize(cells["DonationType"].value)}},"nature_of_donation" : {{jsonize(cells["NatureOfDonation"].value)}},"purpose_of_visit" : {{jsonize(cells["PurposeOfVisit" |
[ | |
{ | |
"op": "core/text-transform", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "Value", | |
"expression": "grel:value.replace(/[,£]/,'').toNumber()", | |
"onError": "keep-original", |
var INCR = 10; // Number of messages per page | |
var SENT_URL = '//www.linkedin.com/inbox/sent?startRow='; | |
var loMessageLinks = []; // Main array for all contacts | |
var fetchMessages = function(i, cb) { | |
console.log('Fetching message page #' + (i+1)); | |
$.get(SENT_URL + (i*INCR), function(data){ | |
var $dom = $(data); | |
var fs = require("fs"); | |
function main() { | |
fs.readdir("./node_modules", function (err, dirs) { | |
if (err) { | |
console.log(err); | |
return; | |
} | |
dirs.forEach(function(dir){ | |
if (dir.indexOf(".") !== 0) { |
var casper = require("casper").create({ | |
verbose: true, | |
loglevel: "debug" | |
}); | |
var response = [], url, site, viewportWidth = 1280, viewportHeight = 1024; | |
var captureSize = {top: 0, left: 0, width: viewportWidth, height: viewportHeight}; | |
// to get screenshot folder name from url | |
var re = /url=(\w+)\./; |
gistup |
// Ways to sort an array of objects | |
var arr = [{"member_id":"40323","person_id":"24709","name":"Bridget Phillipson","party":"Labour","constituency":"Houghton and Sunderland South","office":[]},{"member_id":"40636","person_id":"11592","name":"Sharon Hodgson","party":"Labour","constituency":"Washington and Sunderland West","office":[]},{"member_id":"40592","person_id":"24710","name":"Julie Elliott","party":"Labour","constituency":"Sunderland Central","office":[]},{"member_id":"40068","person_id":"13814","name":"Naomi Long","party":"Alliance","constituency":"Belfast East","office":[]},{"member_id":"40428","person_id":"13852","name":"Ian Paisley Jnr","party":"DUP","constituency":"North Antrim"},{"member_id":"40653","person_id":"10858","name":"Pat Doherty","party":"Sinn Fein","constituency":"West Tyrone"},{"member_id":"40434","person_id":"11003","name":"Kevan Jones","party":"Labour","constituency":"North Durham","office":[]},{"member_id":"40606","person_id":"10626","name":"Steve Webb","party":"Liberal Democrat","c |
Why a bar chart for 800 rows of data will end in tears and repetitive strain injury.
Data is political donations above £7500 made to Labour, Conservative and Liberal Democrat parties in the United Kingdom between May 2010 and August 2013.