YouTube Mod
View dashboards to analyze Youtube channel performance, viewer trends, and geographic insights, and more.
Overview
Dashboards can help answer questions like:
- How many YouTube channels are present in the database?
- How many YouTube channels exist?
- What are the top 10 YouTube channels?
- What are the different categories of the YouTube channels?
- How many new subscribers have joined the channel over the last 30 days?
Documentation
Getting Started
Installation
Download and install Powerpipe and PostgreSQL. Or use Brew:
brew install turbot/tap/powerpipebrew install turbot/tap/postgresql
Install the mod:
mkdir dashboardscd dashboardspowerpipe mod initpowerpipe mod install github.com/turbot/powerpipe-mod-youtube
Configure Database
Download Global YouTube Statistics.csv
Move the downloaded file into the dashboards directory:
mv ~/Downloads/Global YouTube Statistics.csv .
Connect to PostgreSQL:
psql -U <username> -d postgres
Create and connect to a database:
create database youtube;\c youtube
Create a table:
create table youtube_statistics ( rank INT, youtuber VARCHAR(255), subscribers NUMERIC, video_views NUMERIC, category VARCHAR(255), title VARCHAR(255), uploads NUMERIC, country VARCHAR(100), abbreviation VARCHAR(10), channel_type VARCHAR(100), video_views_rank NUMERIC, country_rank NUMERIC, channel_type_rank NUMERIC, video_views_for_the_last_30_days NUMERIC, lowest_monthly_earnings NUMERIC, highest_monthly_earnings NUMERIC, lowest_yearly_earnings NUMERIC, highest_yearly_earnings NUMERIC, subscribers_for_last_30_days NUMERIC, created_year TEXT, -- Changed from INT to TEXT created_month VARCHAR(10), created_date FLOAT, gross_tertiary_education_enrollment_percent NUMERIC, population NUMERIC, unemployment_rate NUMERIC, urban_population NUMERIC, latitude NUMERIC, longitude NUMERIC);
Load the dataset into the table:
\copy youtube_statistics(rank, youtuber, subscribers, video_views, category, title, uploads, country, abbreviation, channel_type, video_views_rank, country_rank, channel_type_rank, video_views_for_the_last_30_days, lowest_monthly_earnings, highest_monthly_earnings, lowest_yearly_earnings, highest_yearly_earnings, subscribers_for_last_30_days, created_year, created_month, created_date, gross_tertiary_education_enrollment_percent, population, unemployment_rate, urban_population, latitude, longitude)from 'Global YouTube Statistics.csv' DELIMITER ',' CSV HEADER ENCODING 'ISO-8859-1';
Browsing Dashboards
Start the dashboard server with the DB connection string:
powerpipe server --database postgres://<username>@localhost:5432/youtube
Browse and view your dashboards at http://localhost:9033.
Open Source & Contributing
This repository is published under the Apache 2.0 license. Please see our code of conduct. We look forward to collaborating with you!
Powerpipe is a product produced from this open source software, exclusively by Turbot HQ, Inc. It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our Open Source FAQ.
Get Involved
Want to help but not sure where to start? Pick up one of the help wanted
issues: