Giter VIP home page Giter VIP logo

msd_youtube_crawler's Introduction

MSD-YouTube Crawler

A crawler to fetch YouTube view-counts for the Million Song Dataset (MSD). \*.npy files for now are crawled data of songs from albums with size 5, i.e., album_lens[5], which include 10,285 albums and 51,425 (10,285*5) songs.

In the cleaned version considering YouTube view-counts availability (track_id_by_alb.npy), there are 7,807 albums and 31,562 songs. In another cleaned version further considering album release time (from MSD), there are 3,384 albums and 13,648 songs details.

Prerequisites

  1. Download the MSD summary file from Here.
  2. Set the constants ALBUMS, SONGS, YT_API_KEY in yt_viewcount.py to corresponding values.
    • ALBUMS: path to the file album_lens.pkl.
    • SONGS: path to the MSD summary file (prerequisite 1).
    • YT_API_KEY: your own YouTube API key.

Files

  • yt_viewcount.py
    • The crawler. Please refer to ArgumentParser and TODOs in this file for further information.
  • raw/
    • yt_view_count.npy
      • Size: (10285, 5)
      • Highest YouTube view-count from search results for each song.
    • upload_time.npy
      • Size: (10285, 5)
      • The time span (months) each song uploaded to YouTube.
    • track_ids.npy
      • Size: (10285, 5)
      • Echo Nest track ID for each song.
    • track_id_by_alb.npy
      • Size: (7807, 2~5)
      • Excluded songs with zero/unknown view-counts, and then albums with fewer than two songs.
  • track_ids.npy
    • Size: (31562,)
    • Flattened version of raw/track_id_by_alb.npy.
  • album_lens.pkl
    • A python dictionary: album_lens[album_len] = [song_id,...], which groups songs in same albums (of same size) together. The song_id is from msd_summary_file.h5, which can be seen as a list of songs with size 1,000,000.
    • For example, album_lens[5] is a list of lists with size 5, i.e., albums with size 5.
  • (ytr/yva/yte).npy
    • Size: 25375/3109/3078 (Sum: 31562)
    • YouTube view-counts.
  • (albs_tr_5/albs_va_5/albs_te_5).npy
    • Size: 6247/780/780 (Sum: 7807)
    • Example
      • albs_tr_5[0] = [0, 1], then ytr[0] and ytr[1] are YouTube view-counts of songs from the same album.
      • track_ids[0] and track_ids[1] are their corresponding Echo Nest track IDs.
  • (valid_albs_tr_5/valid_albs_va_5/valid_albs_te_5).npy
    • Size: 2721/329/334 (Sum: 3384)
    • Further cleaned version of (albs_tr_5/albs_va_5/albs_te_5).npy
    • Excluded albums with songs with different release time (according to MSD).

msd_youtube_crawler's People

Contributors

ockhamsrazor avatar chia-an avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.