Skip to content

Create Spotify playlists from Billboard Hot 100 charts using Python. Choose any year or chart week from a CSV dataset and automatically build a matching playlist with Spotipy.

License

Notifications You must be signed in to change notification settings

samybit/yearwave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YearWave

Billboard Hot 100 to Spotify Playlist

A Python tool that turns Billboard Hot 100 charts into Spotify playlists.

This Python script creates a Spotify playlist of Billboard Hot 100 songs for a specific chart week.
It uses a Billboard chart dataset (CSV) and the Spotipy library to connect to your Spotify account.


Features

  • Loads Billboard chart data from a CSV file (current is until 2025-10-25)
  • Lets you choose a chart week (e.g., 2022-01-01)
  • Searches each track on Spotify
  • Automatically creates a private playlist with the matching songs

Requirements


Installation

  1. Clone or download this repository.

  2. Install dependencies:

    pip install spotipy python-dotenv pandas
  3. Create a .env file in the project directory with:

    SPOTIPY_CLIENT_ID=your_client_id
    SPOTIPY_CLIENT_SECRET=your_client_secret
    SPOTIPY_REDIRECT_URI=http://127.0.0.1:8888/callback
  4. Add the redirect URI (http://127.0.0.1:8888/callback) in your Spotify app settings.


Usage

  1. Place your Billboard CSV file (e.g., hot-100-current.csv) in the same directory.
  2. Run the script:
    python main.py
  3. Enter a date like 2022-01-01 when prompted.
  4. The script creates a private playlist named:
    Billboard Hot 100 - 2022-01-01
    
    in your Spotify account.

Notes

  • The CSV file should follow this structure:
    chart_week,current_week,title,performer,last_week,peak_pos,wks_on_chart
    2022-01-01,1,All I Want For Christmas Is You,Mariah Carey,1,1,50
    
  • Tracks that can’t be matched exactly on Spotify will be skipped.

Example Output

What year (or week) would you like to travel to?
(YYYY-MM-DD or YYYY): 2001
Added 100 songs to the playlist for 2001.

Data source: rwd-billboard-data (CC BY license)

About

Create Spotify playlists from Billboard Hot 100 charts using Python. Choose any year or chart week from a CSV dataset and automatically build a matching playlist with Spotipy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages