Apple Music library analysis and visualization tool
Project description
- Overview
- Requirements
- Quick Start
- Featured Analyses
- Limitations and scope
- Support
- Contributing
- License
Overview
GraphMyTunes builds insightful visualizations using the metadata in your Apple Music (formerly known as iTunes) library. Its goal is to provide data to help you better understand your music listening and curation habits.
Requirements
- Apple Music app for Mac or Windows
- Python (tested primarily with 3.13, but probably works fine with 3.9 and higher)
Quick Start
Follow these 3 steps to get started analyzing your music library.
Step 1: Install Python and GraphMyTunes
-
Download and install Python for Mac or Windows.
-
Use pip to install GraphMyTunes:
pip install GraphMyTunes
Step 2: Export your music library to XML
- In the Apple Music app, choose File > Library > Export Library.
- Save the XML file to a convenient location.
[!TIP] Tip: I use a date-based filename like
2025-07-05.xmlso that I can save multiple snapshots of my library over time.
Step 3: Run GraphMyTunes
-
Provide the path to the XML you just saved to GraphMyTunes for analysis.
GraphMyTunes ~/Music/2025-07-05.xml -
When processing is complete, view your graphs in the
outputfolder.
Featured Analyses
GraphMyTunes includes 40+ built-in ways to analyze your music collection, including but not limited to:
Top albums by total play time
Top artists by play count
Top decades by play count
Top genres by total play time
Plays by hour of day
Plays by day of week
Limitations and scope
-
At this time, GraphMyTunes development is focused around Apple Music only. There are likely other solutions that serve those with Spotify, Amazon, Pandora, or Last.fm libraries.
-
GraphMyTunes is limited by the metadata exported by the Music app. Specifically, the exported XML does not include every date/time you played a track; it only includes the most recent play date/time. Therefore, GraphMyTunes will not be able to surface some listening trends (for example, finding songs you used to listen to a lot but now listen to infrequently).
-
GraphMyTunes does not include single-metric metadata rankings that can easily be done in the Music app itself (for example, listing the top tracks by play count). If you want these, go to the Music app's "Songs" view, adjust the view options to include the desired columns, and sort ascending or descending by that column. GraphMyTunes aims to provide ways to aggregate or group data in ways that the Music app cannot do.
Support
Found a bug or have a suggestion? First check to see if somebody has already opened a similar issue on GitHub. If not, feel free to open one.
Contributing
Contributions are welcome! You may submit pull requests on GitHub. Please include a detailed description of the change being implemented, and consider including unit tests for any new features. See CONTRIBUTING.md for details.
License
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphmytunes-1.0.0.tar.gz.
File metadata
- Download URL: graphmytunes-1.0.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a76fff2a6a68cefe186833444c5fbd41e759c40c7e728d3fcc783cecc9cbb3db
|
|
| MD5 |
e82c6706531318daaa4b9ebcf0c112bc
|
|
| BLAKE2b-256 |
a0779200f845742b906a7da42f81b14b4b0c747bc1aa3f6ac3657c2a82e7d094
|
File details
Details for the file graphmytunes-1.0.0-py3-none-any.whl.
File metadata
- Download URL: graphmytunes-1.0.0-py3-none-any.whl
- Upload date:
- Size: 63.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38e64df06f3771692f4460bbb33cac6dff777fbb91329923b9f8e7bcfe1d07f1
|
|
| MD5 |
a791fd1b7043cd9f36d47c5e92b06662
|
|
| BLAKE2b-256 |
8725d92ea0c9bdff855f8b9d4d92b0f600c604f878d7a2de21e97d4666ff6852
|