viewCount how many times has the video been
viewed?likeCount how many times has the video been liked?dislikeCount - how many times has the video been
disliked?favoriteCount - how many times has the video been
favorited?commentCount - how many comments on the video?knitr::kable(youtube)
| video | viewCount | likeCount | favoriteCount | commentCount |
|---|---|---|---|---|
| XN_QPRrJZAw | 7 | 0 | 0 | 0 |
| YkYnni-WuaQ | 54 | 0 | 0 | 0 |
Follow the steps from the Google authentication section and make sure that the account you have authenticated has access to the YouTube videos you wish to collect.
Go to a video you’d like to collect data from. The URL should look something like this:
https://www.youtube.com/watch?v=<YOUTUBE_VIDEO_ID_HERE>
Extract the YouTube Video ID from the URL and put it in the
video_ids section of the
_config_automation.yml file. Do this for each video you’d
like to collect data from and separate the IDs with commas. Delete the
example IDs we have put there as placeholders.
###### YouTube ######
refresh-youtube: yes
video_ids: [ XN_QPRrJZAw, YkYnni-WuaQ ]
youtube_googlesheet:
In the
_config_automation.yml file, make sure that
refresh-youtube is set to “yes”.
In video_ids, specify the
YouTube Video IDs for the videos you’d like to collect data from.
Separate video IDs with commas. Delete the example IDs we’ve put
there.
Optionally, if you are saving data to
Google, specify a googlesheet ID in youtube_googlesheet
where you’d like the YouTube data to be saved. This will only be
relevant if you’ve set data_dest to
google.
In order to customize the data you are downloading from your YouTube
you can modify the refresh-scripts/refresh-youtube.R script
in your repository.
You can take a look at the metricminer
R package documentation for more details about the functions and
what is possible.
If you have a metric need that is not currently fulfilled by
metricminer or metricminer-dashboard we
encourage you to file a
GitHub issue with us and let us know about your new feature idea (or bug
report).