Skip to content

Instantly share code, notes, and snippets.

View drewbo's full-sized avatar

Drew Bollinger drewbo

  • @cloud-gov (work) + personal projects
  • Washington, DC
View GitHub Profile
@drewbo
drewbo / 0_reuse_code.js
Created September 29, 2015 22:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
(defn zp "Zero Pad numbers - takes a number and the length to pad to as arguments"
[n c]
(loop [s (str n)]
(if (< (.length s) c)
(recur (str "0" s))
s)))
@drewbo
drewbo / ZeroPad.js
Created August 22, 2014 15:21 — forked from mihi-tr/ZeroPad.js
// Zero Pad a number in Javascript
// Takes e.g. zp(42,5) -> "00042"
var zp = function(n,c) {
var s = String(n);
if (s.length< c) { return zp("0" + n,c) }
else { return s } };

Mapping the Streets of Ireland With R and ggplot2

Earlier today an interesting article about plotting the streets of france appeared in my feed. What Simon does in his blog post is essentially read OSM street-lines-data for France and displays it in what I find to be a rather traditional and elegant way.

The first thing I immediately though of was: "I'd love to see this for Ireland". As an OSX user, it took a few tricks to get the article replicated for Ireland therefore I've decided to share my notes.

Should you wish to replicate this for your country, here are some notes I've taken.

Get The Data