YouTube Discourse on Indonesia’s Makan Bergizi Gratis Policy

Published: 29 July 2026| Version 1 | DOI: 10.17632/7r56h6xtdj.1
Contributors:
,

Description

This dataset supports the study “Normative Support and Fragile Legitimacy: A Computational Analysis of Public Discourse on Indonesia’s Makan Bergizi Gratis Policy.” It contains YouTube video metadata, publicly visible comment data, and the Python script used to collect the source material for computational analysis of digital policy discourse. The repository includes: (1) Youtube_Videos_makan_bergizi_gratis_FULL.csv, containing 276 video records from 77 channels; (2) Youtube_Comments_makan_bergizi_gratis_FINAL.csv, containing 35,450 comment records associated with 255 source-video titles; and (3) youtube_scraper.py, which implements keyword-based video discovery, metadata retrieval, channel-size filtering, comment extraction, and CSV/Excel export using yt-dlp and pandas. The scraper was configured with the search phrase “makan bergizi gratis,” a requested maximum of 1,000 search results, a minimum channel size of 10,000 subscribers, and a video-publication-date filter from 1 January 2024 to 31 December 2025. The archived video records range from 24 May 2024 to 31 December 2025, while stored comment dates range from 26 January 2025 to 26 January 2026 because the script filters video publication dates rather than comment-posting dates. Video-level variables include title, URL, channel name, subscriber count, publication date, view count, and platform-reported comment count. Comment-level variables include source-video title, original comment text, displayed username, comment date, like count, detected reply count, and parent-comment information. In the deposited output, all comments are marked as main posts and all reply counts are zero; therefore, this version should not be used for reply-network analysis. The data represent a keyword-based, platform-mediated, non-probability sample and must not be interpreted as representative of Indonesian public opinion. Search ranking, channel eligibility, user self-selection, moderation, deleted content, and comment ordering may affect the observed discourse. Engagement statistics are snapshots captured at collection time and may subsequently change. The comments are predominantly Indonesian and may include informal spelling, abbreviations, emojis, regional expressions, code-switching, sarcasm, and political language. The dataset is intended for research on computational social science, public-policy communication, policy legitimacy, digital public opinion, topic modelling, sentiment analysis, and Indonesian-language social-media discourse. Because the raw data contain usernames and searchable verbatim comments, users must not attempt to identify, contact, profile, or target commenters. Public release and reuse should follow applicable ethical, legal, institutional, privacy, and platform requirements. *) For more details, please check the README.md file.

Files

Steps to reproduce

- The supplied youtube_scraper.py file reproduces the data-acquisition procedure, but a new execution may not return an identical dataset because YouTube search rankings, videos, comments, channel statistics, moderation decisions, and extractor behaviour change over time. Use the deposited CSV files for exact reproduction of the archived corpus and use the script for procedural replication. - Install Python 3 and create an isolated virtual environment. Install the required packages by running: python -m pip install yt-dlp pandas openpyxl. Record the Python, yt-dlp, pandas, and openpyxl versions, together with the operating system, execution date, and local timezone. - Place youtube_scraper.py in an empty working directory. The script automatically creates a directory named dataset. Confirm the parameters in the script: KEYWORD = “makan bergizi gratis”; START_DATE = “20240101”; END_DATE = “20251231”; MIN_SUBSCRIBERS = 10000; and MAX_SEARCH_RESULTS = 1000. The date restriction applies to video publication dates rather than comment dates. - Run the collection procedure using: python youtube_scraper.py. The script searches YouTube, retrieves accessible candidate videos, filters videos by publication date and channel subscriber count, requests available comments using top-comment ordering, extracts selected metadata, and writes CSV and Excel files to the dataset directory. - The expected CSV outputs are Youtube_Videos_makan_bergizi_gratis_FULL.csv and Youtube_Comments_makan_bergizi_gratis_FINAL.csv. Read the archived files using pandas with UTF-8-SIG encoding. The expected dimensions of the deposited version are 276 rows and 7 columns for the video file and 35,450 rows and 7 columns for the comment file. - Validate row counts, column names, missing values, date ranges, duplicate records, and unique source videos before analysis. The current comment output contains 127 exact duplicate rows, all Replies values are zero, and all Is_Reply_To values are “Main Post.” Any deduplication, filtering, or exclusion rule must be documented because it changes the analytical sample. - The current script reproduces data collection only. Reproducing the study’s topic modelling, sentiment analysis, coherence evaluation, Jensen–Shannon divergence, Cramér’s V calculations, qualitative validation, figures, and tables requires additional analysis code, preprocessing rules, Indonesian stopword resources, sentiment lexicons, model parameters, random seeds, theme mappings, and figure-generation scripts. Before rerunning the scraper or redistributing the data, verify compliance with current platform terms, applicable law, institutional ethics requirements, privacy safeguards, and third-party rights.

Institutions

Categories

Social Media, Natural Language Processing, Political Communication, Text Mining, Sentiment Analysis

Licence