Main Data History
Show Index Toggle 0 comments
  •  Quick Edit
  • Data-driven, interactive article with d3.js plot and IPython Notebook

    This week we are launching a brand new look for Authorea and a couple of exciting new features aimed at making scientific research more interactive. Since the very beginning of Authorea, we have been striving to make collaborative scientific writing as easy as possible. But in addition to writing, we are also creating a space for new ways of reading science, and executing it.

    For example, if you are a scientist, chances are that you do a lot of data analysis and you might want to visualize and provide access to your data in some fun, new, interactive, more meaningful, data-driven ways, rather than the usual static, data-less plot. There are many ways to create this kind of interactive plots. In this short blog post we will look at two of them.

    Javascript, d3.js, and d3po.js

    Javascipt offers many ways to create data-driven graphics. A popular solution is D3.js, a JavaScript library to create and control web-based dynamic and interactive graphical forms. A gallery of some beautiful d3.js plots can be found here.

    Authorea now supports most Javascript-based data visualization solutions. The example below - Figure \ref{fig:1} - is a plot generated using D3po.js which is a javascript extension of d3.js. D3po allows anyone with no special data visualization skills, to make an interactive, publication-quality figure that has staged builds and linked brushing through scatter plots. What’s even cooler is that the plot below is based on actual data (astrophysics data, yay!). The figure describes how metallicity affects color in cool stars. It is based on work of graduate student Elizabeth Newton and others (Newton 2014). Try clicking and dragging in the scatter plots to understand the power of linked brushing in published figures.

    You should know that this entire visualization is running within Authorea. The Javascript, HTML, CSS and all the data associated with this image are all part of this blog post. They are individual files which can be found by clicking on the folder icon on the top left corner of this page.

    IPython Notebooks

    Another very popular solution among scientists for bundling together research data, analysis, and code is the IPython Notebook. IPython NB is a web-based interactive computational environment where you can combine code execution, text, mathematics, plots and rich media into individual documents. These documents can now be imported, visualized and executed within Authorea!

    So, if you already use IPython Notebook to collect all your analysis and generate your plots, you can now include these notebooks in your published articles on Authorea. Below, in Figure \ref{fig:2}, we show a plot generated by Python code which uses the SymPy, Numpy and Matplotlib packages to perform symbolic manipulations. It is a numerical visualization of symbolically constructed expressions.

    If you hover on the figure below, you will notice a link in the lower left corner: Launch IPython. By clicking it, you will launch an environment where you can visualize and interact with this plot (follow the instructions). For example, you can change the parameters that were used to generate it and see it change interactively. You can also download the entire Notebook and play it with it locally.