Skip to content

Instantly share code, notes, and snippets.

View martinjc's full-sized avatar

Martin Chorley martinjc

View GitHub Profile
@martinjc
martinjc / .block
Last active June 3, 2017 20:05
Animating with d3.timer()
license: MIT
border: no
@martinjc
martinjc / .block
Last active June 3, 2017 20:10
Animating with d3.timer() - multiple circles
license: MIT
border: no
@martinjc
martinjc / .block
Last active June 3, 2017 20:15
Animating with d3.timer - multiple circles, simple collision detection
license: MIT
border: no
@martinjc
martinjc / .block
Last active February 15, 2018 14:27
D3 forces simulation with curved weighted edges (Data: Twitter mentions Welsh Assembly Members)
license: mit
border: no
height: 1000
@martinjc
martinjc / .block
Last active March 1, 2018 15:30
D3 Barchart, multiple datasets, updating on select (Data: breathalyser test counts per month)
license: mit
border: no
@martinjc
martinjc / .block
Last active March 20, 2018 20:49
Multi-line graph with non-overlapping labels and voronoi hover interaction
license: MIT
border: no
@martinjc
martinjc / .block
Last active April 23, 2018 09:50
Multi-line graph
license: MIT
border: no
@martinjc
martinjc / .block
Last active December 10, 2018 16:23
D3 - Bar chart, multiple datasets, using slider (Data: Number of roadside breath tests in UK per month)
border: no
license: MIT
tag day start end
Admin 0 9.0 11.0
Email 0 9.0 11.0
Admin 0 11.0 12.0
Email 0 11.0 12.0
Admin 0 12.0 13.0
Email 0 12.0 13.0
Preparation 0 13.0 14.0
Discussion 0 14.0 15.0
Meeting 0 14.0 15.0
@martinjc
martinjc / rk.py
Created May 29, 2019 21:08
Code to pull activity data out of Runkeeper API
import os
import json
import time
import requests
from urllib.parse import urlencode, quote
from _credentials import client_id, client_secret, access_token
DATA_DIR = os.path.join(os.getcwd(), "data")