WORKING DRAFT authorea.com/3904
Main Data History
Export
Show Index Toggle 14 comments
  •  Quick Edit
  • Data-driven, interactive science, with d3.js plots and IPython Notebooks

    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.

    \label{fig:1}. This plot shows the near-infrared 2MASS colors of M dwarfs observed by Newton et al. (2014). One color is plotted on the x-axis and another color is plotted on the y-axis. The stars trace out a main sequence, with some scatter. This plot is the work of A. M. Price-Whelan, J. E. G. Peek, E. R. Newton, M. Borkin, J. Allen, R. Angus, D. Muna, T. Staley.

    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! herh er hreh r

    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