Untitled
#TITLE: Export Civics Collection Data into R for analysis # AUTHOR: Kensy Jordan # DATE: July 2024, August 2024, September 2024 # Update: (add in GA4 and data from BigQery for ILs) # BRIEF DESCRIPTION: Pull data from Civics Collection to update metrics sheet # Remember to update end date!! # GENERAL SETUP--------------------------------------------------------------------------------------------- # Clear workspace rm(list = ls()) # Load and install packages library(pacman) # Add any other packages you need to this list p_load(tidyr, dplyr, stringr, janitor, httpuv, magrittr, lubridate, bigrquery, readr, rstudioapi, qualtRics, remotes, httr, ggplot2, lemon, showtext, forcats, statebins, googleAnalyticsR, purrr, lme4) #after update #install.packages("gargle") # install.packages("rlang") # library(rlang) #install.packages("googlesheets4") #library("googlesheets4") font_add("Red Hat", "RedHatDisplay-Regular.otf") font_add("Red Hat Bold", "RedHatDisplay-Black.otf") showtext_auto() # Set working directory to this file's location currentdir <- dirname(getActiveDocumentContext()$path) if (getwd() != currentdir & currentdir != "") { setwd(currentdir) }
Leave a Comment