26

Mozilla combines Python and JavaScript to create interactive data science in you...

 5 years ago
source link: https://www.tuicool.com/articles/hit/iYZbuuI
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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.
hacks.mozilla.org

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!)

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.

3iMFZzf.png!web

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK