Update actions data and plots.

This commit is contained in:
mattbk
2024-11-28 10:43:23 -06:00
parent 1b58d335f8
commit 19ceeb55d8
8 changed files with 167 additions and 4 deletions

View File

@ -3,12 +3,12 @@
# Use this file to scrape a series of dates from AE7Q
# Set start and end date
date_vec <- seq(as.Date("2004-11-29"), as.Date("2024-07-22"), by="days")
date_vec <- seq(as.Date("2024-09-22"), as.Date("2024-11-26"), by="days")
# Randomize dates we are querying
date_vec <- sample(date_vec)
dvbackup <- date_vec
date_vec <- date_vec[1687:7176]
#date_vec <- date_vec[1687:7176]
ae7q_list <- list()
for(i in 1:length(date_vec)){
@ -40,11 +40,11 @@ for(i in 1:length(date_vec)){
ae7q_list[[i]] <- ae7q_table_new %>%
#mutate(across(everything(), ~na_if(., "\""))) %>%
mutate(across(everything(),
~ case_when(. == "\"" ~ NA,
TRUE ~ .))) %>%
~replace(., . == "\"", NA))) %>%
fill(everything()) %>%
group_by(`Action Type`) %>%
summarize(count = n(), .groups = "keep") %>%
mutate(date = date_vec[i],
source = "AE7Q", source_detail = ae7q_new_url) %>%
relocate(date)