Skip to content

Instantly share code, notes, and snippets.

@clarkfitzg
Created October 4, 2013 02:20
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 clarkfitzg/6820039 to your computer and use it in GitHub Desktop.
Save clarkfitzg/6820039 to your computer and use it in GitHub Desktop.
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