renv::restore()
options(stringsAsFactors = FALSE)
# Setup for googlesheets4 authentication. Set the appropriate env vars in
# .Renviron and make sure you ran gs4_auth() interactively with these settings
# for the first run (or to renew an expired Oauth token)
if (Sys.getenv("GARGLE_OAUTH_EMAIL") != "") {
    options(gargle_oauth_email = Sys.getenv("GARGLE_OAUTH_EMAIL"))
}
if (Sys.getenv("GARGLE_OAUTH_CACHE") != "") {
    options(gargle_oauth_cache = Sys.getenv("GARGLE_OAUTH_CACHE"))
}
library(tidyverse)
library(stringr)
library(knitr)
library(googlesheets4)
local_gs4_quiet()
library(git2rdata)
opts_chunk$set(
  echo = TRUE,
  dpi = 300
)

Note: this is a bookdown project, supposed to be run from within the misc/generate_textdata subfolder. You can use the generate_textdata.Rproj RStudio project file in this subfolder to run it, and run bookdown::render_book("index.Rmd", "bookdown::html_document2"). To run in a separate R session, use RStudio's build button, or (for older renv libraries) with R or Rscript (use the right version) in a shell.

# IDs of all involved googlesheets
types_gs_id <- "1dK0S1Tt3RlVEh4WrNF5N_-hn0OXiTUVOvsL2JRhSl78"
wdep_gs_id <- "1bhXgamK28K--MSWF7goKNOWtWPEI149_QCpU-3V_k_E"
ep_gs_id <- "1PH6InqJk0ijQF_N7v7IZjarijlqHRBCKhTbDn44skZU"
tg_gs_id <- "1n2ohvuLEK_anX37gxlanQXRGotweMVonFxKxtfTcuZI"
mhq_gs_id <- "1PU9MDyJKZz2DOrKqb-SIIVmSaR1mh4Ke6v0WCqhr8t4"


inbo/n2khab documentation built on Jan. 15, 2025, 9:36 a.m.