Skip to content

Instantly share code, notes, and snippets.

@bennytowns
Created August 7, 2016 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennytowns/6fd74a9b691418b403a99fef1a9bfa02 to your computer and use it in GitHub Desktop.
Save bennytowns/6fd74a9b691418b403a99fef1a9bfa02 to your computer and use it in GitHub Desktop.
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")),
menuItem("Natural Gas Withdrawals Map", tabName = "map_tot",icon=icon("map")),
menuItem("Natural Gas Consumption Map", tabName = "map_con", icon=icon("map-o")),
menuItem("Charts", tabName = "charts",icon=icon("line-chart")),
uiOutput('filter'),
uiOutput('filter1'),
uiOutput('filter2'),
uiOutput('filter3'),
uiOutput('filter4')
)
),
dashboardBody(
tabItems(
tabItem(tabName = "info",fluidRow(
box(width=12,
HTML("<h2>Natural Gas Production and Consumption Mapping</h2>"),
HTML("<h3>Purpose</h3>"),
HTML("<p>This application is designed to allow a user to visualize the production and consumption of Natural Gas in
the United States, on a state-by-state basis.</p>"),
HTML("<h3>Data</h3>"),
HTML("<p>All data is from the US EIA (Energy Information Administration).</p>"),
HTML("<h3>Source</h3>"),
HTML("<a href='http://www.eia.gov/beta/MER/'>EIA Data Links</a></br>")
))),
tabItem(tabName="map_tot",
verticalLayout(
box(htmlOutput("map"),height=600,width=1000),
box(htmlOutput("mapData"),height=200, width=800)),
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = "auto", left = "auto", right = 20, bottom = 220,
width = 220, height = "auto",
textOutput("total_US"),
plotOutput("other_regions",height=300))),
tabItem(tabName="map_con",
verticalLayout(
box(htmlOutput("map_cons"),height=600,width=1000),
box(htmlOutput("map_consData"),height=200, width=800)),
absolutePanel(id = "controls2", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = "auto", left = "auto", right = 20, bottom = 220,
width = 220, height = "auto",
textOutput("total_con_US"),
plotOutput("other_con_regions",height=300))),
tabItem(tabName="charts",
verticalLayout(
box(plotOutput("chart"),height=400,width=1000),
box(plotOutput("chart2"),height=400,width=1000),
box(plotOutput("chart3"),height=400,width=1000)
))
)
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment