Skip to content

Instantly share code, notes, and snippets.

View jamescmacey's full-sized avatar

James Macey jamescmacey

View GitHub Profile
@jamescmacey
jamescmacey / data.json
Last active January 2, 2022 01:39
2021 RNZ lead headlines
This file has been truncated, but you can view the full file.
{
"NOTE": "retrieved_display is the time you want to use. It was worked out using Excel and is in 'mm/dd/yy hh:mm' format (sorry, I know this is not ideal).",
"headlines": [
{
"id": "18",
"headline": "$2b worth of investor visas 'locked up in office in Wellington'",
"summary": "Only a handful of immigration officials are working on processing investor visas that have a total value of more than $2 billion.",
"story_url": "https://www.rnz.co.nz/news/national/433895/2b-worth-of-investor-visas-locked-up-in-office-in-wellington",
"image_url": "https://www.rnz.co.nz/assets/news_crops/97130/eight_col_99617479_l.jpg?1582795613",
"site": "rnz",
@jamescmacey
jamescmacey / nz-personal-vote-graph.py
Last active September 12, 2020 01:08 — forked from rlucioni/senate-vote-graph.py
New Zealand Parliament — Conscience vote graph
# This code is adapted from https://gist.github.com/rlucioni/8bdb1092579041ce739c
# Also see https://renzolucioni.com/senate-voting-relationships/
# It fetches personal votes from WhereTheyStand.nz and creates a similar
# .gexf file.
# Due to the rarity of personal votes in New Zealand's Parliament, I'm not sure
# how useful this actually is.
import json
from itertools import combinations
@jamescmacey
jamescmacey / vote.json
Created September 5, 2020 07:51
WhereTheyStand — Vote JSON example
{
"vote_date": "2019-11-13",
"document_id": "HansS_20191113_074100000",
"wheretheystand_url": "https://wheretheystand.nz/bills/view-bill/BILL_74307/HansS_20191113_074100000/",
"parliament_website_url": "https://www.parliament.nz/en/pb/hansard-debates/rhr/document/HansS_20191113_074100000/vote",
"reading": 3,
"ayes": 69,
"noes": 51,
"abstentions": 0,
"absent": 0,
@jamescmacey
jamescmacey / bill.json
Created September 5, 2020 07:35
WhereTheyStand — bill JSON example
{
"name": "End of Life Choice Bill",
"description": "This bill gives people with a terminal illness the option of requesting assisted dying.",
"document_id": "BILL_74307",
"parliament_website_url": "https://www.parliament.nz/en/pb/bills-and-laws/bills-proposed-laws/document/BILL_74307/",
"wheretheystand_url": "https://wheretheystand.nz/bills/view-bill/BILL_74307/",
"ref": "269-3",
"parliament_number": 52,
"current_status": "Enacted",
"parliament_website_status": "Not current",