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 / 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",