-
Notifications
You must be signed in to change notification settings - Fork 0
/
indie_so_white.py
35 lines (26 loc) · 989 Bytes
/
indie_so_white.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Getting data
import requests # to access the APIs
import json
import unicodecsv as csv
from pprint import PrettyPrinter
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
# Analyzing data
import pandas as pd
import numpy as np
import scipy
from scipy.stats import ttest_ind
import secret # get API keys
import music_data
# Inspiration: https://newrepublic.com/article/121437/why-indie-music-so-unbearably-white
def main():
# definitely_indie_artists = ["Bjork"]
# possible_indie_artists = ["SZA", "FKA Twigs", "Dawn Richard"]
# artists = definitely_indie_artists + possible_indie_artists
definitely_indie_artists = ["Dirty Projectors", "Vampire Weekend"]
possible_indie_artists = ["Valerie June"]
artists = definitely_indie_artists + possible_indie_artists
music_data.get_data("indie.csv", artists)
music_data.analyze_data("indie.csv", definitely_indie_artists, possible_indie_artists, "indie_comparison.txt")
if __name__ == '__main__':
main()