days
-6
-5
hours
0
-3
minutes
-5
-2
seconds
-5
-9
search
More than just music

Create charts easily in Python with Spotify’s newest project

Sarah Schlothauer
python
© Shutterstock / MSSA

Are you spending too much time creating complicated charts? Keep it simple. Spotify’s latest creation is a Python library that helps you create charts the clean and easy way. Make your data visualization a breeze.

Spotify Labs does more than just figure out how to recommend you new music based off of your niche playlists. (Although, haven’t we all ruined our algorithim by having a weekend of ABBA songs and now only get Swedish pop recommendations? Just me?) Their most recent creation, Chartify, helps data scientists create charts in Python. Let’s see how this open source Python library works and what use cases it has.

Since Spotify acquires so much data from its users, it is only natural that they created a tool to help visualize it all. Time will tell what other data tools Spotify Labs creates, and how their machine learning and analytics improve.

Who knew our love for music streaming could lead to data science?

Easier charts with Chartify

According to Spotify Lab’s blog, developers created Chartify in order to smooth out workflow for data scientists. Other popular tools (such as Matplotlib) were too complicated and thus, data scientists were spending too long tweaking their charts to be just right.

Spotify Labs claims: “Data scientists routinely spent 30+ minutes meticulously crafting their visualizations. It wasn’t a straightfoward or enjoyable process because data scientists had to spend an excessive amount of time configuring the details.”

The solution is to offer the most common chart types to solve as many cases as possible. When creating a graph, you have control over a few essentials and the rest is restricted. By keeping things simple and effective, data scientists save time and frustration fiddling with their graphs. These smart default styles are perfect if you need to get the job done fast. st

Examples of chart types available are: scatterplot, stacked area, grouped bar chart, combined interval plot & bar plot, stacked bar chart, and KDE plot + Histogram.

python

Source: Github.com/spotify/chartify

Chartify is essentially a wrapper for Bokeh. Bokeh is an interactive visualization library and it should be at the top of your bookmarks for data visualization. (The gallery shows off some impressive interactive creations sure to inspire and impress.) Since Chartify is a Bokeh wrapper, you can always use Bokeh for further customization if need be. Keep it simple, or delve in further.

Need some examples to get the creative juices flowing? Check out examples on GitHub, complete with code to make your own creations.

Install Chartify via pip. Explore it yet? What did you plot?

More data visualization

Need more data visualization tools? Here are a few others that hit the mark.

SEE ALSO: Are you a Python newbie? Meet the IDE for beginners

Chartify isn’t the only data visualization tool under Spotify’s belt. Coördinator is an open source project that turns SVG files into XY coordinates. (You can also try it in your browser.)

One suggestion for Spotify Labs: name creativity is key. Another project called Chartify exists – this one is an open source jQuery plugin for Google Charts. It creates charts from tables and currently supports four types of charts.

Looking for a chart creator and Python is not your language of choice? Chart.js is a “simple yet flexible JavaScript charting for designers and developers”.

We also recommend exploring the JavaScript library D3: Data-Driven Documents. Using SVG, Canvas, and HTML it creates stunning visualizations. Explore the gallery on GitHub and see some of the things you can do with your data.

Author
Sarah Schlothauer

Sarah Schlothauer

All Posts by Sarah Schlothauer

Sarah Schlothauer is an assistant editor for JAXenter.com. She received her Bachelor's degree from Monmouth University in Long Branch, New Jersey and is currently enrolled at Goethe University in Frankfurt, Germany where she is working on her Masters. She lives in Frankfurt with her husband and cat.