IP Project Final
IP Project Final
PROJECT REPORT ON
Spotify Data Analysis
SUBMITTED BY:
PREPARED BY:
GUIDED BY:
MRS.JINCY M NELSON
CERTIFICATE
This is to certify that the project entitled is Spotify Data Analysis the record of bonafide
project work carried out by
Reg No: for the partial fulfilment of class XII (AISSCE) CBSE syllabus requirement in
the laboratory of this school during the academic year 2023-2024 in Informatics Practices.
Date:
SCHOOL STAMP
EXTERNAL EXAMINER
THE HIGH RANGE SCHOOL
INDEX
TABLE OF CONTENTS
01 ACKNOWLEDGEMENT
1
02 INTRODUCTION 2
04 OBJECTIVE 4
05 PROPOSED SYSTEM 5
07 SOURCE CODE 8
08 OUTPUT 20
09 CONCLUSION 31
10 REFERENCE 32
ACKNOWLEDGEMENT
We are very thankful to our guide and Informatics Practices teacher Mrs.Jincy M
Nelson for her vital support, guidance and encouragement without which this
project would not come forth from our side and for helping us in completing the
project by giving ideas, thoughts and making this project easy and accurate.
We also thank our parents for their undivided support and interest who inspired us
and encouraged us, without which we wouldn’t be unable to complete our project.
INTRODUCTION
The Spotify Data Analysis Project: In today’s changing world data analysis has become crucial
in fields such, as business, research and meteorology. This project showcases the role that data
plays in making decisions advancing research initiatives and even predicting weather patterns.
The immense potential of data analysis is evident in this project, which focuses on extracting
insights from music related datasets using Python. At its core Spotify takes stage as an audio
streaming giant with captivating features like seamless song sharing and synchronized lyrics
display.
Throughout this project I delved into the realm of data using Pythons libraries and functions.
From analyzing to visualizing the data this project covers all aspects of data processing.
2
Spotify Data Analysis
THE HIGH RANGE SCHOOL
● HARDWARE REQUIREMENTS
★ PROCESSOR:-
★ MEMORY: - 4.00 GB
★ HARDDISK SIZE: - 36 GB
● SOFTWARE REQUIREMENTS
3
Spotify Data Analysis
THE HIGH RANGE SCHOOL
OBJECTIVE
The primary objective of this project is to analyze Spotify’s music streaming data to uncover key
insights into user preferences, listening behavior, and trends. This project aims to explore various
metrics, such as popular genres, top artists, song popularity, and user engagement patterns, to
help enhance content recommendations, optimize playlist creation, and improve the overall user
experience on the platform
The Spotify Data Analysis Project: In today’s changing world data analysis has become crucial
in fields such, as business, research and meteorology. This project showcases the role that data
plays in making decisions advancing research initiatives and even predicting weather patterns.
The immense potential of data analysis is evident in this project, which focuses on extracting
insights from music related datasets using Python. At its core Spotify takes stage as an audio
streaming giant with captivating features like seamless song sharing and synchronized lyrics
display.
Throughout this project I delved into the realm of data using Pythons libraries and functions.
From analyzing to visualizing the data this project covers all aspects of data processing.
4
Spotify Data Analysis
THE HIGH RANGE SCHOOL
PROPOSED SYSTEM
This system is a Spotify data analysis, which is a menu driven program, from which the user
can choose the desired information he/she needs. The first menu gives the list of topics. The user
should further input the graph they want to view.
5
Spotify Data Analysis
THE HIGH RANGE SCHOOL
6
Spotify Data Analysis
THE HIGH RANGE SCHOOL
1. Planning:
Sometimes called a feasibility study, making a preliminary plan allows
development teams to outline the resources they need to build new infrastructure or
upgrade an existing service. This phase of the life cycle helps teams discover
potential problems and work toward solutions.
2. Analysis:
In the analysis phase, development teams work on the source of the issue or the
reason for the desired change. They can take the ideas they came up with in the
planning phase and identify the functional requirements of their proposed project or
solution to find the best way to achieve their goals.
3. Design:
The third phase of the system development life cycle requires a detailed description
of desired features and operations. This could include screen layouts, business rules
and process diagrams.
4. Implementation:
The sixth stage is implementation. This is where you put the software or program
into production for end-user use. Depending on the project requirements, you might
also use this time to perform a direct cutover, where you move the data and
components from the old system to the new system.
6. Maintenance:
Once the new program or system is functioning, it's important to keep monitoring
for potential bugs or errors. If the system requires updates or if the end-users
request fine-tunes to the system, you can work to apply slight changes or meet
additional user requests.
7
Spotify Data Analysis
THE HIGH RANGE SCHOOL
CSV File
MS EXEL View
Notepad View
8
Spotify Data Analysis
THE HIGH RANGE SCHOOL
Source code
def plot_5_most_streamed_songs(graph_type):
data = pd.read_csv('C:\\Users\\Lab4H\\Desktop\\spotify_data.csv')
song_data = data[data['Type'] == 'Song']
songs = song_data['Label']
streams_in_billions = song_data['Value']
if graph_type == 'line':
plt.plot(songs, streams_in_billions, marker='o', linestyle='-',
color='turquoise', markerfacecolor='red')
plt.title("Top 5 Most Streamed Songs on Spotify - Line Graph")
elif graph_type == 'bar':
plt.bar(songs, streams_in_billions, color='turquoise',
edgecolor='black')
plt.title("Top 5 Most Streamed Songs on Spotify - Bar Graph")
elif graph_type == 'histogram':
plt.hist(streams_in_billions, bins=5, color='turquoise',
edgecolor='black')
plt.title("Top 5 Most Streamed Songs on Spotify - Histogram")
elif graph_type == 'pie':
plt.pie(streams_in_billions, labels=songs, autopct='%1.1f%%',
startangle=90)
plt.title("Top 5 Most Streamed Songs on Spotify - Pie Chart")
plt.xlabel("Songs")
plt.ylabel("Streams (Billions)")
plt.xticks(rotation=45)
plt.show()
9
Spotify Data Analysis
THE HIGH RANGE SCHOOL
def plot_user_distribution(graph_type):
data = pd.read_csv('C:\\Users\\Lab4H\\Desktop\\spotify_data.csv')
user_data = data[data['Type'] == 'User']
years = user_data['Label']
mean_users_per_year = user_data['Value']
if graph_type == 'line':
plt.plot(years, mean_users_per_year, marker='o', linestyle='-',
color='skyblue', markerfacecolor='red')
plt.title("Spotify Users Distribution (2019-2023) - Line Graph")
elif graph_type == 'bar':
plt.bar(years, mean_users_per_year, color='skyblue',
edgecolor='black')
plt.title("Spotify Users Distribution (2019-2023) - Bar Graph")
elif graph_type == 'histogram':
plt.hist(mean_users_per_year, bins=5, color='skyblue',
edgecolor='black')
plt.title("Spotify Users Distribution (2019-2023) - Histogram")
elif graph_type == 'pie':
plt.pie(mean_users_per_year, labels=years, autopct='%1.1f%%',
startangle=90)
plt.title("Spotify Users Distribution (2019-2023) - Pie Chart")
plt.xlabel("Year")
plt.ylabel("Users (Millions)")
plt.grid(True)
plt.show()
def plot_famous_artists_and_songs(graph_type):
data = pd.read_csv('C:\\Users\\Lab4H\\Desktop\\spotify_data.csv')
artist_data = data[data['Type'] == 'Artist']
artists = artist_data['Label']
songs_composed = artist_data['Value']
if graph_type == 'line':
plt.plot(artists, songs_composed, marker='o', linestyle='-',
color='blue', markerfacecolor='red')
plt.title("Number of Songs Composed by Indian Artists - Line
Graph")
10
Spotify Data Analysis
THE HIGH RANGE SCHOOL
plt.xlabel("Artists")
plt.ylabel("Songs Composed")
plt.grid(True)
plt.show()
def plot_foreign_artists(graph_type):
data = pd.read_csv('C:\\Users\\Lab4H\\Desktop\\spotify_data.csv')
foreign_data = data[data['Type'] == 'Foreign Artist']
artists = foreign_data['Label']
no_of_songs = foreign_data['Value']
if graph_type == 'line':
plt.plot(artists, no_of_songs, marker='o', linestyle='-',
color='green', markerfacecolor='red')
plt.title("Number of Songs Composed by Foreign Artists - Line
Graph")
elif graph_type == 'bar':
plt.bar(artists, no_of_songs, color=['r', 'g', 'y', 'b', 'm'])
plt.title("Number of Songs Composed by Foreign Artists - Bar
Graph")
elif graph_type == 'histogram':
plt.hist(no_of_songs, bins=5, color='skyblue', edgecolor='black')
plt.title("Number of Songs Composed by Foreign Artists -
Histogram")
11
Spotify Data Analysis
THE HIGH RANGE SCHOOL
plt.xlabel("Artists")
plt.ylabel("Number of Songs")
plt.grid(True)
plt.show()
def menu():
while True:
print("\n--- Spotify Data Analysis ---")
print("1. 5 Most Streamed Songs on Spotify")
print("2. Distribution of Spotify Users (2019-2023)")
print("3. 5 Most Famous Artists and Their Songs Views")
print("4. Number of Songs Composed by Foreign Artists")
print("5. Exit")
if choice == '1':
graph_type = input("Choose a graph type
(line/bar/histogram/pie): ").lower()
plot_5_most_streamed_songs(graph_type)
elif choice == '2':
graph_type = input("Choose a graph type
(line/bar/histogram/pie): ").lower()
plot_user_distribution(graph_type)
elif choice == '3':
graph_type = input("Choose a graph type
(line/bar/histogram/pie): ").lower()
plot_famous_artists_and_songs(graph_type)
elif choice == '4':
graph_type = input("Choose a graph type
(line/bar/histogram/pie): ").lower()
plot_foreign_artists(graph_type)
elif choice == '5':
print("Exiting...")
12
Spotify Data Analysis
THE HIGH RANGE SCHOOL
break
else:
print("Invalid choice. Please try again.")
13
Spotify Data Analysis
THE HIGH RANGE SCHOOL
output
14
Spotify Data Analysis
THE HIGH RANGE SCHOOL
15
Spotify Data Analysis
THE HIGH RANGE SCHOOL
16
Spotify Data Analysis
THE HIGH RANGE SCHOOL
17
Spotify Data Analysis
THE HIGH RANGE SCHOOL
18
Spotify Data Analysis
THE HIGH RANGE SCHOOL
19
Spotify Data Analysis
THE HIGH RANGE SCHOOL
20
Spotify Data Analysis
THE HIGH RANGE SCHOOL
21
Spotify Data Analysis
THE HIGH RANGE SCHOOL
22
Spotify Data Analysis
THE HIGH RANGE SCHOOL
23
Spotify Data Analysis
THE HIGH RANGE SCHOOL
24
Spotify Data Analysis
THE HIGH RANGE SCHOOL
25
Spotify Data Analysis
THE HIGH RANGE SCHOOL
26
Spotify Data Analysis
THE HIGH RANGE SCHOOL
27
Spotify Data Analysis
THE HIGH RANGE SCHOOL
28
Spotify Data Analysis
THE HIGH RANGE SCHOOL
29
Spotify Data Analysis
THE HIGH RANGE SCHOOL
30
Spotify Data Analysis
THE HIGH RANGE SCHOOL
31
Spotify Data Analysis
THE HIGH RANGE SCHOOL
32
Spotify Data Analysis
THE HIGH RANGE SCHOOL
CONCLUSION
This Spotify data analysis project has provided valuable insights into various aspects of the
platform's usage and trends. By analyzing data on the most streamed songs, user distribution,
popular artists, and contributions from foreign artists, we have highlighted the following key
findings:
1. Top 5 Most Streamed Songs: The analysis revealed the most popular songs on Spotify,
showcasing the significant influence of certain tracks on the global streaming landscape.
These songs amassed billions of streams, reflecting widespread popularity and audience
engagement.
2. User Growth (2019-2023): The simulated user distribution demonstrated consistent
growth in Spotify's user base over the past few years. This growth indicates Spotify’s
increasing penetration in the music streaming industry, driven by expanding markets and
diverse musical preferences.
3. Famous Artists and Song Contributions: The bar chart analysis of popular artists
showed how a small group of highly prolific artists contributes to the platform's vast
music library. These artists continue to shape the music industry through their significant
contributions in terms of the number of songs composed.
4. Foreign Artists' Impact: The pie chart depicting foreign artists' contributions
highlighted the importance of international music on Spotify. Artists like Ed Sheeran,
Rihanna, and Justin Bieber have made a substantial impact on the platform with
numerous hits and a large fan base worldwide.
Overall, this analysis illustrates the dynamics of the music industry as reflected through Spotify’s
data, reinforcing the platform’s role as a leading force in global music consumption. These
findings could be used by music producers, marketers, and Spotify itself to make data-driven
decisions to enhance user experience and promote diverse content on the platform.
33
Spotify Data Analysis
THE HIGH RANGE SCHOOL
REFERENCE
BIBLIOGRAPHY
WEBLIOGRAPHY
● https://www.macrotrends.net/
● https://en.wikipedia.org/wiki/List_of_countries_by_unemployment_rate
● https://chat.openai.com/c/41a5598b-adf1-4514-9ef3-ef9b3298025e
34
Spotify Data Analysis