Update app.R
Browse files
app.R
CHANGED
@@ -4,7 +4,7 @@ library(shinydashboard)
|
|
4 |
library(dplyr)
|
5 |
library(readr)
|
6 |
library(sf)
|
7 |
-
library(cartogram) # optional if you decide to do cartograms later
|
8 |
library(ggplot2)
|
9 |
library(rnaturalearth)
|
10 |
library(rnaturalearthdata)
|
@@ -27,7 +27,7 @@ ui <- dashboardPage(
|
|
27 |
|
28 |
dashboardSidebar(
|
29 |
sidebarMenu(
|
30 |
-
menuItem("
|
31 |
),
|
32 |
div(
|
33 |
style = "margin: 15px;",
|
@@ -125,7 +125,7 @@ ui <- dashboardPage(
|
|
125 |
fluidRow(
|
126 |
box(
|
127 |
width = 12,
|
128 |
-
title = strong("
|
129 |
solidHeader = TRUE,
|
130 |
div(style = "height: 80vh; padding: 10px;",
|
131 |
plotOutput("cartogramPlot", height = "100%")
|
@@ -176,7 +176,8 @@ server <- function(input, output, session) {
|
|
176 |
scale_fill_viridis_c(option = "D", na.value = "white") +
|
177 |
coord_sf(expand = FALSE) +
|
178 |
# Force OCR A Extended font in the plot
|
179 |
-
theme_void(base_size = 14, base_family = "OCR A Extended") +
|
|
|
180 |
labs(
|
181 |
fill = paste(index_col, "Index"),
|
182 |
title = "Country Representation Rankings",
|
@@ -198,3 +199,4 @@ server <- function(input, output, session) {
|
|
198 |
# Launch the Shiny App
|
199 |
# =============================
|
200 |
shinyApp(ui = ui, server = server)
|
|
|
|
4 |
library(dplyr)
|
5 |
library(readr)
|
6 |
library(sf)
|
7 |
+
#library(cartogram) # optional if you decide to do cartograms later
|
8 |
library(ggplot2)
|
9 |
library(rnaturalearth)
|
10 |
library(rnaturalearthdata)
|
|
|
27 |
|
28 |
dashboardSidebar(
|
29 |
sidebarMenu(
|
30 |
+
menuItem("Map Type", tabName = "cartogramTab", icon = icon("globe"))
|
31 |
),
|
32 |
div(
|
33 |
style = "margin: 15px;",
|
|
|
125 |
fluidRow(
|
126 |
box(
|
127 |
width = 12,
|
128 |
+
title = strong("Global Leadership Project (GLP)"),
|
129 |
solidHeader = TRUE,
|
130 |
div(style = "height: 80vh; padding: 10px;",
|
131 |
plotOutput("cartogramPlot", height = "100%")
|
|
|
176 |
scale_fill_viridis_c(option = "D", na.value = "white") +
|
177 |
coord_sf(expand = FALSE) +
|
178 |
# Force OCR A Extended font in the plot
|
179 |
+
#theme_void(base_size = 14, base_family = "OCR A Extended") +
|
180 |
+
theme_void(base_size = 14, base_family = "Courier New") +
|
181 |
labs(
|
182 |
fill = paste(index_col, "Index"),
|
183 |
title = "Country Representation Rankings",
|
|
|
199 |
# Launch the Shiny App
|
200 |
# =============================
|
201 |
shinyApp(ui = ui, server = server)
|
202 |
+
|