This file contains 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 characters
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 |
This file contains 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 characters
# 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) |
This file contains 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 characters
# libraries used. install as necessary | |
library(shiny) | |
library(RJSONIO) # acquiring and parsing data | |
library(ggplot2) # graphs | |
library(plyr) # manipulating data | |
library(lubridate) #dates | |
library(stringr) | |
trim.leading <- function (x) sub("^\\s+", "", x) |
This file contains 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 characters
library(maps) | |
library(shiny) | |
library(stringr) | |
worlddf <- map("world") | |
# restrict selection to coutries only | |
locations <- worlddf$names | |
countries <-subset(locations,is.na(str_locate(locations,":"))) |
This file contains 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 characters
# load requisite libraries | |
library(shiny) | |
library(googleVis) | |
# load raw data (NB not provided) | |
tableByGame <- read.csv("../tableByGame.csv",stringsAsFactors=FALSE) | |
# to create chart need to repeat one column and get negative of league position as hack | |
tableByGame$game <- tableByGame$seasonGame | |
tableByGame$lgPos <- -tableByGame$lgPos |
This file contains 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 characters
# load required libraries | |
library(shiny) | |
library(plyr) | |
library(ggplot2) | |
library(googleVis) | |
library(reshape2) | |
####creation of example data on local directory for uploading#### |
This file contains 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 characters
# load required packages | |
library(shiny) | |
library(shinyIncubator) | |
library(googleVis) | |
library(ggplot2) | |
library(stringr) | |
library(plyr) | |
library(XML) | |
library(httr) | |
library(Hmisc) |
This file contains 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 characters
library(shiny) | |
library(shinyIncubator) | |
library(rbison) | |
library(rjson) | |
library(taxize) | |
library(plyr) | |
library(googleVis) | |
library(XML) | |
library(stringr) |
This file contains 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 characters
package | mostDownloads | bestRank | week | tot | rank | |
---|---|---|---|---|---|---|
shiny | 1018 | 70 | 2013-06-10 | 1018 | 70 | |
RColorBrewer | 4376 | 4 | 2013-04-29 | 3408 | 4 | |
scales | 3976 | 6 | 2012-12-10 | 1571 | 6 | |
scales | 3976 | 6 | 2012-12-03 | 1720 | 6 | |
reshape2 | 4330 | 6 | 2012-12-17 | 1312 | 6 | |
reshape2 | 4330 | 6 | 2013-01-07 | 2199 | 6 | |
reshape2 | 4330 | 6 | 2013-05-13 | 3660 | 6 | |
proto | 3902 | 3 | 2012-12-24 | 963 | 3 | |
ggplot2 | 5291 | 1 | 2013-03-25 | 3160 | 1 |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
This file contains 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 characters
"COUNTRY","PLAYERID","BIRTHDATE","POSITION","FIRSTNAME","LASTNAME","TEAMID","Goals","TEAMNAME","Opponents","OppID","START","subOn","OFF","PENS","CARD","Result","OwnGoal","gameDate","venue","Assists","TEAMMATCHID","MATCHID","iso2c" | |
"Cyprus","GOSSJ","1965-05-11","M","Jeremy","Goss","NOR",0,"Norwich C","Arsenal","ARS",3,0,0,0,NA,"W",NA,"1992-08-15","A",2,21000,1313,"CY" | |
"Denmark","MOLBYJ","1963-07-04","M","Jan","Molby","LIV",0,"Liverpool","Arsenal","ARS",3,0,0,0,NA,"L",NA,"1992-08-23","H",NA,20032,1345,"DK" | |
"Denmark","JENSENJ","1965-05-03","M","John","Jensen","ARS",0,"Arsenal","QPR","QPR",3,0,0,0,NA,"N",NA,"1992-09-02","A",NA,21061,1374,"DK" | |
"Denmark","JENSENJ","1965-05-03","M","John","Jensen","ARS",0,"Arsenal","Norwich C","NOR",3,0,0,0,NA,"L",NA,"1992-08-15","H",NA,20000,1313,"DK" | |
"Denmark","JENSENJ","1965-05-03","M","John","Jensen","ARS",0,"Arsenal","Liverpool","LIV",4,0,0,0,"Y","W",NA,"1992-08-23","A",NA,21032,1345,"DK" | |
"England","CULVERI","1964-09-22","D","Ian","Culverhouse","NOR",0,"Norwich C","Arsenal","AR |
OlderNewer