-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
76 lines (63 loc) · 2.65 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
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
# backwards compatibility
# windows R-3.4.1 (current dwr-next env.)
# using latest 3.4.x windows-binaries (R3.4.4) so you don't have to compile
#setRepositories(addURLs = c(MRAN_R344="https://cran.microsoft.com/snapshot/2018-04-01/"),ind=0) #R3.4.4
#install.packages("htmlwidgets") #new versions ask for shiny 1.1 and throws error
#install.packages("DT") #new versions ask for shiny 1.1 and throws error
#install.packages("shiny") #this installs shiny 1.0.5
library(htmlwidgets )
library(DT)
library(shiny)
library(leaflet)
library(RColorBrewer)
library(scales)
library(lattice)
library(dplyr)
# Define UI for application that draws a histogram
ui <- shinyUI(fluidPage(
navbarPage("szwd mapmaker", id="nav",
tabPanel("Import CSV", value="tab1",
# Input: Select a file ---
fileInput("file1", "Kies een CSV bestand met postcodes en/of coordinaten om deze op de kaart te tonen.",
multiple = TRUE,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv")),
# Horizontal line ----
tags$hr(),
# Input: Select separator ----
radioButtons("sep", "Scheidingsteken",
choices = c(Puntkomma = ";",
Komma = ","),
selected = ";"),
tags$hr(),
actionButton("showmap", "Toon op kaart"),
tags$br(),tags$br(),
verbatimTextOutput("txt1", placeholder = TRUE),
tags$br(),tags$br(),
tableOutput("contents")
),
tabPanel("Toon Kaart", value="tab2",
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="100%", height="100%"),
tags$div(id="cite",
'Data compiled for ', tags$em('you, 2020–2021'), ' by Oz.'
)
)
)
)
))