
Introducing Chartify: Easier chart creation in Python for data scientists - homarp
https://labs.spotify.com/2018/11/15/introducing-chartify-easier-chart-creation-in-python-for-data-scientists/
======
jofer
Minor gripe - These sort of tools always deride matplotlib a bit, but often
show outright incorrect examples of using it.

Admittedly, the "right" way of doing it is quite clunky as well:

    
    
        ax.xaxis.set(major_formatter=StrMethodFormatter('{:0.0f}%'))
    

The example shown teaches very bad habits. It doesn't change the tick label
formatting at all. It makes the ticks and labels static. There's a big
difference, and it's obvious as soon as you interact with the plot (i.e.
zoom/pan around - you won't get new ticks/labels).

I agree that matplotlib isn't the right choice for web-based visualization,
but let's not pretend it makes static plots. It's a very, very highly
interactive desktop visualization package, and oriented towards building
desktop applications that can produce publication-quality plots.

All that having been said, this looks pretty neat.

~~~
jlelonm
As someone who uses matplotlib to make plots pretty frequently (but also
struggles getting it to do the right thing often, most likely due to
accumulation of bad habits), can you recommend a good resource to learn the
good habits? It seems like there are n different ways to do everything - I'd
love to learn to work more efficiently.

~~~
reasonablemann
Unless you're making high quality prints I would recommend staying away from
matplotlib. That's it's purpose and if you ever use large amounts of data it
slows to a crawl. It's a real shame that it's the default plotter for pandas.
I imagine I've wasted a full 24 hours in total for plots to show up over the
past few years.

------
homarp
Built on top of Bokeh, so if you do need more control you can always fall back
on Bokeh's API.

[https://github.com/spotify/chartify/](https://github.com/spotify/chartify/)

APL2 licensed.

no relation with
[https://chartify.github.io/chartify/](https://chartify.github.io/chartify/)

------
skwb
I have not used a ton of Bokeh, but why would I want to learn yet another
plotting library?

Add this to the end of a list of competing graphics libraries including
ggplot2, seaborn, base matplotlib, etc...

~~~
emblaegh
Bokeh interactive tools are much nicer than matplotlib and its children. Also
it has a js backend so you can more easily integrate into a website.

------
somada141
Finding Seaborn [1] after toiling for hours with Matplotlib for some
convoluted plots was a godsend. Of course the moment you wanted anything off
the beaten path you'd still have to fall back to Matplotlib API but Seaborn
would provide an excellent starting point.

All in all I'm really happy to see high-level wrappers tailored to data-
scientists.

[1]: [https://seaborn.pydata.org/](https://seaborn.pydata.org/)

------
z_open
I did some digging and am still somewhat confused. What does spotify have to
do with these types of projects? Seems like it has nothing to do with their
music streaming business.

~~~
somada141
Spotify gets heaps of data from users so I'm sure they do a bunch of data-
science stuff in the background. For example their `Discover Weekly` feature
is most likely powered by such analytics and possibly some ML.

------
foobarbecue
I guess this is occupying the same space as Holoviews and Plotly (which are
both bokeh wrappers, among other things).

~~~
infinite8s
Plotly isn't a bokeh wrapper. I believe it sits on top of D3.

~~~
foobarbecue
Ah, my bad. I jumped to conclusions because HoloViews has both bokeh and
plotly backends.

