Reactive Data Analysis with Julia in Pluto Notebooks | by René | Towards Data Science

Pluto is a lightweight and easy to use reactive notebook for the Julia language. In this story I will share my experience with Pluto, especially the five features I love most.
Getting started with Pluto is easy. You just add the Pluto package to your project environment and you are good to go. Start Pluto by typing Pluto.run() from the Julia REPL and Pluto opens in your default web browser.
In my workflow I usually navigate to my project directory and start Pluto with the command:
julia --threads auto --project=. -e "using Pluto; Pluto.run()"
There a many thing to love about coding in Julia with Pluto notebooks. Based on my experience with Pluto this are the 5 features I love most for Exploratory Data Analysis (EDA).
A key feature of Pluto is it’s reactive nature. When changing a function or variable, Pluto automatically updates all affected cells. No need the remember which cells to execute and in which order. Pluto does all that for you automagically so you can focus on analyzing data. That’s a huge plus.
When you execute a cell (by pressing ctrl + enter or shift + enter) it shows the execution time of that cell. Very handy for code optimization. A cell can also be execute by pressing the little ▶️ button to the lower right of the cell.
To enhance the reactive nature of Pluto notebooks even further, there is support for interactive HTML-widgets out-of-the-box. By using widgets, you can minimize the times you needs to change variable values in your code manually.
Lots of HTML-widgets are supported. To make thing even more easy to use, there is a package — called PlutoUI — which has convenient Julia objects for some of the widgets. Instead of using @bind p html"<input type=range min=1 max=10>" you can use @bind p Slider(1:10). Here a an example of a combination of HTML-widgets and widgets supported by the PlutoUI package.
In Pluto, you can chose any cell order you like. It is also possible to hide cells. So for your final notebook, you can move helper functions to the end of your notebook and move the interactive data visualizations to the top. That does focus the attention of the reader to the message you want communicate. In more traditional notebooks, the most interesting part for the average reader comes at the end of a notebook.
A Pluto notebook is stored as pure Julia code. Without output, figures or whatsoever. Just plain Julia code. This is great for version control and comparing source files. I saved the notebook as notebook.jl. In this text file, each notebook cell has a unique identifier. At the and of the file you find the cell order.
Pluto has a live documentation feature. It shows documentation while coding. Can be very helpful! Here’s how it works. No interruption from your workflow, just keep coding :-)
There is a lot more to say about Pluto notebooks. About it’s support of markdown and LaTeX, options for exporting to HTML and PDF. No hidden state, no hidden bugs.
At any instant, the program state is completely described by the code you see. —Fons van der Plas and Mikołaj Bochenski (creators)
Pluto is a relative new project with frequent new updates and features. More information on the project is available on its GitHub page. It is a great project and definitely worth trying. Let me know your thoughts.