Skip to content

Instantly share code, notes, and snippets.

View Robsteranium's full-sized avatar

Robin Gower Robsteranium

View GitHub Profile
@Robsteranium
Robsteranium / output.png
Created June 27, 2011 19:25
Codebrawl #2 pixelater
output.png
[alias]
lg = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit
@Robsteranium
Robsteranium / get_votes.pl
Created March 26, 2012 16:17 — forked from attractivechaos/get_votes.pl
Plot HackerNews polls on favorite and disliked programming languages
#!/usr/bin/env perl
# This script collects voting from HackerNews and outputs a plot votes.eps
# You need to have gnuplot installed for plotting.
use strict;
use warnings;
use IO::Socket::INET;
sub http_get {
@Robsteranium
Robsteranium / keybase.md
Created February 21, 2016 17:16
Keybase proof

Keybase proof

I hereby claim:

  • I am robsteranium on github.
  • I am robingower (https://keybase.io/robingower) on keybase.
  • I have a public key ASB-wba8mDlYA9NHIbn7EL3JcA0RPsyjZcjD598AkNaO1Ao

To claim this, I am signing this object:

@Robsteranium
Robsteranium / grit-bin-sample.tsv
Created November 5, 2020 13:12
Sample of Grit Bin Locations from Data Mill North
647 434244.172304 428652.920455
646 434546.276382 428380.451633
6212 434644.819095 428412.411432
651 434758.675879 428527.599874
650 434821.652431 428439.025039
@Robsteranium
Robsteranium / grit-bin-schema.json
Last active November 5, 2020 13:18
Schema for Git Bin Location table
{
"@context": ["http://www.w3.org/ns/csvw", {"@language": "en"}],
"tables": [{
"url": "http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv",
"tableSchema": {
"columns": [
{
"name": "location",
"datatype": "integer"
},
@Robsteranium
Robsteranium / grit-bin-sample.ttl
Created November 5, 2020 13:21
Sample of Git Bin Locations as Linked-data
@prefix bin: <http://opendata.leeds.gov.uk/downloads/gritting/grit_bins.csv#> .
@prefix os: <http://data.ordnancesurvey.co.uk/ontology/spatialrelations/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
bin:696
bin:location 696
os:easting "424541.61132300000"^^xsd:decimal;
os:northing "433245.43908500000"^^xsd:decimal .
bin:278
@Robsteranium
Robsteranium / ons-shp-2-geojson.md
Last active March 9, 2021 19:48
Convert ONS Shapefiles to GeoJSON

This gist describes how to create GeoJSON polygons from UK statistical boundaries for use in choropleths.

  1. Download the boundaries you're interested in from the ONS's Open Geography Portal:

    wget https://geoportal.statistics.gov.uk/Docs/Boundaries/Clinical_commissioning_groups_\(Eng\)_Apr_2013_Boundaries_\(Generalised_Clipped\).zip -O ccg-2013.zip
    unzip ccg-2013.zip -d shapes
    
  2. Re-project this from UK Grid Reference Eastings and Northings into Latitude and Longitude coordinates (i.e. EPSG:4326 aka WGS 84). You can use GDAL to do this:

@Robsteranium
Robsteranium / statistics-distributions.js
Created May 11, 2012 20:20 — forked from benrasmusen/statistics-distributions.js
JavaScript library for calculating critical values and upper probabilities of common statistical distributions
/*
* NAME
*
* statistics-distributions.js - JavaScript library for calculating
* critical values and upper probabilities of common statistical
* distributions
*
* SYNOPSIS
*
*
@Robsteranium
Robsteranium / geographies.json
Last active October 1, 2021 12:28
CSVW to represent Geography Lookups from https://onsvisual.github.io/geo-draw/
{
"@context": ["http://www.w3.org/ns/csvw", {"@language": "en"}],
"tableSchema": {
"columns": [{
"name": "oa11cd",
"datatype": "string",
"propertyUrl": "skos:notation"
},{
"name": "lat",
"datatype": "decimal",