Skip to content

Instantly share code, notes, and snippets.

@dvmlls
dvmlls / calendarHeatmap.R
Last active December 11, 2017 00:18
Calendar heatmap from "most-underused-data-visualization" question: http://stackoverflow.com/a/2078411/908042
library(ggplot2)
library(dplyr)
# http://stackoverflow.com/a/2078411/908042
stock <- "MSFT"
quote <- sprintf("http://ichart.finance.yahoo.com/table.csv?s=%s&g=d&ignore=.csv", stock)
stock.data <- read.csv(quote, as.is=TRUE) %>% tbl_df %>%
mutate(date=as.Date(Date, format='%Y-%m-%d')) %>%
-Xms128m
-Xmx4096m
-XX:ReservedCodeCacheSize=240m
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XX:+UseCompressedOops