diff --git a/module2/ressources/jupyter.html b/module2/ressources/jupyter.html index 7406f806e563e98f853c7cd49b573f8802ee8d67..e6040b4ae88653e958e97a055cbbd0ad41c59cfc 100644 --- a/module2/ressources/jupyter.html +++ b/module2/ressources/jupyter.html @@ -4,22 +4,22 @@
The following webpage lists several Jupyter tricks (in particular, it
illustrates many Ipython magic
commands) that should improve your
@@ -44,9 +44,9 @@ now).
The best solution to this is to install rpy2. On my machine, I have
installed the python3-rpy2
debian package with apt-get install
. E.g.,
@@ -56,8 +56,8 @@ installed the python3-rpy2
debian package with apt-get instal
-An other (not really recommanded) alternative consists in going -through the python package manager with +An other (not really recommended if the first one is available) +alternative consists in going through the python package manager with
pip3 install rpy2 @@ -78,7 +78,7 @@ Loadingrpy2
: Using the%R
Ipython magic:-@@ -92,11 +92,16 @@ plot(df)%R +%%R summary(cars)
+Note that this %%R
notation allows you to use R for the whole cell but
+an other possibility is to use %R
to have a single line of R within a
+python cell.
+
Obviously, you can convert to html or pdf using the using the File >
Download as > HTML
(or PDF
) menu option. This can also be done from
@@ -109,27 +114,27 @@ the command line with the following command:
-If you want to use a specific style, then the nbconvert exporter
-should be customised. This is discussed and demoed here. We encourage
+If you want to use a specific style, then the nbconvert
exporter
+should be customized. This is discussed and demoed here. We encourage
you to simply read the doc of nbconvert.
Instead of going directly through LaTeX and playing too much with the
-nbconvert exporter, an other option consists in exporting to Markdown
+nbconvert
exporter, an other option consists in exporting to Markdown
and playing with pandoc. Both approaches work, it's rather a matter of
taste.
Follow these instructions if you wish to have a Jupyter environment on your own machine similar to the one we set up for this MOOC. @@ -161,9 +166,9 @@ jupyter notebook
Note that Jupyter notebooks are only a small part of the picture and that Jupyter is now part of a bigger project: JupyterLab, which allows @@ -175,9 +180,9 @@ cutting-edge Jupyter notebooks.
Here is what we had to install on our recent debian machine to make sure the notebook export via latex works: @@ -189,13 +194,13 @@ the notebook export via latex works:
Here are a few extensions that can ease your life:
@@ -221,9 +226,9 @@ jupyter-serverextension enable --py hide_codeTo ease your experience, we added some pull/push buttons that allow you to commit and sync with GitLab. This development was specific to @@ -239,14 +244,14 @@ This being said, you may have noticed that Jupyter keeps a perfect track of the sequence in which cells have been run by updating the "output index". This is a very good property from the reproducibility point of view but depending on your usage, you may find it a bit -painful when commiting. Some people have thus developped specific git -hooks to ignore these numbers when comitting Jupyter notebooks. There +painful when committing. Some people have thus developed specific git +hooks to ignore these numbers when committing Jupyter notebooks. There is a long an interesting discussion about various options on StackOverflow.
-Last but not least, remembter that Jupyter notebooks are only a small +Last but not least, remember that Jupyter notebooks are only a small part of the picture and that Jupyter is now part of a bigger project: JupyterLab, which allows you to mix various components (including notebooks) in your browser. A specific JupyterLab git plugin has been