4 ms·
Show HN: Croquis – plot graphs 100x faster on Jupyter Notebook
- yongjik 5y agoHi all, This is something I built for fun in the past 10 months or so. I wanted to build something lean and fast, and I had trouble finding a good, performant plotting library, where I could just throw a heap of data and see what it looks like... so I decided to build my own. It's still very primitive, but it's fast and I think it can be useful if you want to quickly examine large data (like, up to 1GB or so). Feel free to take a look and tell me what you think!
- hcrisp 5y agoLooks good. Reminds me of bokeh's datashader which rasterized the plot to get really fast speed-ups. Last time I used it the API was finally becoming something I could use for multiline subplots with synchronized x-axes (a must have when plotting time series).
- yongjik 5y agoThanks for the comment. It would be nice to have multiple subplots, though I don't think I'll be able to get there anytime soon... Well, at least I can truthfully say croquis is much easier to try out: I tried following the Datashader tutorial page [1], but after installing tons of libraries, it's still unclear to me how I can just throw, say, five thousand lines, hover over with mouse, and let the plot tell me which line I'm looking at. Maybe it's just me - but in croquis I can do it in six lines (second example in [2]). I know, it's not a fair comparison because that's pretty much the only thing croquis can do, but still... :) [1] https://datashader.org/getting_started/ https://datashader.org/getting_started/ [2] https://github.com/yongjik/croquis/blob/master/doc/tutorial.md https://github.com/yongjik/croquis/blob/master/doc/tutorial....
- hcrisp 5y agoDatashader isn't really meant to be used by itself. Take a look at this holoviews example [1] for a better implementation. That said, I did find the API to have some sharp edges and a few missing features. And there is something to be said for simple syntax. But datashader / holoviews might be a good reference for where you want to go. [1] http://holoviews.org/user_guide/Large_Data.html http://holoviews.org/user_guide/Large_Data.html
- d4rkp4ttern 5y agoIs this only for Jupyter notebooks? If so it may not appeal to a lot of folks who actively dislike working in Jupyter (that’s a whole other debate we wouldn’t want to go into here :)
- yongjik 5y agoCurrently, yes. It works by the frontend javascript code asynchronously asking "tiles" and other info from Python backend (which in turn calls C++), and currently I'm using Jupyter's communication channel ("comm"), so it would require some work to support other frameworks. That said, I'm curious: what other tool would you use to quickly dissect and visualize data? A plain HTTP server? (Of course there's also good old matplotlib, but I think the interactive UI is rather limited...)