<div dir="ltr">For your plotting example in particular, you might look at the Bokeh library <a href="http://bokeh.pydata.org/">http://bokeh.pydata.org/</a><div>It allows you to create html/javascript plots, and do things like use a selection box to choose points, and execute a Python callback on the selection,</div><div>   Jake</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"> <font size="1">Jake VanderPlas</font></div><div dir="ltr"><font size="1"> Senior Data Science Fellow<br></font><div><div><font size="1"> Director of Research in Physical Sciences</font></div><div><font size="1"> </font><span style="font-size:x-small">University of Washington </span><span style="font-size:x-small">eScience Institute</span></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Sep 24, 2015 at 2:59 PM, Doug Blank <span dir="ltr"><<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>It isn't too complicated, if you can format your JavaScript in the kernel language; here is JavaScript talking to Python:</div><div><br></div><div>%%javascript</div><div>var javascript_var = 2 * 4 + 8;<br></div><div>IPython.notebook.kernel.execute("python_var = " + javascript_var);</div><div><br></div><div>Hope that helps.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Doug</div></font></span><div><div class="h5"><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 24, 2015 at 5:44 PM, Kiko <span dir="ltr"><<a href="mailto:kikocorreoso@gmail.com" target="_blank">kikocorreoso@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div>2015-09-24 23:41 GMT+02:00 Wes Turner <span dir="ltr"><<a href="mailto:wes.turner@gmail.com" target="_blank">wes.turner@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><p dir="ltr"><br>
On Sep 24, 2015 4:32 PM, "Kiko" <<a href="mailto:kikocorreoso@gmail.com" target="_blank">kikocorreoso@gmail.com</a>> wrote:<br>
><br>
> 2015-09-24 23:25 GMT+02:00 Wes Turner <<a href="mailto:wes.turner@gmail.com" target="_blank">wes.turner@gmail.com</a>>:<br>
>><br>
>> <a href="https://www.google.com/search?q=ipython+d3" target="_blank">https://www.google.com/search?q=ipython+d3</a><br>
>><br>
>> Vega visualization grammar<br>
>> | Docs: <a href="https://github.com/vega/vega/wiki/Vega-and-D3" target="_blank">https://github.com/vega/vega/wiki/Vega-and-D3</a><br>
>> | Homepage: <a href="https://vega.github.io/" target="_blank">https://vega.github.io/</a><br>
>><br>
>> mpld3: matplotlib + d3<br>
>> | Homepage: <a href="http://mpld3.github.io/" target="_blank">http://mpld3.github.io/</a><br>
>><br>
>> IPython widgets (interactive)<br>
>> | Docs: <a href="https://github.com/ipython/ipython/wiki/widgets" target="_blank">https://github.com/ipython/ipython/wiki/widgets</a><br>
>><br>
>> pythreejs IPython Notebook extension<br>
>> | Src: <a href="https://github.com/jovyan/pythreejs/blob/master/pythreejs/pythreejs.py" target="_blank">https://github.com/jovyan/pythreejs/blob/master/pythreejs/pythreejs.py</a> three.js<br>
>> | Src: <a href="https://github.com/jovyan/pythreejs/blob/master/pythreejs/nbextension/pythreejs.js" target="_blank">https://github.com/jovyan/pythreejs/blob/master/pythreejs/nbextension/pythreejs.js</a><br>
>><br>
>> * [ ] JSON-LD<br>
>>    * <a href="http://json-ld.org/playground/" target="_blank">http://json-ld.org/playground/</a><br>
><br>
> Thanks.<br>
><br>
> Yes, I think all of these allow you to send information from Python to js but I'm talking about the opposite way. For instance, select an area in an openlayers map and then get the coordinates of the area back to Python.</p>
</span><p dir="ltr">IIUC, that's more or less how widget controls operate.</p>
<p dir="ltr">also, here's this:</p>
<p dir="ltr">ipython-jsobject<br>
Src: <a href="https://github.com/jdfreder/ipython-jsobject" target="_blank">https://github.com/jdfreder/ipython-jsobject</a></p>
<p dir="ltr">    JSON-LD (and/or e.g. CSVW) with RDFJS could be helpful: <a href="https://github.com/rdfjs/rdfjs.org" target="_blank">https://github.com/rdfjs/rdfjs.org</a><br>
     * <a href="https://github.com/rdfjs/rdfjs.org/wiki/Projects" target="_blank">https://github.com/rdfjs/rdfjs.org/wiki/Projects</a> #LinkedData<br>
     * <a href="http://www.w3.org/community/rdfjs/wiki/Comparison_of_RDFJS_libraries" target="_blank">http://www.w3.org/community/rdfjs/wiki/Comparison_of_RDFJS_libraries</a><br>
       * [ ] TODO: link these resources</p></blockquote></div></div><div>Thanks, I will review that to check if I can obtain any hints.<br></div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>
<p dir="ltr"><br></p></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/ipython-dev" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>