Skip to content

Instantly share code, notes, and snippets.

View sureshgorakala's full-sized avatar

Suresh Gorakala sureshgorakala

  • www.dataperspective.info
View GitHub Profile
@sureshgorakala
sureshgorakala / server.R
Last active August 29, 2015 13:56
Shiny Server Demo
library(shiny)
shinyServer(function(input, output) {
#ds = read.csv("data.csv")
ds = local(get(load("C:/Users/S769346/Desktop/SAFETY DATA ANALYSIS/SAFETY DATA ANALYSIS/test/df.rData")))
xn = as.POSIXct(ds$"Date.of.Occurence",format="%m/%d/%Y")
ds["year"] = as.numeric(format(xn,"%Y"))
ds["month"] = as.numeric(format(xn,"%m"))
@sureshgorakala
sureshgorakala / server.R
Last active December 21, 2015 20:39
Shiny App Demo
library(tm)
library(twitteR)
library(stringr)
library(plyr)
#get the tweets
#tweets = local(get(load('D:/SureshPersonal/Coursera/SentiAnalysis/Twitter/CE.RData')))
tweets = local(get(load('C:/shiny/sat.RData')))
tweets_txt = sapply(tweets,function(x) x$getText())