1 year ago

#376999

test-img

Johns Inos

Extracting channel statistics for multiple channel ids in dataframe

I have a dataframe of YouTube video statistics containing multiple channel ids (i.e. ids of channels with which each video is associated). Nearly 400 channel ids in the dataframe. I am trying to extract the channel statistics through the following code

channel_stats <- get_channel_stats(channel_id = "UCCoIjOuBJ86zWAeoh0lp5Bw")

But the above code requires imputing of individual channel ids (as in code).

Is there any method to automate it? So that it can automatically scrape the channel statistics for each channel id in the dataframe.

structure(list(video_id = c("0TNgNxUovwc", "tAo-Yn2sENI", "4Y9tK-8aXZQ", "SFGtT4vBEQ4", "dkl_51r17BI", "aA8cOLkjJoc"), publishedAt = c("2021-02-14T05:40:53Z", "2021-02-16T20:02:47Z", "2020-12-30T15:07:06Z", "2021-02-02T23:15:01Z", "2021-03-21T23:30:17Z", "2021-03-16T01:35:56Z"), channelId = c("UCq0grzC77X9UZd9xngQRTjg", "UCew5br5cO1ZKO7Z_F1WA8Bg", "UCCoIjOuBJ86zWAeoh0lp5Bw", "UCxcTeAKWJca6XyJ37_ZoKIQ", "UCCoIjOuBJ86zWAeoh0lp5Bw", "UCWKhaRyXJSvt4m2sizsSNsA")))

r

dataframe

youtube

data-analysis

data-mining

0 Answers

Your Answer

Accepted video resources