-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal.R
62 lines (53 loc) · 1.75 KB
/
global.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
message("\nLoading global.R file ...\n")
message("\tLoading packages ...\n")
suppressPackageStartupMessages({
# Web Application Framework for R
library(shiny) # CRAN v1.5.0
# A Grammar of Data Manipulation
library(dplyr) # CRAN v0.8.5
# Create Elegant Data Visualisations Using the Grammar of Graphics
library(ggplot2) # CRAN v3.3.2
# A Simpler Way to Find Your Files
library(here) # CRAN v0.1
# Automate Package and Project Setup
library(usethis) # CRAN v1.6.1
# Quick Serialization of R Objects
library(qs) # CRAN v0.22.1
# Interpreted String Literals
library(glue) # CRAN v1.4.0
# Simple Features for R
library(sf) # CRAN v0.9-4
# Scale Functions for Visualization
library(scales) # CRAN v1.1.1
# Themes for Shiny
library(shinythemes) # CRAN v1.1.2
# A Wrapper of the JavaScript Library 'DataTables'
library(DT) # CRAN v0.14
# Create Dashboards with 'Shiny'
library(shinydashboard) # CRAN v0.7.1
# Automate Package and Project Setup
library(usethis) # CRAN v1.6.1
# Improved text rendering support for ggplot2
library(ggtext) # CRAN v0.1.0
})
message("\tLoading functions...\n")
for (func in list.files(path = "R", full.names = TRUE)) {
source(func)
}
message("\tLoading data ...\n")
virtual_pollinators_flow <-
read_vp_flow_data()
country_features_with_sf_geometry <-
read_sf_data()
message("\tLoading variables for input panel ...\n")
origin_select_input <-
virtual_pollinators_flow %>%
distinct_input_select_countries(countries_type = reporter_countries)
destination_select_input <-
virtual_pollinators_flow %>%
distinct_input_select_countries(countries_type = partner_countries)
year_select_input <-
virtual_pollinators_flow %>%
distinct_input_select_years()
colormap_select_input <-
c("None", "HDI")