Skip to main content

Apple Music library analysis and visualization tool

Project description

GraphMyTunes

License Python 3.13


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 with 3.13, but probably works fine with 3.8 and higher)

Quick Start

Follow these 3 steps to get started analyzing your music library.

Step 1: Install Python and GraphMyTunes

  1. Download and install Python for Mac or Windows.

  2. Use pip to install GraphMyTunes:

     pip install GraphMyTunes
    

Step 2: Export your music library to XML

  1. In the Apple Music app, choose File > Library > Export Library.
  2. Save the XML file to a convenient location.

[!TIP] Tip: I use a date-based filename like 2025-06-01.xml so that I can save multiple snapshots of my library over time.

Step 3: Run GraphMyTunes

  1. Provide the path to the XML you just saved to GraphMyTunes for analysis.

     GraphMyTunes ~/Music/2025-07-05.xml
    
  2. When processing is complete, view your graphs in the output folder.

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 albums by total play time

Top artists by play count
Top artists by play count

Top decades by play count
Top decades by play count

Top genres by total play time
Top genres by total play time

Plays by hour of day
Plays by hour of day

Plays by day of week
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphmytunes-0.1.0.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphmytunes-0.1.0-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

File details

Details for the file graphmytunes-0.1.0.tar.gz.

File metadata

  • Download URL: graphmytunes-0.1.0.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for graphmytunes-0.1.0.tar.gz
Algorithm Hash digest
SHA256 885f3d933f5b333088d6a814011ff413090ef7aed772bd16597eb366c6da7364
MD5 e78b68cb7aebb0bef4c086c9c39cc14e
BLAKE2b-256 3a4f729be7b941cd040ea473dd4058c64736167a3ab0325b0606e0b9ba29b902

See more details on using hashes here.

File details

Details for the file graphmytunes-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: graphmytunes-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 58.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for graphmytunes-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38fff92019d4a3710f8d2f5ee1488cdee0b8bc5979d3a8200d2ecd97684437c9
MD5 121f7dc48ac22f1af59ce9e7dbefd615
BLAKE2b-256 ddcf4c9814c3a63f7ba7440b3fad5f92e860dfb7bcbcdc51fe410bbf64d95be8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page