Skip to content

Files

Latest commit

 

History

History

felixpherry_typescript

Spotify Data Logger

Overview

This project is a simple script that logs some analysis that is performed on the Spotify song CSV data.

Challenges

  1. Write a script to identify the number of songs in the file.
  2. Write a script that identify the number of songs in the key of E.
  3. Count the occurrences of values in a specified column (e.g., artist names) and determine the most common value.

Getting Started

Clone or Download

Clone or download this repository to your local machine.

Install dependencies

npm install

Running the Script

npm run dev

Output example

The number of songs: 953
The number of songs in the key of E: 62
The most common value for track_name: Flowers. Occurences: 2
The most common value for artist(s)_name: Taylor Swift. Occurences: 34
The most common value for artist_count: 1. Occurences: 587
The most common value for released_year: 2022. Occurences: 402
The most common value for released_month: 1. Occurences: 134
The most common value for released_day: 1. Occurences: 95
The most common value for in_spotify_playlists: 86. Occurences: 3
The most common value for in_spotify_charts: 0. Occurences: 405
The most common value for streams: 156338624. Occurences: 2
The most common value for in_apple_playlists: 0. Occurences: 23
The most common value for in_apple_charts: 0. Occurences: 100
The most common value for in_deezer_playlists: 0. Occurences: 24
The most common value for in_deezer_charts: 0. Occurences: 558
The most common value for in_shazam_charts: 0. Occurences: 344
The most common value for bpm: 120. Occurences: 39
The most common value for key: C#. Occurences: 120
The most common value for mode: Major. Occurences: 550
The most common value for danceability_%: 70. Occurences: 43
The most common value for valence_%: 24. Occurences: 21
The most common value for energy_%: 74. Occurences: 29
The most common value for acousticness_%: 0. Occurences: 60
The most common value for instrumentalness_%: 0. Occurences: 866
The most common value for liveness_%: 11. Occurences: 102
The most common value for speechiness_%: 4. Occurences: 175

License

This project is licensed under the MIT License - see the LICENSE file for details. You are free to modify and distribute the adapted code as needed for your own projects.