-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathglobal.R
46 lines (41 loc) · 901 Bytes
/
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
library(httr)
library(shiny)
library(shinyjs)
library(shinyBS)
library(tidyverse)
library(shinymaterial)
library(tibble)
library(highcharter)
library(RColorBrewer)
library(shinycssloaders)
library(htmltools)
library(lubridate)
library(lazyeval)
library(spotifyr)
rm(list = ls())
source('helpers.R')
jscode <-
'$(document).on("shiny:connected", function(e) {
var jsWidth = screen.width;
Shiny.onInputChange("GetScreenWidth",jsWidth);
});
'
base_url <- 'https://api.spotify.com/v1/'
neon_colors <- c(
'#84DE02'
, '#FF4466'
, '#4BC7CF'
, '#FF85CF'
, '#FFDF46'
, '#391285'
, '#E88E5A'
, '#DDE26A'
, '#C53151'
, '#B05C52'
, '#FD5240'
, '#FF4681'
, '#FF6D3A'
, '#FF404C'
, '#A0E6FF'
)
pca_vars <- c('danceability', 'energy', 'loudness', 'speechiness', 'acousticness', 'instrumentalness', 'liveness', 'valence', 'tempo', 'duration_ms')