Skip to content

Instantly share code, notes, and snippets.

View pssguy's full-sized avatar

Andrew Clark pssguy

View GitHub Profile
@pssguy
pssguy / global.R
Created November 16, 2012 00:40
Shiny App showing graphs of goal methods for all EPL players with more than 50 career goals
# My first tiny-shiny
# Thanks to all the guys at R-Studio, especially Joe Cheng for some hand-holding
# The global.r script can hold variables available to both ui.r and server.R
library(shiny)
library(ggplot2)
# data based on goals scored to early November 2012
df <- read.csv("http://www.premiersoccerstats.com/shinyGoals.csv",stringsAsFactors=FALSE)
@pssguy
pssguy / global.R
Created November 15, 2012 21:01
Shiny example: EPL Players Goal Scoring Runs
library(shiny)
library(ggplot2)
# data based on goals scored to early November 2012
url <- "http://www.premiersoccerstats.com/plScoringRuns.csv"
df <- read.csv(url,stringsAsFactors=FALSE)
# create the data for the selectInput
playerChoices <- unique(df[,c(1,2)])$PLAYERID