Created
August 7, 2016 22:13
-
-
Save nlddfn/37a4025caae10971e747ec17e7f58712 to your computer and use it in GitHub Desktop.
Shiny_Migration_path_UI
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
shinyUI( | |
fluidPage( | |
titlePanel('Tracking migration paths from the Middle East'), | |
dashboardPage( | |
dashboardHeader(title = "Navigation"), | |
dashboardSidebar( | |
sidebarMenu( | |
menuItem("About", tabName = "about", icon = icon("info")), | |
menuItem("Balkan route", tabName = "destination", icon = icon("map")), | |
menuItem("Stats", tabName = "stats", icon = icon("bar-chart")), | |
menuItem("Data", tabName = "data", icon = icon("database")) | |
) | |
), | |
dashboardBody( | |
tabItems( | |
tabItem(tabName = "data", | |
fluidRow( | |
column(width = 9, | |
box(width = NULL, dataTableOutput("table") | |
) | |
), | |
column(width = 3, | |
box(width = NULL, status = "primary", solidHeader = TRUE, title = "Parameters", | |
helpText("Display of the data used in the project"), | |
selectInput("whichData", label = "Step 1: Chose Dataset:", | |
choices = availDatasets, selected = availDatasets[1] | |
), | |
selectInput("selected", label = "Step 2: Select Items to Display:", choices = col[-1], | |
multiple = T, selected = col[1:4]) | |
) | |
) | |
) | |
), | |
tabItem(tabName = "about", #...# Introductory tab | |
), | |
tabItem(tabName = "destination", | |
fluidRow( | |
box(width = 12, | |
leafletOutput("map"), | |
# plotlyOutput("map"), | |
absolutePanel(bottom = 0, left = 10, right = 10, | |
sliderInput("slider.map", "Date", min(slider.range), | |
max(slider.range), | |
min(slider.range), ticks = TRUE, | |
sep = ",", timeFormat = '%F', | |
dragRange = TRUE, animate = animationOptions(interval = 500, | |
loop = FALSE)) | |
) | |
) | |
), | |
box(width = 12, | |
dygraphOutput("arrivals_by_day", width = '100%', height=150) | |
) | |
), | |
tabItem(tabName = "stats", | |
fluidRow( | |
column( width = 9, | |
box(plotlyOutput("origin"), width = "100%", height = '70%'), | |
box(plotlyOutput("gender"), width = "100%", height = '70%') | |
), | |
column( width = 3, | |
box( width = NULL, status = "primary", solidHeader = TRUE, title = "Parameters", | |
helpText("Country of origin and gender distribution across migrants."), ## subtitle | |
selectInput("country", # choose the countries | |
label = "Choose a destination country to display", | |
choices = countries, | |
selected = "Greece") | |
), | |
valueBox("241.263", 'Migrants in 2016', icon = | |
icon("users"),width = NULL), | |
valueBox("> 1.7 M",'Migrants since 2008', icon = | |
icon("users"),width = NULL,color='orange'), | |
valueBox("~ 2.8 M ",'Syrian refugees in Turkey', icon = | |
icon("send"),width = NULL,color='green'), | |
valueBox("10.222", 'Estimated deaths', icon = | |
icon("warning"),width = NULL,color='red') | |
) | |
) | |
) | |
) | |
))) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment