Skip to content

Python script to convert .csv from Spotify's API to RDF.

Notifications You must be signed in to change notification settings

Gresh1234/spotify-to-rdf

Repository files navigation

spotify-to-rdf

CC7220 - La Web de Datos, Group 11 Final Project

What is this?

It's a python script to convert .csv data exported from Spotify's Web API, more specifically this dataset by Carlo De Nardin on Kaggle.

How am I supposed to use it?

Well, it's a python script, so you might need it.

Other than that, all you need is pandas and rdflib. You can install both with pip install -r requirements.txt

You can run the script on the command line, providing three optional arguments (in that order): python rdf_converter.py <input file> <output file> <limit>. The default arguments are python rdf_converter.py csv/tracks_genre.csv spotify.ttl 0.

Consider that the input .csv has to be in an appropriate format, the output file has to be a .ttl, and the limit can be a positive or negative integer as per https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.head.html .

About

Python script to convert .csv from Spotify's API to RDF.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages