Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
This is from a brief talk given at a BARUG meetup on October 2013. It creates a powerpoint friendly graph of some currency conversion rate data points.
# Clark 9/27/13
#
# This script graphs the conversion rate data
# You'll need to change the file.path parameter to the location of your data.
file.path <- "/home/shared/barug_oct13/hourly_rate.csv"
require(ggplot2)
require(grid)
hourly <- read.csv(file.path,
col.names = c("time", "rate"),
colClasses = c("POSIXct", "numeric"))
conv.rate <- ggplot(hourly, aes(time, rate)) +
geom_point(size = 5, color = "blue") +
ggtitle("Value of Korean Won per US Dollar") +
theme_gray(30) +
theme(axis.title.x = element_blank(), axis.title.y = element_blank()) +
theme(plot.margin = unit(c(3, 2, 1, 1), "cm")) +
theme(plot.title = element_text(vjust= 5))
ggsave(conv.rate, file = "conv_rate.jpg", width = 10, height = 6.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment