The following [[https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/][webpage]] lists several Jupyter tricks (in particular, it
The following [[https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/][webpage]] lists several Jupyter tricks (in particular, it
illustrates many =Ipython magic= commands) that should improve your
illustrates many =IPython magic= commands) that should improve your
efficiency (note that this blog post is about two years old so some of
efficiency (note that this blog post is about two years old so some of
the tricks may have been integrated in the default behavior of Jupyter
the tricks may have been integrated in the default behavior of Jupyter
now).
now).
...
@@ -33,27 +33,33 @@ Note that this =%%R= notation indicates that R should be used for the whole cell
...
@@ -33,27 +33,33 @@ Note that this =%%R= notation indicates that R should be used for the whole cell
an other possibility is to use =%R= to have a single line of R within a
an other possibility is to use =%R= to have a single line of R within a
python cell.
python cell.
** Other languages
** Other languages
For any reason, you may be unsatisfied with the use of R or of
Jupyter is not limited to Pytyhon and R. Many other languages are available:
Python. Many other languages are available:
[[https://github.com/jupyter/jupyter/wiki/Jupyter-kernels][https://github.com/jupyter/jupyter/wiki/Jupyter-kernels]], including
[[https://github.com/jupyter/jupyter/wiki/Jupyter-kernels][https://github.com/jupyter/jupyter/wiki/Jupyter-kernels]], including
non-free languages like SAS, Mathematica, Matlab...
non-free languages like SAS, Mathematica, Matlab... Note that the maturity of these kernels differs widely.
None of these other languages have been deployed in the context of our
None of these other languages have been deployed in the context of our
MOOC but you may want to read the next sections to know more about how
MOOC but you may want to read the next sections to learn how
to set up your own Jupyter notebooks on your computer and benefit from these
to set up your own Jupyter on your computer and benefit from these extensions.
extensions.
Since the question was asked several times, if you really need to stay
with SAS, you should know that SAS can be used within Jupyter using
either the [[https://sassoftware.github.io/sas_kernel/][Python SASKernel]] or the [[https://sassoftware.github.io/saspy/][Python SASPy]] package (step by step
explanations about this are given [[https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_jupyter_windows/tuto_jupyter_windows.md][here]]).
Since proprietary software such as SAS cannot easily be inspected, we discourage its use as it hinders reproducibility by
essence. But perfection does not exist anyway and using Jupyter
literate programming approach allied with systematic control version
and environment control will certainly help anyway.
* 2. Installing and configuring Jupyter on your computer
* 2. Installing and configuring Jupyter on your computer
In this Section, we provide information on how to set up on your own
In this section, we explain how to set up a Jupyter environment on
computer a Jupyter environment similar to the one deployed for this
your own computer similar to the one deployed for this MOOC.
MOOC.
Note that Jupyter notebooks are only a small part of the picture and
Note that Jupyter notebooks are only a small part of the picture and
that Jupyter is now part of a bigger project: [[https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906][JupyterLab]], which allows
that Jupyter is now part of a bigger project: [[https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906][JupyterLab]], which allows
you to mix various components (including notebooks) in your
you to mix various components (including notebooks) in your
browser. In the context of this MOOC, our time frame was too short to
browser. In the context of this MOOC, our time frame was too short to
benefit from JupyterLab which was still under active development but
benefit from JupyterLab which was still under active development. You may, however, prefer JupyterLab when doing an installation on your own computer.
this is probably the best option now if you want to benefit from
cutting-edge Jupyter notebooks.
** 2.1 Installing Jupyter
** 2.1 Installing Jupyter
Follow these instructions if you wish to have a Jupyter environment on
Follow these instructions if you wish to have a Jupyter environment on
...
@@ -78,9 +84,9 @@ source activate mooc_rr
...
@@ -78,9 +84,9 @@ source activate mooc_rr
jupyter notebook
jupyter notebook
#+end_src
#+end_src
** 2.2 Making sure Jupyter allows you to use R
** 2.2 Making sure Jupyter allows you to use R
The previous environment should ship with R but if you proceeded
The environment described in the last section should include R, but if
otherwise and only have python available in Jupyter, you may want to
you proceeded otherwise and only have Python available in Jupyter, you
Last but not least, remember that Jupyter notebooks are only a small
For those who use [[https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906][JupyterLab]] rather than the plain Jupyter, a specific [[https://github.com/jupyterlab/jupyterlab-git][JupyterLab git plugin]] has been developed to offer a nice version control experience.
part of the picture and that Jupyter is now part of a bigger project:
[[https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906][JupyterLab]], which allows you to mix various components (including
notebooks) in your browser. A specific [[https://github.com/jupyterlab/jupyterlab-git][JupyterLab git plugin]] has been
developed to offer a nice version control experience.
*** • Using other languages (e.g., SAS, Matlab, Mathematica, etc.)
For any reason, you may be unsatisfied with the use of R or of
Python. Many other languages are available:
[[https://github.com/jupyter/jupyter/wiki/Jupyter-kernels][https://github.com/jupyter/jupyter/wiki/Jupyter-kernels]], including
non-free languages like SAS, Mathematica, Matlab...
Since the question was asked several times, if you really need to stay
with SAS, you should know that SAS can be used within Jupyter using
either the [[https://sassoftware.github.io/sas_kernel/][Python SASKernel]] or the [[https://sassoftware.github.io/saspy/][Python SASPy]] package (step by step
explanations about this are given [[https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_jupyter_windows/tuto_jupyter_windows.md][here]]).
Since such software cannot easily be opened for inspection not widely
used, we discourage this approach as it hinders reproducibility by
essence. But perfection does not exist anyway and using Jupyter
literate programming approach allied with systematic control version
and environment control will certainly help anyway.