Skip to content

Instantly share code, notes, and snippets.

Andy Lulham andylolz

Block or report user

Report or block andylolz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
andylolz / active_v1_data.ipynb
Created May 15, 2019
Some stats on v1.0x data, using iatikit. Stats generated 15 May 2019.
View active_v1_data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
andylolz / .block
Last active May 21, 2019 — forked from mbostock/.block
IATI traceability
View .block
license: gpl-3.0
View errors
8 3ie 3ie-artw
8 3ie 3ie-dpw
8 3ie 3ie-htw
8 3ie 3ie-sptw
8 3ie 3ie-taw
8 3ie 3ie-upw
8 aai aai-activities
8 aics aics-089
8 ausgov ausgov-389
8 ausgov ausgov-189
View output.csv
We can't make this file beautiful and searchable because it's too large.
"Nov. 28, 2014, 3:36 p.m.",person-update,,,Did a bit of googling.
"Dec. 7, 2014, 4:46 p.m.",candidacy-create,/person/3511,David Chappell,
"Dec. 7, 2014, 4:50 p.m.",person-update,/person/3511,David Chappell,
"Jan. 15, 2015, 11:30 p.m.",person-update,/person/802,Anthony Ridge-Newman,
"Jan. 15, 2015, 11:49 p.m.",person-update,,,Standing in Shrewsbury and Atcham instead:
"Jan. 15, 2015, 11:56 p.m.",person-update,/person/2217,Andrew Illsley,
"Jan. 16, 2015, 12:20 a.m.",person-update,,,
"Jan. 16, 2015, 12:26 a.m.",person-update,/person/1050,Christopher Warleigh-Lack,
"Jan. 16, 2015, 12:37 a.m.",person-update,/person/2148,Emma Reynolds,

Generating a nice diff of the changes in the v2.03 upgrade

First, fork this repo:

Then, do the following:

# clone version-2.02 branch to v2.03
git clone[your-username]/IATI-Schemas -b version-2.02 IATI-Schemas-v2.03
andylolz / results-2015-augmented.csv
Created Apr 20, 2017
GE2015 results, including Democracy Club ID (dc_id)
View results-2015-augmented.csv
We can't make this file beautiful and searchable because it's too large.
4252,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Labour,Lab,Stephen,Kinnock,Male,No,No,15416,0.489039749,-0.030147537
6754,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,UK Independence Party,UKIP,Peter,Bush,Male,No,No,4971,0.157694382,0.141898788
5518,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Conservative,Con,Edward,Yi He,Male,No,No,3742,0.118706976,-0.023776389
5576,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Plaid Cymru,PC,Duncan,Higgitt,Male,No,No,3663,0.116200869,0.045201451
4561,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Liberal Democrat,LD,Helen,Clarke,Female,No,No,1397,0.044316848,-0.118290556
20,W07000049,W92000004,Aberavon,West Glamorgan,Wales,Wales,County,Independent,Ind,Captain,Beany,Male,No,No,1137,0.036068902,
View output.txt
[This page intentionally left blank]
import csv
import requests
json = requests.get('').json()
petition = json['data']['attributes']['signatures_by_constituency']
with open('electorate.tsv') as f:
r = csv.DictReader(f, delimiter='\t')
constituencies = [x for x in r]
andylolz /
Last active Dec 3, 2015
How many candidates are standing in UK elections in 2016?

2016 Elections – Candidate lists

One Democracy Club (DC) plan for 2016 is to create candidate lists for all 2016 UK elections (much like we did for the 2015 general election (GE2015) with Last night @ Citizen Beta (Cß), Mark Longair rightly flagged that this is quite (very) ambitious! I realised I have no handle on just how ambitious i.e. how many candidates we’re talking.

The Electoral Commission have a list of upcoming elections:

Below are the numbers I’ve found so far for each.

Northern Ireland Assembly election

andylolz / gist:e1cbf97e996910e524be
Created Apr 21, 2015
Westminster constituency data, including example postcodes
View gist:e1cbf97e996910e524be
"65642": {
"codes": {
"gss": "E14000847",
"unit_id": "24722"
"name": "North Herefordshire",
"country": "E",
"type_name": "UK Parliament constituency",
"example_postcode": "HR7 4LX",
You can’t perform that action at this time.