Skip to content

Instantly share code, notes, and snippets.

View jalapic's full-sized avatar

James Curley jalapic

View GitHub Profile
@jalapic
jalapic / README.md
Last active November 10, 2015 18:09
Concentric rings with pie layout
@jalapic
jalapic / README.md
Created November 10, 2015 18:11
d3.js wiki visualization
@jalapic
jalapic / README.md
Created November 10, 2015 18:30
D3.EZ : Reusable Circular Heat Chart
@jalapic
jalapic / README.md
Last active November 11, 2015 02:52
circular heatmap
@jalapic
jalapic / gist:8c6c3fd87a039a093926
Created November 11, 2015 21:37
model output to word
### Getting model output into Word (if you really have to)
# This assumes that in your working directory you already have a word document called rtf.doc
library(rtf) # puts data into RTF format
fit <- summary(lm(mpg ~ cyl + hp, data=mtcars))
### Make Win / Winless Streaks plot
#Load packages
library(engsoccerdata)
library(dplyr)
library(ggplot2)
engsoccerdata2$Date <- as.Date(engsoccerdata2$Date, format="%Y-%m-%d") #make Date format
#Get MUFC games:
@jalapic
jalapic / README.md
Last active August 16, 2016 07:41
James' tactics board
@jalapic
jalapic / README.md
Last active February 14, 2021 12:20
Tactics board, freehand draw
@jalapic
jalapic / README.md
Last active January 2, 2016 17:01
Tactics board, line draw
library(ggplot2)
library(dplyr)
data(mtcars)
sem <- function(x) sd(x)/sqrt(length(x)) #std error
mtcarsx <- mtcars %>% group_by(cyl) %>% summarize(meanx = mean(wt), semx = sem(wt)) %>% mutate(upr = meanx + semx, lwr = meanx - semx)
mtcarsx
ggplot(mtcarsx, aes(x=factor(cyl), y=meanx))+