Skip to content

Instantly share code, notes, and snippets.

View ianmcook's full-sized avatar

Ian Cook ianmcook

View GitHub Profile
@ianmcook
ianmcook / hello_world.js
Created August 30, 2017 17:58
Hello World JavaScript
alert('Hello world!');
@ianmcook
ianmcook / tx_weather_alerts.R
Last active October 15, 2017 05:32
Map of active weather alerts for Texas
devtools::install_github("ianmcook/weatherAlerts")
devtools::install_github("ianmcook/weatherAlertAreas")
library(weatherAlerts)
library(leaflet)
alerts <- getAlerts("TX") # takes about 20 seconds
severity <- alerts@data$severity
colorMap <- c(Minor = "green",
@ianmcook
ianmcook / sunrise-sunset-2017-RDU.R
Last active March 5, 2017 16:19
Ribbon plot of 2017 daily sunrise and sunset at RDU airport
# load packages
library(maptools)
library(lubridate)
library(ggplot2)
# vector of all the days in 2017
days <- seq(from = as.POSIXct("2017-01-01"), to = as.POSIXct("2017-12-31"), by = "days")
# coordinates of RDU airport
lon <- -78.788