Skip to content

Instantly share code, notes, and snippets.

var width = 700,
height = 800,
centered;
var projection = d3.geoMercator()
var svg = d3.select("div#chart1").append("svg")
.attr("width", width)
.attr("height", height);
@glfharris
glfharris / OpenPrescribing.py
Created January 16, 2016 18:16
Quick and dirty wrapper for the openprescribing.net API
import requests as r
def org_code(q=None, org_type=None, exact=False):
payload = {'q': q}
if org_type:
payload['org_type'] = org_type
return openp_action('bnf_code', payload)
def org_details(type='ccg', specific=None):
"""Returns a list of Dicts - each is an org"""
import csv
myfile = "Path/To/WDI_Data.csv"
data = {}
t = list(range(1960, 2016))
years = []
for item in t:
years += [str(item)]
temp = []