iTunes Ratings Analysis
About this project
Have an iPod? Using iTunes to
store and rate your music? This will show you
a fancy analysis of your preferences - here's an example
analysis of my music. The analysis takes a little while (5-10 mins)
to run - be patient!
Your iTunes Music Library.xml can be found in the following places:
- Windows: My Documents/My Music/iTunes/iTunes Music Library.xml
- Mac: Music/iTunes/iTunes Music Library.xml
About this project: This project analyzes your iTunes
collections, showing the highest rated artists and albums, etc. A Python
script parses the iTunes Music Library.xml file and stores the information in a
PostgreSQL database, then performs the analysis using a series of SQL queries.
The little charts are based on summize.com
- each color represents a different rating (black is 0, red is 1, etc.). You
can mouse over the colors to see the exact number of songs that had that
rating.
Source files:
- uploadiTunesFile.cgi - the Python script that receives the library file and calls the parsing and analysis methods.
- getiTunesStatus.cgi - returns the status of the session. (including whether it's done or not)
- iTunesInfo.py - Python script that parses the library file and stores it in the database.
- analyzedb.py - Python script that does the analysis on the database and outputs it to an HTML file.
- json.py - Python library for reading and writing JSON
- jquery-1.2.1.min.js - the jQuery JavaScript library.
- sorttable.js - JavaScript library for adding sorting to tables. (from here)
- iTunesRating.js - JavaScript library for polling for status and redirecting to finished analysis page.
- Debug.py - simple Python library for debugging statements.
Optimization process - for more information, see these entries:
Greg's home page