You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi - can you please confirm that filters can be used to narrow metrics to specific video IDs (e.g. "video==xxxx"). See below - if I run this code, the variable (tubern_stats) returns the same values as the channel. It doesn't filter on a specific video or set of videos. Can you confirm the syntax? Or should I try something different? Thanks in advance
Hi - can you please confirm that filters can be used to narrow metrics to specific video IDs (e.g. "video==xxxx"). See below - if I run this code, the variable (tubern_stats) returns the same values as the channel. It doesn't filter on a specific video or set of videos. Can you confirm the syntax? Or should I try something different? Thanks in advance
############################R CODE######################
require(tubern)
httr::set_config( config( ssl_verifypeer = 0L ) ) # = Fixes some certificate problems on linux = #
Authentication
yt_oauth("XXX",
"XXX",token = "")
GET STATS VIA TUBERN
tubern_stats <- (get_report(ids = "channel==MINE", metrics = "views,likes,comments,shares", filters = "video==WfFAup0qXrU,4qtXtBc6Akc;country==US",
start_date = "2010-04-01", end_date ="2017-01-01"))
dfx <- data.frame(NULL)
BEGIN DATA FRAME
metrics <- sapply(seq_along(tubern_stats$columnHeaders), function(i){
unlist(tubern_stats$columnHeaders[[i]]$name)
})
data <- as.vector(sapply(seq_along(tubern_stats$rows), function(i){
unlist(tubern_stats$rows[[i]])
}))
youtube.df <- data.frame(metrics, data)
youtube.df$video_id <- "WfFAup0qXrU"
END DATA #FRAME
The text was updated successfully, but these errors were encountered: