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
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
# 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
# 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
# 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
--- | |
title: "Sometimes I do not want to see this" | |
author: "mytinyshinys" | |
date: "March 4, 2016" | |
output: | |
html_document: | |
fig_caption: yes | |
theme: flatly | |
toc: true | |
toc_float: true |
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
shinyServer(function(input, output, session) { | |
## code for Distribution option | |
output$distPlot <- renderPlot({ | |
# generate an rnorm distribution and plot it | |
dist <- rnorm(input$obs) | |
hist(dist) | |
}) |
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
require(shiny) | |
shinyServer(function(input, output, session) { | |
}) |
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
require(shiny) | |
require(rCharts) | |
names<- letters | |
numbers <- 1:26 | |
dates <- rep(as.Date(c("2010-01-01","2011-07-23","2011-01-03")),8) | |
dates <- c(dates,as.Date(c("1999-12-25", "2005-07-13"))) | |
df <- data.frame(names=names,numbers=numbers,dates=dates) |
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
area <- rCharts:::Highcharts$new() | |
area$series(data = toJSONArray2(valdf, json = F, names = F),type = "area", name="Points") | |
area$yAxis(title=list(text="Points"),opposite=TRUE) | |
area$xAxis(labels=list(enabled=FALSE)) | |
area$plotOptions(area = list(marker = list(enabled = FALSE,symbol = "circle", radius = 2))) | |
area$chart(zoomType="xy") | |
area$title(text="World Ranking") | |
area$subtitle(text="Zoom for closer look") | |
area$chart(height=300) | |
area |
NewerOlder