Visualize and share data!

Mozilla combines Python and JavaScript to create interactive data science in your browser

Sarah Schlothauer
© Shutterstock / Marish

Even though scientific research has come so far, how we share that research has stayed mostly the same. Mozilla’s latest experiment, Iodide, hopes to change that! Create interactive cell-based notebooks in Python or JavaScript and share your research as easy as sharing a web URL. See what the future of data exploration holds.

Mozilla is most known for pioneering your web browsing habits (long live Firefox!), and now it is experimenting with scientific documentation. Iodide is an open source experimental tool for scientific communication and exploration on the web. It helps scientists write interactive documents with an interactive workflow. Grab your Python code, let’s bring it to the browser.

Will we say goodbye to outdated scientific publishing methods? Wave auf wiedersehen to stagnant PDFs, let’s see how beautiful the future can be.

Living docs

First of all: What is Iodide (besides one of  largest monatomic anions)? From Mozilla’s announcement blog:

Beyond being just a programming environment for creating living documents in the browser, Iodide attempts to remove friction from communicative workflows by always bundling the editing tool with the clean readable document. This diverges from IDE-style environments that output presentational documents like .pdf files (which are then divorced from the original code) and cell-based notebooks which mix code and presentation elements. In Iodide, you can get both a document that looks however you want it to look, and easy access to the underlying code and editing environment.

SEE ALSO: JavaScript is Python developers’ best friend, report shows

Iodide notebooks are written in the JSDM (JavaScript MarkDown) file format, inspired by MATLAB cell mode. The markdown format supports cells written in JavaScript, CSS, Markdown and HTML, and Python.

Enter Pyodide: the dream child of scientists and developers. Pyodide compiles the Python science stack to run in WebAssembly. Mozilla also helpfully added Numpy, Pandas, and Matplotlib – the three most popular modules in the science ecosystem. (This may also be used in a standalone environment outside of Iodide. So, if you want to run Python in a browser, have at it!)


Read also: An introduction to the Python programming language

When Guido van Rossum developed Python, he wanted to create a “simple” programming language that bypassed the vulnerabilities of other systems. Due to the simple syntax and sophisticated syntactic phrases, the language has become the standard for various scientific applications such as machine learning.


A glimpse of the future

Why is this important? Obviously, Iodide is impressive from a programming standpoint.

But, it’s also a great stride forward in streamlining workflows and and making research more accessible, both to publish and to read. Since the design is fairly user intuitive, anyone can learn how to use Iodide and start creating documents. The documents created in Iodide are easy to browse and gather information, so you don’t need any technical knowledge to reap the rewards of someone’s research. Since it works in the browser, this makes it easy to share, view, and interact with.

Scientific research docs should be accessible by everyone! With this tool, it will be as easy as sharing a URL with someone.

SEE ALSO: Web scraping with Python – A beginner’s guide

Creating a new report is easy, with a pane for both your editor and a live preview. When sharing the notebook with someone who doesn’t know how to program, there’s a button for just showing the report view.

In the future, Mozilla hopes to add simultaneous notebook editing and commenting (much like Google docs) and fork/merge workflow like GitHub. This has potential to enable a whole new field of scientific collaboration between research teams.

Discussions on adding Julia and R to the mix are also in progress.

Create your own notebook

Wanna contribute? Help usher in this new age of interactive scientific papers. (Iodide uses Jest, a JavaScript testing framework.) Check out the repo on GitHub here and start your pull requests.

Find some beautifully crafted examples here, including the impressive World Happiness Report. Start churning the creative juices and think about how you can visualize your data for web browsers.

Test out the demo and play around with the notebook. Be aware that it’s still in its alpha stages, so don’t throw any crucial research into this build just yet.

The tour will give you an interactive demo where you can see in real time how easy it is to use. We played around with the JavaScript notebook, but it’s available in Python as well.

Sarah Schlothauer

Sarah Schlothauer

All Posts by Sarah Schlothauer

Sarah Schlothauer is the editor for She received her Bachelor's degree from Monmouth University, West Long Branch, New Jersey. She currently lives in Frankfurt, Germany with her husband and cat where she enjoys reading, writing, and medieval reenactment. She is also the editor for Conditio Humana, an online magazine about ethics, AI, and technology.

Inline Feedbacks
View all comments