Skip to content

Instantly share code, notes, and snippets.

@BobHarper1
BobHarper1 / female_65.csv
Last active August 23, 2017 16:07
Life Expectancy Decomposition Gap. Urban Rural
category name value
Circulatory CHD 0.1
Circulatory Stroke 0.1
Circulatory Other Circulatory 0.0
Respiratory Pneumonia 0.0
Respiratory Chronic Lower Respiratory Disease 0.1
Respiratory Other Respiratory 0.0
Cancer Lung 0.2
Cancer Breast 0.0
Cancer Prostate 0.0
@BobHarper1
BobHarper1 / female_birth.csv
Last active August 23, 2017 16:00
Life Expectancy Decomposition Gap. England and Northern Ireland.
category name value
Circulatory CHD 0.1
Circulatory Stroke 0.1
Circulatory Other Circulatory -0.1
Respiratory Pneumonia 0.1
Respiratory Chronic Lower Respiratory Disease 0.0
Respiratory Other Respiratory 0.0
Cancer Lung 0.0
Cancer Breast 0.0
Cancer Prostate 0.0
@BobHarper1
BobHarper1 / female_65.csv
Last active August 23, 2017 15:40
Life Expectancy Decomposition Gap. Most and Least Deprived.
category name value
Circulatory CHD 0.5
Circulatory Stroke 0.1
Circulatory Other Circulatory 0.2
Respiratory Pneumonia 0.1
Respiratory Chronic Lower Respiratory Disease 0.5
Respiratory Other Respiratory 0.1
Cancer Lung 0.5
Cancer Breast 0.0
Cancer Prostate 0.0
@BobHarper1
BobHarper1 / sessions.json
Last active June 6, 2017 13:52
Sample data from Better activities feed for Belfast leisure centres
[{
"startDate": "2017-06-06T13:10:00Z",
"endDate": "2017-06-06T15:45:00Z",
"name": "Swim For All",
"genderRestriction": "mixed",
"level": "All",
"url": "https://better.org.uk/leisure-centre/belfast/ballysillan-leisure-centre/timetable",
"image": "https://assets.better.org.uk/uploads/asset/attachment/27354/Homepage_Panels-Sport_Relief_2016.jpg",
"duration": "PT155M",
"location": {
@BobHarper1
BobHarper1 / .block
Last active June 1, 2017 08:13
Turnout rate for the 2017 Assembly Elections: difference from 2016
license: cc-by-4.0
height: 700
@BobHarper1
BobHarper1 / BobsNI.json
Created May 8, 2017 16:22
odileeds uk hexmap
{
"layout":"odd-r",
"hexes": {
"E14000530":{"n":"Aldershot","q":-3,"r":-11,"a":"SE","u":"UKJ","p":72430},
"E14000531":{"n":"Aldridge-Brownhills","q":-3,"r":-1,"a":"WM","u":"UKG","p":60215},
"E14000532":{"n":"Altrincham and Sale West","q":-7,"r":3,"a":"NW","u":"UKD","p":71511},
"E14000533":{"n":"Amber Valley","q":0,"r":2,"a":"EM","u":"UKF","p":69510},
"E14000534":{"n":"Arundel and South Downs","q":0,"r":-15,"a":"SE","u":"UKJ","p":77242},
"E14000535":{"n":"Ashfield","q":1,"r":2,"a":"EM","u":"UKF","p":77091},
"E14000536":{"n":"Ashford","q":12,"r":-13,"a":"SE","u":"UKJ","p":85177},
@BobHarper1
BobHarper1 / GREL_postcode
Created April 26, 2017 14:40
GREL cell transform expression to fix O/0 problem in postcodes
if(isNotNull(value.match(/.*(o|O)\D{2}$/)), value.replace(value.match(/.*(o|O)\D{2}$/)[0], "0"), value)
@BobHarper1
BobHarper1 / index.html
Last active March 30, 2017 13:49
Stop and Search: Under-18s
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: sans-serif;
}
.calendar {
font: 10px sans-serif;
@BobHarper1
BobHarper1 / index.html
Last active March 30, 2017 08:09
Stop and Search
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.calendar {
font: 10px sans-serif;
shape-rendering: crispEdges;
}
.day {
fill: #fff;
@BobHarper1
BobHarper1 / README.md
Last active March 29, 2017 16:22
UK Distribution of Gross Hourly Earnings 1999-2016

This diagram shows the earnings distribution in the UK from 1997 to 2016. Source: ONS Annual Survey of Hours and Earnings (ASHE). For more analysis see the ONS's excellent article.

The left axis is the percentage of employees (or density). The measure is gross hourly earnings. ASHE does not cover the self-employed.

Use the arrow keys to observe the changing distibution through the years.

Adapted from D3's Mike Bostock (original version).