Skip to content

eyayaw/ethio-youtube-channels

Repository files navigation

Ethiopian Political YouTube Channels Daily Statistics

This repository contains a Python script that collects daily statistics, such as view count, subscriber count, and video count, from a selected list of Ethiopian YouTube channels that have political proclivities or heavily discuss Ethiopian politics.

The script main.py has been running since January 01, 2023, see ./data/channels-data_01-2023.csv. The repo also includes R scripts for generating charts based on the collected data. You can use this repo to collect daily statistics of other YouTube channels, see the Usage section below.

Table of Contents

Overview

The purpose of this project is to gather daily insights and analyze the impact of Ethiopian political YouTube channels on their audience. By collecting and processing data such as view count, subscriber count, and video count, we can better understand the reach and influence of these channels in the Ethiopian political landscape, and identify which channels are more popular.

View a snapshot of stats
id statistics.viewCount statistics.subscriberCount statistics.videoCount
Abc tv 200828 11600 131
Addis Compass Media / ACM / አዲስ ኮምፓስ ሚዲያ 14583797 72200 1058
AddisWalta - AW 60630014 459000 23112
Adebabay Media 14682322 107000 1035
Alpha Media አልፋ ሚዲያ 9614769 56000 1719
Andafta 317144179 988000 7769
Arat Kilo Media አራት ኪሎ ሚዲያ 712570 16500 90
DW Amharic 261164 9800 256
EBC 508033529 1490000 69427
EMS (Ethiopian Media Services) 94474168 370000 2592
ESAN TV 3087032 42600 106
ESATtv Ethiopia 213553058 699000 11359
EVN for Ethiopia 3051920 46500 242
Ethio Forum ኢትዮ ፎረም 328906250 830000 2103
Ethio News - ኢትዮ ኒውስ 39301147 194000 1836
Ethio News_ኢትዮ ኒውስ ቻናል 2 7504644 70800 251
Ethio Selam 2134367 67000 88
EthioTube 44496132 266000 1925
Fana Television 435002971 1480000 45473
Feta Daily News 249292345 827000 1872
GEBEYANU 14007827 139000 836
Horizon Free Media ሆራይዝን ነፃ ሚዲያ 3583645 49800 195
Mager Media - ማገር 2316530 34300 450
Mengizem Media ምንጊዜም ሚዲያ 8171838 69900 2501
OMN 143027902 683000 12456
Reyot 68142059 263000 2610
Roha 47947539 235000 2078
Terara Network 3727641 52800 285
Tigrai Media House 161231551 373000 6438
VOA Amharic 13280504 151000 7263
Wazema Radio 2692496 50300 1545
Zara Media Network - ዛራ 1291408 143000 0
ebstv worldwide 1360838470 2600000 26042
ዓባይ ዜና - Abbay News 33039618 440000 1979

Snapshot of stats as of 2024-08-01 23:05:10

Requirements

Installation

  1. Clone this repository:

    git clone https://github.com/eyayaw/ethio-youtube-channels.git
  2. Change the directory to the cloned repository:

    cd ethio-youtube-channels
  3. Install the required Python package:

    pip install -r requirements.txt

Usage

  1. To use the script, you’ll need to obtain a Google API key. Follow the instructions in the Google API Console documentation to create a project and obtain an API key. Please read the YouTube Data API getting started.

  2. Set the API key as an environment variable named YOUTUBE_DATA_API_V3_KEY : export YOUTUBE_DATA_API_V3_KEY=your_api_key

  3. Update the  channels-list.csv  file with the list of YouTube channel IDs that you want to collect daily statistics about/from. Add one channel ID per row.

  4. Run the script: python main.py

  5. The script will generate a CSV file named  channels-data_MM-YYYY.csv  (where MM is the month and YYYY is the year, generated automatically as the script runs) in the  data  folder containing the daily statistics for each channel in the  channels-list.csv  file. Additionally, “static” information of the channels given in channels-list.csv will be written to data/channels-info.csv, and will be updated when new channels are added to the list.

Visualizing Data

  1. Install the required R packages by running the following command in the R console: install.packages(c("ggplot2", "data.table"))

  2. Open the  make-plots.R  script and modify the input file name to match the latest CSV file in the  data  folder.

  3. Run the  make-plots.R  script to generate an interactive chart and save it as  chart.html.

  4. Install Quarto and use it to render the  analysis.qmd  file.

Contributing

I highly welcome contributions to this project. If you want to add new features, fix bugs, or improve documentation, please submit a pull request or open an issue.


Inspired by

  1. Corey Schafer’s Python YouTube API tutorials, and
  2. Patrik Loeber’s YouTube Data API tutorials

About

Daily YouTube stats for selected Ethiopian channels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published