====== Jupyter, IPython Notebooks et JupyterLab ====== * Jupyter a succédé à IPython Notebook * Jupyter est installé par défaut avec la distribution python Anaconda. C'est la manière la plus adéquate d'utiliser Jupyter. * Sinon, on peut utiliser facilement les notebooks Jupyter sur la plateforme [[https://notebooks.azure.com/|Microsoft Azure notebooks]], avec un code utilisateur UMONS ou un autre compte à définir. * Avec un compte Google, on peut aussi utiliser [[https://colab.research.google.com/notebooks/welcome.ipynb]] qui est en fait une forme d'utilisation de Jupyter * Autres solutions : * [[https://deepnote.com/|Deepnote]] est un outil avancé permettant de travailler en équipe sur un notebook * [[https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/notebooks-parent.html|IBM DataPlatform Notebooks]] * Kaggle, Amazon Sagemaker,... * Le successeur de Jupyter est en cours d'élaboration, et s'appelle Jupyterlab ===== Liens officiels ou populaires ===== * Le présent : * [[https://jupyter.org/|Jupyter]] * [[https://jupyter.org/documentation|Documentation de Jupyter]] * [[https://nbviewer.jupyter.org/|nbviewer]], pour partager une vue statique d'un notebook * Le passé (récent) : * [[http://ipython.org|IPython notebook]] * [[http://ipython.org/ipython-doc/stable/index.html|Documentation courante]] * [[http://ipython.org/ipython-doc/stable/interactive/htmlnotebook.html|Documentation IPython Notebook]] * L'installation en pratique : * [[https://anaconda.org/]], Jupyter est intégré à la distribution [[wp>Anaconda_(Python_distribution)|Anaconda]] * Le futur : * [[https://github.com/jupyterlab/jupyterlab|JupyterLab]] * Jupyter book * [[https://jupyterbook.org/intro.html]] * [[https://blog.jupyter.org/announcing-the-new-jupyter-book-cbf7aa8bc72e|Announcing the new Jupyter Book]] Chris Holdgraf, Medium, Aug 12, 2020 * Sélections d'exemples : * [[https://github.com/jupyter/jupyter/wiki/A-gallery-of-interesting-Jupyter-Notebooks|A gallery of interesting Jupyter Notebooks]] * [[http://nb.bianp.net/sort/views/|Notebook Gallery, links to the best IPython and Jupyter Notebooks]] * [[https://try.jupyter.org/]] * Colab (google) : * [[https://levelup.gitconnected.com/google-colab-what-is-it-how-to-use-it-and-why-should-i-care-721bb8a88c90|Intro to Google Colab]] Erich Hohenstein, Medium, 14/04/2022 * [[https://medium.com/@valeria.aynbinder.edu/google-colab-a-tool-every-python-developer-and-data-scientist-should-add-to-their-toolbox-186b01534402|Google Colab — a tool every Python Developer and Data Scientist should add to their toolbox - 13 amazing features and usage tips]] Valeria Aynbinder, 29/04/2022, Medium ===== Exemples pour débuter ===== * {{:teaching:progappchim:jupyter_primer_in_jupyter-02.ipynb}} * {{ :teaching:progappchim:jupyter_widgets-01.ipynb |}} * {{:teaching:progappchim:jupyter_widgets-maxwell-01.ipynb}} * {{ :teaching:progappchim:animationembedding-03.ipynb |}} * {{teaching:progappchim:animationembedding-03.ipynb}} ===== Avis, présentations, revues, articles,... : ===== * Présentations : * [[https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebook|Jupyter Notebook Tutorial: The Definitive Guide]] (datacamp, 2016) * [[https://www.datacamp.com/community/blog/jupyter-notebook-cheat-sheet|DataCamp Cheat Sheet]] ===== Vidéos ===== * [[https://www.youtube.com/watch?v=rc9uvLgwPRA|Juan Luis Cano: Jupyter (IPython); How a notebook is changing science]] * [[https://www.youtube.com/watch?v=2ygyAgYLG_o|10 Things You Really Should Know About Jupyter Notebooks]] * [[https://github.com/deepsense-ai/pydatawarsaw-notebooks]] ===== Utilisations avancées ===== * Visualisation de données : * Matplotlib * [[https://towardsdatascience.com/how-to-produce-interactive-matplotlib-plots-in-jupyter-environment-1e4329d71651|How to produce Interactive Matplotlib Plots in Jupyter Environment]] ([[https://github.com/matplotlib/ipympl]]) * {{ :teaching:progappchim:animationembedding-03.ipynb |}} : avec des animations des graphiques matplotlib * [[http://bokeh.pydata.org/en/latest/|Bokeh]] * [[https://nbviewer.jupyter.org/github/plotly/python-user-guide/blob/master/Index.ipynb|Plotly]] * [[https://nbviewer.jupyter.org/github/lightning-viz/lightning-example-notebooks/blob/master/index.ipynb|lightning]] * Jupyter widgets (ipywidgets) * [[http://ipywidgets.readthedocs.io/en/stable/index.html|Documentation officielle (stable)]] * Articles : * [[https://towardsdatascience.com/interactive-graphs-in-python-830b1e6c197f|Interactive Graphs in Python - An incredibly quick and easy extension to Matplotlib]] (exemple simple avec matplotlib) * **Exemples** : * {{ :teaching:progappchim:jupyter_widgets-01.ipynb |}} : sinusoïde à fréquence ajustable * {{ :teaching:progappchim:jupyter_widgets-maxwell-01.ipynb |}} : Distribution de vitesses de Maxwell (visualisation interactive avec deux interactions simultanées, masse et température) * {{ :teaching:progappchim:beat_frequencies.ipynb |}} : [[wp>fr:Battement_(physique)|battement]] sonore dû à la superposition de deux fréquences proches * {{ :teaching:progappchim:basic_interactor_demo.ipynb |}} : avec la librairie graphique Bokeh * [[https://github.com/ipython-contrib/jupyter_contrib_nbextensions|Jupyter notebook extensions]], add functionality to the Jupyter notebook using Javascript extensions loaded locally in your browser. * Installer des librairies à partir d'un notebook Jupyter : [[http://jakevdp.github.io/blog/2017/12/05/installing-python-packages-from-jupyter/index.html|Installing Python Packages from a Jupyter Notebook]] * Exemples en chimie : * {{ :teaching:progappchim:chemical_elements_data-01.ipynb |}} : librairie python sur les éléments chimiques et visualisation d'une propriété * {{ :teaching:progappchim:jcamp-dx_ir-file-reading-01.ipynb |}} : Lecture de fichiers IR (spectres de HCl et CO) * [[http://nbviewer.jupyter.org/github/lmmentel/ase-jnb/blob/master/ase-html.ipynb|Viewing ase structure using HTML]] (lukasz Mentel) * FIXME (à classer) * [[http://kazuar.github.io/jupyter-widget-tutorial/|Creating a Jupyter notebook widget]] * [[https://github.com/maartenbreddels/ipyvolume/|Ipyvolume]], 3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL * [[http://www.countingcalculi.com/explanations/google_sheets_and_jupyter_notebooks|Integrate Google Sheets and Jupyter Notebooks]] * [[https://towardsdatascience.com/create-a-simple-app-quickly-using-jupyter-notebook-312bdbb9d224|Create a Simple App Quickly Using Jupyter Notebook - A guide for data scientists and others who would like to turn their Python functions into an interactive app]] Andras Gefferth, Medium, 04/01/2022 * Spécificités Microsoft Azure Notebooks : * [[https://notebooks.azure.com/help/jupyter-notebooks|aide]] (packages install, persistance, terminal,...- * https://www.scoop.it/t/best : * https://www.nature.com/articles/d41586-018-07196-1 * https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/ * https://blog.jupyter.org/jupytercon-2018-nyc-august-21-25-5571d7454d5b * [[http://nbviewer.jupyter.org/]] ===== JupyterLab ===== * [[https://towardsdatascience.com/how-to-setup-your-jupyterlab-project-environment-74909dade29b|How to Setup Your JupyterLab Project Environment]] ===== Références : ===== * [[https://jupyterhub.readthedocs.io/en/latest/index.html|JupyterHub]], ou comment installer un serveur de Jupyter notebooks * On en parle dans Nature : * [[https://www.nature.com/news/programming-pick-up-python-1.16833]] * [[https://www.nature.com/news/interactive-notebooks-sharing-the-code-1.16261]] * [[https://www.nature.com/articles/d41586-018-07196-1|Why Jupyter is data scientists’ computational notebook of choice - An improved architecture and enthusiastic user base are driving uptake of the open-source web tool]] Jeffrey M. Perkel, Nature 563, 145-146 (2018) DOI: 10.1038/d41586-018-07196-1