Last active
August 29, 2015 13:57
-
-
Save mages/9709148 to your computer and use it in GitHub Desktop.
Revisions
-
mages revised this gist
Mar 23, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ # See also the entry on stackoverflow: http://goo.gl/KUvmW2 library(lattice) library(chron) source("http://blog.revolutionanalytics.com/downloads/calendarHeat.R") -
mages revised this gist
Mar 22, 2014 . 1 changed file with 0 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,3 @@ library(lattice) library(chron) source("http://blog.revolutionanalytics.com/downloads/calendarHeat.R") -
mages revised this gist
Mar 22, 2014 . 1 changed file with 1 addition and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,18 +16,4 @@ library(chron) source("http://blog.revolutionanalytics.com/downloads/calendarHeat.R") # Plot as calendar heatmap calendarHeat(stock.data$Date, stock.data$Adj.Close, varname="MSFT Adjusted Close") -
mages revised this gist
Mar 22, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,8 +22,12 @@ library(googleVis) stock.data$Date <- as.Date(stock.data$Date) plot( gvisCalendar(data=stock.data, datevar="Date", numvar="Adj.Close", options=list( title="Calendar heat map for MSFT adjsuted close", calendar="{ cellSize: 10, yearLabel: { color: '#444444'}, focusedCellColor: {stroke:'red'}}", width=590, height=320), chartid="Calendar") )
-
mages revised this gist
Mar 22, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,8 @@ quote <- paste("http://ichart.finance.yahoo.com/table.csv?s=", "&f=", substr(end.date, 1,4), "&g=d&ignore=.csv", sep="") stock.data <- read.csv(quote, as.is=TRUE) library(lattice) library(chron) source("http://blog.revolutionanalytics.com/downloads/calendarHeat.R") # Plot as calendar heatmap calendarHeat(stock.data$Date, stock.data$Adj.Close, -
mages revised this gist
Mar 22, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,9 +17,8 @@ source("http://blog.revolutionanalytics.com/downloads/calendarHeat.R") calendarHeat(stock.data$Date, stock.data$Adj.Close, varname="MSFT Adjusted Close") library(googleVis) stock.data$Date <- as.Date(stock.data$Date) plot( gvisCalendar(data=stock.data, datevar="Date", numvar="Adj.Close", options=list(calendar="{ cellSize: 10 }", -
mages created this gist
Mar 22, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ stock <- "MSFT" start.date <- "2012-01-01" end.date <- Sys.Date() quote <- paste("http://ichart.finance.yahoo.com/table.csv?s=", stock, "&a=", substr(start.date,6,7), "&b=", substr(start.date, 9, 10), "&c=", substr(start.date, 1,4), "&d=", substr(end.date,6,7), "&e=", substr(end.date, 9, 10), "&f=", substr(end.date, 1,4), "&g=d&ignore=.csv", sep="") stock.data <- read.csv(quote, as.is=TRUE) source("http://blog.revolutionanalytics.com/downloads/calendarHeat.R") # Plot as calendar heatmap calendarHeat(stock.data$Date, stock.data$Adj.Close, varname="MSFT Adjusted Close") stock.data$Date <- as.Date(stock.data$Date) library(googleVis) plot( gvisCalendar(data=stock.data, datevar="Date", numvar="Adj.Close", options=list(calendar="{ cellSize: 10 }", width=590, height=320), chartid="Calendar") )