Skip to content

Instantly share code, notes, and snippets.

View O1sims's full-sized avatar
👷‍♂️
Building...

Owen Sims O1sims

👷‍♂️
Building...
View GitHub Profile
@O1sims
O1sims / estimate_lucas_wedge.R
Last active May 14, 2019 18:06
Estimate Lucas Wedge for Northern Ireland
library(purrr)
library(readr)
library(ggplot2)
library(forecast)
library(magrittr)
URI_BASE_PATH <- "https://gist.githubusercontent.com/O1sims/07458f128809996046a5515cad3bf1d1/raw/f92c95d47c9c2d8238c6fb8d41b851eaaff5c1fc"
@O1sims
O1sims / plot_ni_parliamentaries.R
Last active March 23, 2019 11:35
R script to query UK Gov petitions and extract NI data
library(httr)
library(magrittr)
library(jsonlite)
# The `constituencies.data` endpoint does not provide the 'party' element for some reason now!
# Here is a manual mapping of constitency to party
PARTY_CONSTITUENCY = list(
"Belfast East" = "Democratic Unionist Party",
"Belfast North" = "Democratic Unionist Party",
@O1sims
O1sims / keybase.md
Created February 23, 2019 07:15
Keybase proof

Keybase proof

I hereby claim:

  • I am o1sims on github.
  • I am o1sims (https://keybase.io/o1sims) on keybase.
  • I have a public key ASCuJHuEPC7yY8ay7_o_KC6Z_IM9csd5YVMG3Og8ZGUShAo

To claim this, I am signing this object:

@O1sims
O1sims / propertyData.json
Created July 10, 2018 19:46
Belfast and Holywood property data
This file has been truncated, but you can view the full file.
[
{
"estateAgent": {
"name": "Simon Brien Residential",
"branch": "North Down"
},
"priceInfo": {
"currency": "pound",
"price": 445000,
"minPrice": null,
@O1sims
O1sims / collect_property_data.py
Last active July 26, 2018 14:44
Collect PropertyPal data
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue July 10 11:06:05 2018
Last updated Thur July 26 15:43:10 2018
@author: owen
"""
import os
@O1sims
O1sims / get_NI_population_map.R
Created July 4, 2018 09:31
Load up NI shapefile
library(magrittr)
library(ggplot2)
library(rgdal)
# Input `mapType` can either be "parliamentary" or "county"
getNIPopulationMap <- function(mapType = "parliamentary") {
normaliseVector <- function(x) {