Giter VIP home page Giter VIP logo

stats_401_proj_1's Introduction

STATS Proj 1


This repo can be used to crawl spotify data, the crawled information is as the following:

metric_space = [
    "trackID",
    "artistID",
    "artistName",
    "album_artist_ID",
    "album_artist_name",
    "track_popularity",
    "artist_popularity",
    "artist_genre",
    "album_release_date",
    "danceability",
    "valence",
    "tempo",
    "energy",
]

Usage:

All the required packages are listed in requirements.txt, you can install by:

pip install -r requirements.txt

The descriptions of optional arguments are as the following

usage: Spotify Data Crawler [-h] [--inputCSV INPUTCSV] [--outputDir OUTPUTDIR]
                            [--batchsize BATCHSIZE] [--clientID CLIENTID]
                            [--clientSecret CLIENTSECRET]

optional arguments:
  -h, --help            show this help message and exit
  --inputCSV INPUTCSV   input csv file which contains track IDs
  --outputDir OUTPUTDIR
                        output directory of the crawled data
  --batchsize BATCHSIZE
                        batch size you want to crawl the data, 50 is
                        recommended and is the maximum of being supported
  --clientID CLIENTID   client ID of your spotify development account
  --clientSecret CLIENTSECRET
                        client secret of your spotify development account

Run the script:

python spotifyCrawl.py \
--inputCSV <input path of your csv file> \
--outputDir <directory to store the output csv file> \
--batchsize <batchsize> \
--clientID <your own clientID> \
--clientSecret <your own clientSecret>

All the above arguments are optional, if not being provided, the default value is set as the following:

inputCSV = "./data/smallSet/data.csv"
outputDir = "./out_data/"
batchsize = 50
clientID = "2f088e29c62846a3975616f763269566"
clientSecret = "bff923971e354eb4b13499a1b1d67d14"

Please be aware that my clientID has limitation of the rate to crawl data and may cause failure

Our crawled data are stored in archivedData/ directory.

stats_401_proj_1's People

Contributors

jinchengheryan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.