Skip to content

Instantly share code, notes, and snippets.

View jimmylovestea's full-sized avatar

James Molyneux jimmylovestea

View GitHub Profile
## In response to: https://twitter.com/ewijaya_/status/921178681069809664
# Load ggplot2
library(ggplot2)
# Start by creating a data frame similar to that found in the plot
x = LETTERS[1:4]
y = letters[1:8]
df <- expand.grid(x, y)
names(df) <- c("x", "y")
@jimmylovestea
jimmylovestea / dload-nhc-wind-probs.R
Last active May 31, 2017 04:21
A script that downloads wind forecast data from NOAA NHC
# Copyright 2017, James Molyneux
# MIT License, http://www.opensource.org/licenses/mit-license.php
# Load the rvest package
library(rvest)
# Naviagate to the site and obtain the form
site_url <- "http://www.nhc.noaa.gov/gis/archive_wsp.php"
my_session <- html_session(site_url)
site_form <- html_form(my_session)[[3]]