Data Science in the Browser with Iodide

2b6d7bdd43058e87f53866eb86538a59?s=47 Galuh Sahid
November 03, 2019

Data Science in the Browser with Iodide

Mozilla Tech Speakers Meetup - Singapore

2b6d7bdd43058e87f53866eb86538a59?s=128

Galuh Sahid

November 03, 2019
Tweet

Transcript

  1. Data Science in the Browser with Iodide Galuh Sahid Twitter:

    @galuhsahid
  2. https://www.aarp.org/auto/trends-lifestyle/info-2018/self-driving-cars.html

  3. None
  4. None
  5. Jupyter Notebook

  6. None
  7. Narrative Table Chart

  8. !

  9. ! "

  10. ! " $

  11. None
  12. None
  13. None
  14. Is it just me?

  15. https://hacks.mozilla.org/2019/03/iodide-an-experimental-tool-for-scientific-communicatiodide-for-scientific-communication-exploration-on-the-web/

  16. https://hal.archives-ouvertes.fr/hal-01676633/document “Many analysts simply choose to explain and share their

    analyses using other, more established media, and provide a link, for the “curious”, to the notebook where they performed the analysis in the first place.” Adam Rule, Aurélien Tabard, James Hollan. Exploration and Explanation in Computational Note- books. ACM CHI Conference on Human Factors in Computing Systems, Apr 2018, Montréal, Canada. pp.1-12, 10.1145/3173574.3173606 . hal-01676633
  17. !

  18. ! Deploy in a container

  19. ! Deploy in a container Run locally

  20. The dream

  21. Separate report & source code view

  22. & Hey, can I have that analysis you did yesterday?

    Sure, here is the link. ' & I added some variables that I thought could be useful & the result is better, but could you please help check? This is my link. Yup. No problem, on it. ' Seems like everything is OK! Thanks a lot, this is an awesome work! ' Easy to share & remix
  23. Sounds familiar?

  24. Web pages!

  25. Web technologies!

  26. None
  27. https://alpha.iodide.io/notebooks/154/?viewMode=report View source! Yay!

  28. https://alpha.iodide.io/notebooks/154/?

  29. https://alpha.iodide.io/notebooks/154/?viewMode=report

  30. https://alpha.iodide.io/notebooks/154/?viewMode=report https://jupyter.readthedocs.io/en/latest/architecture/how_jupyter_ipython_work.html What you have = what everyone else has

  31. https://alpha.iodide.io/notebooks/154/?viewMode=report https://jupyter.readthedocs.io/en/latest/architecture/how_jupyter_ipython_work.html Computations happen in the browser! No server-side computation

    What you have = what everyone else has
  32. Bringing data science to the browser unlocks a lot of

    ✨ superpowers ✨ • DOM • WebGL • Canvas • WebVR
  33. Example https://alpha.iodide.io/notebooks/34/?viewMode=report

  34. “But most data scientists use Python, not JavaScript…”

  35. Pyodide Python runtime in the browser via WebAssembly https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scientific-python-stack-to-the-browser/

  36. Use your favorite Python packages • numpy • pandas •

    scikit-learn • nltk • networkx • Complete list: https://github.com/iodide-project/pyodide/tree/ master/packages
  37. Python+JS? Now with even more ✨ superpowers ✨ • Workflows

    that make use of the best of both worlds! Data processing with Python Interactive data visualization with d3.js Example: visualizing complex fraud rings with interactive graph networks
  38. • Workflows that make use of the best of both

    worlds! Data processing with Python Interactive data visualization with d3.js Example: visualizing complex fraud rings with interactive graph networks • Access browser APIs straight from Python! Manipulate DOM without touching JavaScript Python+JS? Now with even more ✨ superpowers ✨
  39. Data science communication matters • Influences how people make decisions

    • We have to make sure that our work is: - Transparent - Reproducible
  40. There are a lot more things to do “We envision

    a future workflow that allows you to do your data munging in Python, fit a quick model in R or JAGS, solve some differential equations in Julia, and then display your results with a live interactive d3+JavaScript visualization... and all that within within a single, portable, sharable, and hackable file.” https://github.com/iodide-project/iodide Contribute to Iodide @ GitHub
  41. Data science + web = yes, please!

  42. References • Iodide @ Mozilla Hacks • Pyodide @ Mozilla

    Hacks • https://alpha.iodide.io/ • Iodide @ GitHub
  43. Thank you!