-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
84 lines (55 loc) · 2.4 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
library(jsonlite)
library(geojsonio)
library(dplyr)
library(leaflet)
library(shiny)
library(RColorBrewer)
library(scales)
library(lattice)
library(DT)
library(googleCharts)
library(ggplot2)
library(ggthemes)
library(rsconnect)
#country不变,year改为date,显示的数字改为confirmed cases
analyticsData<-read.csv("countries-aggregated.csv")
va <- names(dataAnalytics)
vars <-va[-1:-2]
years<-analyticsData$Date
xlim <- list(
min = 0,
max = 15
)
ylim <- list(
min = 40,
max = 100
)
# Define UI for application that draws a histogram
navbarPage("Covid-19 Confirmed Cases", id="nav",
#############################
# liuhongyang Interactive Map#
#############################
tabPanel("Interactive Map",
div(class="outer",
tags$head
(
# Include our custom CSS
includeCSS("styles.css"),
includeScript("gomap.js")
),
# If not using custom CSS, set height of leafletOutput to a number instead of percent
leafletOutput("map", width="80%", height="100%"),
# Shiny versions prior to 0.11 should use class = "modal" instead.
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = FALSE, top = 55, left = "auto", right = 10, bottom = "auto",
width = 400, height = "100%",
h2("Covid-19 Data Search"),
selectInput("typeofyear", "Select Dates", years),
selectInput("typeofvariable", "Select variables", vars),
tableOutput("data")
)
)
),
# tab 'DataSearch'
tabPanel("DataTable",DTOutput(outputId = "table"))
)