npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ken-e/dataform-youtube

v0.0.12

Published

A dataform package to process Youtube data from the BQ Data Transfer.

Readme

@ken-e/dataform-youtube

A Dataform package for processing YouTube analytics data from Google's BigQuery Data Transfer Service.

Installation

npm install @ken-e/dataform-youtube

Quick start

const youtube = require("@ken-e/dataform-youtube");

youtube({
  startDate: "2025-01-01",

  // Video and playlist title lookup tables
  titlesProject: "my-project",
  titlesDataset: "my_dataset",
  titlesTable: "stg_yt_video_titles",
  playlistTable: "stg_yt_playlist_titles",

  // YouTube data sources (one or more)
  sources: [{
    database: "my-bq-project",
    schema: "youtube_channel",
    suffix: "_"
  }],

  // Target BigQuery datasets
  target: {
    database: dataform.projectConfig.defaultDatabase,
    stagingSchema: "my_staging_dataset",
    outputSchema: "my_output_dataset"
  }
});

Output tables

Channel reports

| Table | Description | |---|---| | ytc_basic | Core video metrics: views, likes, comments, shares, watch time, subscribers | | ytc_combined | Metrics by all major dimensions (location, traffic source, device, OS) | | ytc_demographics | Age group and gender breakdowns | | ytc_demographics_views | Demographics with absolute view counts | | ytc_device_os | Device type and operating system breakdowns | | ytc_playback | Playback location breakdowns | | ytc_province | Province/state-level geographic breakdowns | | ytc_traffic_source | Traffic source breakdowns | | ytc_share_platform | Social sharing service breakdowns | | ytc_annotation | Annotation performance metrics | | ytc_cards | Card performance metrics | | ytc_end_screens | End screen element performance | | ytc_subtitles | Subtitle/caption analytics |

Playlist reports

| Table | Description | |---|---| | ytc_list_basic | Core playlist metrics | | ytc_list_combined | Playlist metrics by all dimensions | | ytc_list_device_os | Playlist device/OS breakdowns | | ytc_list_playback | Playlist playback location breakdowns | | ytc_list_province | Playlist province-level breakdowns | | ytc_list_traffic_source | Playlist traffic source breakdowns |

Data source migration (September 2025)

On September 22, 2025, Google deprecated several YouTube BQ Data Transfer table versions (a2 channel tables and a1 playlist tables) and replaced them with new versions (a3 and a2 respectively). This package handles the migration transparently by reading from both old and new tables with a date-based cutover.

Important: Google changed the view-counting methodology in the new tables. View counts after September 22, 2025 are significantly higher than before and are not directly comparable across the cutover boundary. See the BQ Data Transfer change log for details.

Documentation

See CLAUDE.md for detailed development documentation including architecture, configuration reference, and the source table migration guide.

Google documentation