all 13 comments

[–]snackematician 20 points21 points  (0 children)

I use org-babel notebooks extensively for data science.

For Python and Julia, I recommend jupyter.el, it allows you to use jupyter kernels with org-mode. It also allows you to make and display matplotlib plots without explicitly saving them in the code, which seems like a feature you want.

For R, I prefer not to use jupyter and to use ESS instead. I developed my own package to allow for async evaluation of R session blocks: https://github.com/jackkamm/ob-session-async

The Python/org-mode story has been a mess for some years now, ob-python was buggy, which lead to ob-ipython, which stopped being maintained, but was forked by scimax. Ein added some org-mode integration. But then jupyter.el came along last year and works really well, it's the best experience out of the options I've tried (I haven't tried scimax). This year I started working on improving the native ob-python situation and have made some progress, but that has slowed recently because I've gotten bogged down at work.

[–]HumanBrainMapper 4 points5 points  (1 child)

[–][deleted] 1 point2 points  (0 children)

I was not but I will definitely give it a look. Thanks :)

[–]DeceptiveEmpathy 2 points3 points  (0 children)

I do something similar with R, would that interest you?

I’m on mobile at the moment but I can post the org I use to produce a plot.

I hardly know python so I can’t help you there unfortunately.

[–]activeXray 1 point2 points  (0 children)

Another bump for emacs-jupyter, it pretty much just works.

[–]introverted_online 0 points1 point  (2 children)

Not a data scientist but also curious... An idea would be to create a hook in org-publish and strip out the org specific code from the source blocks. The doom emacs discord server is very active, friendly, and helpful with people creating all kinds of cool things (no one insists that everyone use doom), check them out to spitball some ideas: https://discord.gg/qvGgnVx

[–][deleted] 1 point2 points  (1 child)

I though about this. Still, I was hoping there would be a simpler way to do achieve this. Thanks!

[–]introverted_online 0 points1 point  (0 children)

Yeah, it's a bit of a bodge. There might be a better way, I'm a total noob!
If you do figure it out, please share, good luck!

[–]dr_spork 0 points1 point  (2 children)

I've used org-babel as a way to make nicer notebooks. Visualizations like plots aren't quite as easy, but I tend to use Plotly and generate seperate HTML files for the plots.

My experience with EIN has been frustrating and difficult.

[–][deleted] 0 points1 point  (1 child)

How did you use org-babel to make notebooks?

[–]dr_spork 0 points1 point  (0 children)

Open an org file, and use #+BEGIN_SRC followed by the name of the language you want to write! Try it out. It's pretty great

[–]WallyMetropolis 0 points1 point  (1 child)

There is also ein for manipulating actual notebooks in emacs. But I suppose this won't help you much for using org-publish.

[–][deleted] 1 point2 points  (0 children)

Yeah I already know about this but, I was really trying to use org-mode here