This file contains hidden or 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(stats) | |
library(VIM) | |
library(mice) | |
library(car) | |
library(Hmisc) | |
library(dplyr) | |
setwd('~/R') | |
#import and prepare the master data. | |
full_golf=read.csv('full_golf_new.csv',strip.white=T,stringsAsFactors=FALSE) |
This file contains hidden or 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
render_data <- function(DT,cat,Cond,texas,Cond1) { | |
if (Cond1==1900) { | |
Cond1=as.character(as.numeric(Cond)+1) | |
} | |
return_data = NULL | |
data_cat=NULL | |
data_cat_prev=NULL | |
for (i in 1:nrow(DT)) { | |
return_data$full[i]=levels(DT$full)[DT$full[i]] | |
return_data$state[i]=levels(DT$state)[DT$state[i]] |
This file contains hidden or 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(shinydashboard) | |
library(googleVis) | |
library(xts) | |
shinyUI(dashboardPage( | |
dashboardHeader(title = "Natural Gas"), | |
dashboardSidebar( | |
sidebarUserPanel("Production and Consumption"), | |
sidebarMenu(id="menu", | |
menuItem("Info", tabName = "info",icon=icon("info")), |
This file contains hidden or 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(shinydashboard) | |
library(googleVis) | |
library(xts) | |
st.codes=readRDS('st.codes.rds') | |
other.codes=readRDS('other.codes.rds') | |
cn.codes=readRDS('cn.codes.rds') | |
other.con.codes=readRDS('other.con.codes.rds') | |
total.codes=readRDS('total.codes.rds') | |
total.con.codes=readRDS('total.con.codes.rds') |