Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve the tasks using python code please help me 1.Import the Spotify dataset. This contains real data from the Spotify platform about the popularity and

solve the tasks using python code

please help me

1.Import the Spotify dataset. This contains real data from the Spotify platform about the popularity and other characteristics of songs including:

artist: Name of the Artist.

song: Name of the Track.

duration_ms: Duration of the track in milliseconds.

explicit: The lyrics or content of a song or a music video contain one or more of the criteria which could be considered offensive or unsuitable for children. year: Release Year of the track.

popularity: The higher the value the more popular the song is.

danceability: Danceability describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.

energy: Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity.

key: The key the track is in. Integers map to pitches using standard Pitch Class notation. E.g. 0 = C, 1 = C/D, 2 = D, and so on. If no key was detected, the value is -1.

loudness: The overall loudness of a track in decibels (dB). Loudness values are averaged across the entire track and are useful for comparing relative loudness of tracks. Loudness is the quality of a sound that is the primary psychological correlate of physical strength (amplitude). Values typically range between -60 and 0 db.

mode: Mode indicates the modality (major or minor) of a track, the type of scale from which its melodic content is derived. Major is represented by 1 and minor is 0.

speechiness: Speechiness detects the presence of spoken words in a track. The more exclusively speech-like the recording (e.g. talk show, audio book, poetry), the closer to 1.0 the attribute value. Values above 0.66 describe tracks that are probably made entirely of spoken words. Values between 0.33 and 0.66 describe tracks that may contain both music and speech, either in sections or layered, including such cases as rap music. Values below 0.33 most likely represent music and other non-speech-like tracks.

acousticness: A confidence measure from 0.0 to 1.0 of whether the track is acoustic. 1.0 represents high confidence the track is acoustic. *instrumentalness: Predicts whether a track contains no vocals. "Ooh" and "aah" sounds are treated as instrumental in this context. Rap or spoken word tracks are clearly "vocal". The closer the instrumentalness value is to 1.0, the greater likelihood the track contains no vocal content. Values above 0.5 are intended to represent instrumental tracks, but confidence is higher as the value approaches 1.0.

liveness: Detects the presence of an audience in the recording. Higher liveness values represent an increased probability that the track was performed live. A value above 0.8 provides strong likelihood that the track is live.

valence: A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence sound more negative (e.g. sad, depressed, angry).*

tempo: The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.

genre: Genre of the track.

Import the CSV file into a Pandas DataFrame.

If you completed the Spotify-based assessment in the last chapter, recall that popularity had a significant correlation with duration_ms, explicit, and instrumentality. Let's investigate these relationships further.

Create a .scatterplot() with duration_ms on the x axis and popularity on the y axis.

[ ]

2.Next, create a .regplot() for the exact same relationship outlined in the question above. What does the relationship look like now with the regression line added? [ ] 3.Create the same .regplot() using instrumentalness as the feature (x axis). Calculate the regression equation and place the equation, R squared, and p-value as embedded text somewhere in the plot. [ ] 4. Repeat the .regplot() above using 'explicit' as the feature [ ] 5.Calculate the F stats and p-values for both measures of heteroscedasticity covered in this chapter for the relationship between instrumentalness and popularity [ ] 6. Create a 4D scatterplot using instrumentalness, popularity, and loudness for x, y, and z. Use explicit as the color. [ ] refer this screenshot for the above tasks image text in transcribed 
 
 
 
 
 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Personal Finance An Integrated Approach

Authors: Bernard J. Winger

4th Edition

0198520972, 9780132696302

More Books

Students also viewed these Finance questions

Question

Explain Ferranti Effect and how to reduce it

Answered: 1 week ago

Question

EXPLAIN THE EVOLUTION OF ELECTRIC POWER SYSTEMS

Answered: 1 week ago

Question

=+1. How can the process of movie utilization be described?

Answered: 1 week ago