Skip to content

Instantly share code, notes, and snippets.

@mbannert
Created June 4, 2015 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbannert/c8d629fbc1d1546d9405 to your computer and use it in GitHub Desktop.
Save mbannert/c8d629fbc1d1546d9405 to your computer and use it in GitHub Desktop.
CHFEUR FxRate
library(RJSONIO)
library(RCurl)
fx <- getURL("http://www.quandl.com/api/v1/datasets/BOE/XUDLBK68")
fx_df <- data.frame(date = as.Date(unlist(lapply(fromJSON(fx)$data,"[[",1))),
EURCHF = unlist(lapply(fromJSON(fx)$data,"[[",2)))
# save("fx_df",file="presentation/data/fx_df_temp.RData")
plot(fx_df,main = "Swiss Franc per Euro Exchange Rate",
xlab = "Source: Quandl API (BOE)",ylab = "",type="l")
abline(h = 1.0,col="blue",lty="dashed")
abline(h = 1.2,col="blue",lty="dashed")
abline(v = as.Date("2015-01-11"),col="red",lty="dotted")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment