-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.R
29 lines (25 loc) · 916 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
# TODO: Figure out how to automatically read in data from Google or GitHub or
# somewhere. See code below for Google sheets. But doesn't seem to work when
# served as a Polished app.
# global.R
library(shiny)
library(shinyWidgets)
library(polished)
library(tidyverse)
library(readxl)
library(leaflet)
library(googlesheets4)
# Configure the global sessions when the app initially starts up.
polished::polished_config(
app_name = "giraffe_map_shiny",
api_key = "v1GDJ310gbQGvLFOboOmpD3HPAP4FHtZS0"
)
# This code does a manual authorization for Google and specifies that the token
# will be stored in the secrets folder in the project directory. Once the token
# is obtained authorization should be automatic.
# options(gargle_oauth_cache = "secrets")
# gs4_auth()
# list.files("secrets")
# gs4_deauth()
# Authorize using token stored in secrets
# gs4_auth(cache = "secrets", email = "asputnam@gmail.com")