Skip to content

Instantly share code, notes, and snippets.

View clarkfitzg's full-sized avatar

Clark Fitzgerald clarkfitzg

  • Mathematics and Statistics Department, CSU Sacramento
  • Sacramento
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@clarkfitzg
clarkfitzg / get_conv_rate.R
Last active December 24, 2015 15:28
This script scrapes a current exchange rate and writes it to a csv file. It's meant to be automated using Linux crontab. To have it run every hour you would type something like this: ~$ crontab -e 0 * * * * sudo R CMD BATCH /home/shared/barug_oct13/get_conv_rate.R
# Clark Fitzgerald 23 Sep 13
#
# This script gets current exchange rates and writes to csv file.
csv.path <- "/home/shared/barug_oct13/hourly_rate.csv"
library("XML")
# We'll compare the conversion rate from US to South Korea.
country <- "korea"
@clarkfitzg
clarkfitzg / graph_conv_rate.R
Created October 4, 2013 02:20
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)
@clarkfitzg
clarkfitzg / test_gist
Created September 3, 2013 04:17
Test
# Checking to see how this saves. What will it look like?
# Not sure
x <- 1:10