Skip to content

Instantly share code, notes, and snippets.

@padak
Created May 27, 2015 13:39
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 padak/7aaa40d5f370485ea258 to your computer and use it in GitHub Desktop.
Save padak/7aaa40d5f370485ea258 to your computer and use it in GitHub Desktop.
install.packages("devtools")
library(devtools)
devtools::install_github("cloudyr/aws.signature")
devtools::install_github("keboola/sapi-r-client")
library(keboola.sapi.r.client)
client <- SapiClient$new('452-33945-de5bb7fecb818901f0834b2431564003296a4b05')
currencyData <- client$importTable('in.c-ex-currency.rates')
# prepare our data
eurVsUsd <- currencyData[which(currencyData$toCurrency == "USD"),]
eurVsUsd$date <- as.Date(eurVsUsd$date)
# load the libraries needed to make our plot
library(ggplot2)
library(scales) # for prettier x-axis labeling
p <- ggplot(eurVsUsd, aes_string(x="date", y="rate")) + geom_point()
# add x-axis scaling and title
p <- p + scale_x_date(breaks="1 year", labels=date_format("%Y"))
p <- p + ggtitle("EUR vs USD")
print(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment