Live data from Hacker News

Jupyter Notebook 7

blog.jupyter.org

101–110 of 118 posts

Re: Jupyter Notebook 7

#101
post #12

I have never understood the appeal of this. You can generate good looking presentations, but that is all. Is any real science done with this or is it the Powerpoint for PyCon talks?

Good for developing ideas that you can add small code fragments gradually and see results immediately. And if it gets big enough, chances are that you have a good idea that makes it worth the time to refactor your notebook into production code.

I refactor my code into functions as I go.

Then I can easily put them into a Python file and import them from the notebook.

Easy peasy and very nice for iterative development.

Re: Jupyter Notebook 7

#102
Does debugging work for you?

Neither in Notebook nor in Lab can I click in the gutter to set breakpoints. The debugging panel is open, the documentation is clear (except that by default there are no line numbers and you have to activate that), but nothing happens.

Where exactly am I supposed to click?

Re: Jupyter Notebook 7

#103

I am new to the Jupyter ecosystem. Can anyone point me to resources that allow me to generate PDF reports from Jupyter Notebooks? I want to build a template notebook, that has internal code to fetch data from a database, based on command line arguments and then run the notebook and then strip all the code parts and generate a beautiful PDF document.

You want Quarto. https://quarto.org/

Re: Jupyter Notebook 7

#104
post #84

Earlier quoted context omitted.

We have a lot of scientists using Rstudio. It’s not quite the same but you can do it. It lets you view your data frames like a spread sheet and generate graphs. It’s R and I get that Jupiter supports R but it’s always has some issue with some dependency.

Ew. R. No thank you.

I used to think like that. Programmers hate R. But I took a biostatistics class and it really is the best tool for that job. Plus the graphic output can't be beat (ggplot2) and fairly easy to install packages make it quite valuable tool.

Re: Jupyter Notebook 7

#105

I am new to the Jupyter ecosystem. Can anyone point me to resources that allow me to generate PDF reports from Jupyter Notebooks? I want to build a template notebook, that has internal code to fetch data from a database, based on command line arguments and then run the notebook and then strip all the code parts and generate a beautiful PDF document.

You want Quarto. https://quarto.org/

Can I use Quarto in a cell-notebook style? So far it seems like I can only get it compiled into a PDF, which feels different from Jupyter.

I could be completely wrong here, just looking for insight.

Re: Jupyter Notebook 7

#106
post #84

Earlier quoted context omitted.

Ew. R. No thank you.

I used to think like that. Programmers hate R. But I took a biostatistics class and it really is the best tool for that job. Plus the graphic output can't be beat (ggplot2) and fairly easy to install packages make it quite valuable tool.

> it really is the best tool for that job.

Besides the ecosystem, what makes R better than Python or Julia for biostats?

Re: Jupyter Notebook 7

#107

Earlier quoted context omitted.

I used to think like that. Programmers hate R. But I took a biostatistics class and it really is the best tool for that job. Plus the graphic output can't be beat (ggplot2) and fairly easy to install packages make it quite valuable tool.

> it really is the best tool for that job. Besides the ecosystem, what makes R better than Python or Julia for biostats?

Can't speak to julia..

The statistics built in are great. They're just there, less need to find a package (general stats, ttest, chi_squared test...). We tend to use the "tidyverse" packages [1] https://r4ds.hadley.nz/. Bio-python is amazing for manipulating biodata, but once the data is extracted and you need statistics, our scientist seem to use R. I really don't love R's syntax, but I get why they use it. I use python all the time for data wrangling (right now I'm pulling sequences from a fasta file to inject into a table).

Rstudio is like an IDE for your data. You can view the data tables, graph different things etc. If you try the first chapter of the R4data Science book, you can see how get up and graphing and analyzing quite quickly. https://r4ds.hadley.nz/data-visualize.html

Though at this point Python and R are necessary depending on what package/ algorithm you want to use.

There are some good packages for single cell analysis: We use "Seurat".

https://satijalab.org/seurat/articles/get_started_v5.html

Jupyter supports R now with an add in, so its less of an issue.

Re: Jupyter Notebook 7

#108
post #75

I am curious how do you use Jupyter? For me, it used to be Jupyter Notebook. For reasons I cannot pinpoint, I never got convinced to JupyterLab. Sometimes I use Google Colab, primarily for sharing and using GPU for deep learning. Now, when I run it locally, I do it in Visual Studio Code ( https://code.visualstudio.com/docs/datascience/jupyter-noteb... ), since I don't need to jump back and forth between it and the re…

I use jupyter using org-babel inside emacs.

https://github.com/emacs-jupyter/jupyter#org-mode-source-blo...

Re: Jupyter Notebook 7

#109

Earlier quoted context omitted.

You want Quarto. https://quarto.org/

Can I use Quarto in a cell-notebook style? So far it seems like I can only get it compiled into a PDF, which feels different from Jupyter. I could be completely wrong here, just looking for insight.

Quarto is used to convert from code (script or notebook) to formatted output. You can annotate a Jupiter notebook and have Quarto compile that into a PDF. If you are looking for something that changes the look of the notebook itself I don’t think that exists. But you can still include some interactivity when exporting to html.

Re: Jupyter Notebook 7

#110
post #12

I have never understood the appeal of this. You can generate good looking presentations, but that is all. Is any real science done with this or is it the Powerpoint for PyCon talks?

Like everything else in the Python ecosystem, it's half-baked and not composable. People use it for two reasons: a) because they need to get those graphs on the screen and this is the only way b) running ML code on a remote, beefier server.

You are underestimating how useful for exploratory tasks the combination of elements: markdown/code cells + runtime kernel to keep state + persistent results usable from your browser.

Jupyter notebook is neither the first nor the only implementation of such literate approach.

If some code is stable enough for reuse, you can make it composable as any other code: put it into the module/create CLI/web API/etc -- whatever is more appropriate in your case.

Post reply on HN