Follow

Jupyter, looking for tips and tricks, boosts welcome 

So, computer nerds!

Jupyter: Notebooks/Lab/Books/Kernels etc.

What is your one Jupyter Top Tip™ for a relative newbie, who mainly uses R and is familiar with R Markdown (Bookdown, Blogdown etc.)?

Jupyter, looking for tips and tricks, boosts welcome 

@RaoOfPhysics Here is one: Beware of cell dependencies! Spreading your code over many cells is very good for presentation, but dependencies aren't marked or tracked. So, if you try to run a cell w/out running its dependencies first you'll be in trouble. This often creeps up on you when you're trying to flesh something out.

Jupyter, looking for tips and tricks, boosts welcome 

@canmekik Is that mitigated by running all the cells in order, every time? Because whenever I look at someone else’s notebook with execution numbers for the cells all over the place, it gives me mild anxiety; so I always run all my cells every time, haha!

Jupyter, looking for tips and tricks, boosts welcome 

@RaoOfPhysics I think that's a good rule of thumb, but running everything can be slow. Not to mention that it's unfortunately not a guarantee, as @jrhawley suggests.

Jupyter, looking for tips and tricks, boosts welcome 

@canmekik @jrhawley Ah, noted. Thanks!

Jupyter, looking for tips and tricks, boosts welcome 

@RaoOfPhysics Once you've completed your goal in your notebook, restart the notebook and run everything from scratch, top to bottom, in order.

You may discover that your previous results used some variable that was updated in the wrong order or had some value that wasn't set properly

Jupyter, looking for tips and tricks, boosts welcome 

@jrhawley I always do this because I cannot stand notebooks where the run order is random. :D

Sign in to participate in the conversation
Scholar Social

Scholar Social is a microblogging platform for researchers, grad students, librarians, archivists, undergrads, academically inclined high schoolers, educators of all levels, journal editors, research assistants, professors, administrators—anyone involved in academia who is willing to engage with others respectfully.