-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.R
More file actions
29 lines (25 loc) · 699 Bytes
/
Copy pathglobal.R
File metadata and controls
29 lines (25 loc) · 699 Bytes
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
# prerequisites
require(tidyverse)
require(sf)
require(glue)
require(leaflet)
require(shiny)
require(shinyWidgets)
require(shinyjs)
require(conflicted)
conflict_prefer("addLegend", "leaflet")
conflict_prefer("filter", "dplyr")
pop_attribution = paste0(
"Population Data: ",
"<a href = 'https://www.worldpop.org/' target='_blank'>WorldPop</a> ",
"(",
"<a href = 'https://creativecommons.org/licenses/by/4.0/' target='_blank'>CC BY 4.0</a>",
")"
)
# detect mobile (https://github.com/g3rv4/mobileDetect)
mobileDetect <- function(inputId, value = 0) {
tagList(
singleton(tags$head(tags$script(src = "mobile.js"))),
tags$input(id = inputId, class = "mobile-element", type = "hidden")
)
}