Hi R comm
i have some troubles running the following script, and its often a problem pinning down what causes the problem. So is there any good advice on how to solve the paticular problem and for future error correcting in R
PS.
the scrip comes from:
devtools::install_github('catboost/catboost', subdir = 'catboost/R-package')
devtools::install_github("AlbertoAlmuinha/boostime")
# install.packages("boostime")
library(boostime)
library(timetk)
library(lubridate)
library(modeltime)
library(tidymodels)
library(tidyverse)
install.packages("sknifedatar")
library(sknifedatar)
library(gt)
url <- "https://analisi.transparenciacatalunya.cat/api/views/j7xc-3kfh/rows.csv?accessType=DOWNLOAD"
df <- read_csv(url)
df <- df %>%
select(Data, starts_with("FEEI")) %>%
mutate(Data = mdy_hms(Data) %>% date()) %>%
rename(date = Data) %>%
rename_with(.cols = starts_with("FEEI"),
.fn = ~str_replace(., "FEEI_", ""))
head(df) %>%
gt() %>%
tab_header(title = md('**Data by Sector (Catalunya)**')) %>%
opt_align_table_header('left')
df <- df %>%
na.omit()
#
df <- df %>%
pivot_longer(-date) %>%
rename(id = name) %>%
mutate(id = as.factor(id))
head(df) %>%
gt() %>%
tab_header(title = md('**Panel Data**')) %>%
opt_align_table_header('left')
#
# devtools::install_github("gadenbuie/xaringanExtra")
# install.packages("anomalize")
library(anomalize)
# install.packages('devtools',dependencies = T)
library('devtools')
nest_data <- df %>%
nest(data = -id) %>%
mutate(ts_plots = map(data,
~ plot_time_series(.data = .x,
.date_var = date,
.value = value,
.smooth = FALSE
)),
ts_anomaly = map(data,
~ plot_anomaly_diagnostics(.data = .x,
.date_var = date,
.value = value,
.alpha = 0.05)
))
the output from running the last line is ::
so no plot generated....