Skip to content

Instantly share code, notes, and snippets.

View k5cents's full-sized avatar

Kiernan Nicholls k5cents

View GitHub Profile
@k5cents
k5cents / uk_coalpower.R
Last active May 28, 2019 00:26 — forked from cavedave/coalpower.r
Visualizing UK Coal Usage (Simplified Code)
# this script automates the collection, processing, and plotting of gridwatch energy data
# 2019-05-27
# @kiernann
# u/WannabeWonk
# install.packages("pacman")
pacman::p_load(
RSelenium,
readr,
dplyr,
library(eurostat) # eurostat data
library(rnaturalearth) # worldwide map data
library(tidyverse) # tidy data transformation
library(lubridate) # date and time support
library(sf) # simple features GIS
euro_pop <-
get_eurostat('demo_r_pjanaggr3', stringsAsFactors = FALSE) %>%
filter(
str_length(geo) == 5, # NUTS-3