-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFlex-dashboard.Rmd
119 lines (85 loc) · 2.02 KB
/
Flex-dashboard.Rmd
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
title: "Untitled"
output:
flexdashboard::flex_dashboard:
theme:
version: 4
bg: "#101010"
fg: 'black' #"#FDF7F7"
primary: "#ED79F9"
navbar-bg: "#3ADAC6"
base_font:
google: Prompt
heading_font:
google: Sen
code_font:
google:
# arguments to sass::font_google()
family: JetBrains Mono
local: false
---
```{r setup, include=FALSE, context = "server"}
library(flexdashboard)
library(highcharter)
library(dplyr)
library(viridisLite)
library(forecast)
library(treemap)
library(ggplot2)
library(tidyverse)
library(thematic)
library(bslib)
library(systemfonts)
```
```{r }
thm <-
hc_theme(
colors = c("#1a6ecc", "#434348", "#90ed7d"),
chart = list(
backgroundColor = "transparent",
style = list(fontFamily = "Source Sans Pro")
),
xAxis = list(
gridLineWidth = 1
)
)
```
Column {data-width=650}
-----------------------------------------------------------------------
### Chart A
```{r}
AirPassengers %>%
forecast(level = 90) %>%
hchart() %>%
hc_add_theme(thm)
```
Column {data-width=350}
-----------------------------------------------------------------------
### Chart B
```{r}
# data("USArrests", package = "datasets")
# data("usgeojson")
#
# USArrests <- USArrests %>%
# mutate(state = rownames(.))
#
# n <- 4
# colstops <- data.frame(
# q = 0:n/n,
# c = substring(viridis(n + 1), 0, 7)) %>%
# list.parse2()
#
# highchart() %>%
# hc_add_series_map(usgeojson, USArrests, name = "Sales",
# value = "Murder", joinBy = c("woename", "state"),
# dataLabels = list(enabled = TRUE,
# format = '{point.properties.postalcode}')) %>%
# hc_colorAxis(stops = colstops) %>%
# hc_legend(valueDecimals = 0, valueSuffix = "%") %>%
# hc_mapNavigation(enabled = TRUE)
```
Column {.tabset data-width=400}
-----------------------------------------------------------------------
### Chart C
```{r}
```