From 0a0d03482d67fc644d6e2b3ec7956944305ab005 Mon Sep 17 00:00:00 2001
From: Lino Galiana <33896139+linogaliana@users.noreply.github.com>
Date: Fri, 26 Mar 2021 20:16:22 +0100
Subject: [PATCH] Ajout d'une section sur S3 (#97)
* un tutoriel s3
* plein d'ajouts
* change tous les liens
close #84
* change lien ici aussi
* eval FALSE
---
.Rprofile | 2 +-
content/_index.md | 2 +-
content/getting-started/01_installation.md | 2 +-
content/getting-started/_index.md | 2 +-
content/listeTP/_index.md | 14 +-
content/manipulation/01_numpy/index.Rmd | 2 +-
content/manipulation/01_numpy/index.md | 2 +-
.../02a_pandas_tutorial/index.Rmd | 16 +-
.../manipulation/02a_pandas_tutorial/index.md | 16 +-
content/manipulation/05a_s3/index.Rmd | 212 +++++++++++++++++
content/manipulation/05a_s3/index.md | 223 ++++++++++++++++++
content/manipulation/_index.md | 2 +-
content/visualisation/_index.md | 2 +-
content/visualisation/matplotlib/TP/index.Rmd | 2 +-
content/visualisation/matplotlib/TP/index.md | 2 +-
15 files changed, 468 insertions(+), 33 deletions(-)
create mode 100644 content/manipulation/05a_s3/index.Rmd
create mode 100644 content/manipulation/05a_s3/index.md
diff --git a/.Rprofile b/.Rprofile
index f3a6531d3..8b4aac098 100644
--- a/.Rprofile
+++ b/.Rprofile
@@ -41,7 +41,7 @@ reminder_badges <- function(notebook = ""){
"[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](",
nbviewer_link,")"
)
- onyxia_link <- "[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)"
+ onyxia_link <- "[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)"
binder_link <- sprintf(
"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master%s)",
binder_path
diff --git a/content/_index.md b/content/_index.md
index 9db54e730..5a23a71fe 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -33,7 +33,7 @@ dédiée aux jupyter notebooks.
Des environnements temporaires d'exécution des notebooks sont proposés
avec les icones suivantes
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master)
diff --git a/content/getting-started/01_installation.md b/content/getting-started/01_installation.md
index f23c278b1..bf2a54fac 100644
--- a/content/getting-started/01_installation.md
+++ b/content/getting-started/01_installation.md
@@ -94,7 +94,7 @@ lancer en local en utilisant `Anaconda`) ont émergé. Parmi celles-ci :
* **Google collaboratory**
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
;
-* __onyxia__ [![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement) plateforme développée par l'Insee qui fournit des environnements bac à sable basés sur des technologie de conteneurisation
+* __onyxia__ [![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi) plateforme développée par l'Insee qui fournit des environnements bac à sable basés sur des technologie de conteneurisation
Il est aussi possible d'exécuter des codes sur les services d'intégration continue de
diff --git a/content/getting-started/_index.md b/content/getting-started/_index.md
index b2d38635b..d7b8cccf9 100644
--- a/content/getting-started/_index.md
+++ b/content/getting-started/_index.md
@@ -34,7 +34,7 @@ ou
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/tree/master)
ainsi que dans les différents environnements prêts à l'emploi mis à
disposition
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master)
diff --git a/content/listeTP/_index.md b/content/listeTP/_index.md
index 41f1a4a03..f06f41b21 100644
--- a/content/listeTP/_index.md
+++ b/content/listeTP/_index.md
@@ -13,7 +13,7 @@ temporaire (voir [ici](configuration)). Pour accéder par les mêmes moyens
au dépôt:
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/tree/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master)
@@ -22,28 +22,28 @@ Séance 1:
* [Des rappels généraux sur les objets en python](rappels2A)
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/getting-started/notebooks/04_rappels_types.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/getting-started/notebooks/04_rappels_types.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/getting-started/notebooks/04_rappels_types.ipynb)
* [Des rappels sur les fonctions en python](rappelsfonctions)
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/getting-started/notebooks/05_rappels_fonctions.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/getting-started/notebooks/05_rappels_fonctions.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/getting-started/notebooks/05_rappels_fonctions.ipynb)
* [Un TD (optionnel) sur les classes en python](rappelsclasses)
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/getting-started/notebooks/06_rappels_classes.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/getting-started/notebooks/06_rappels_classes.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/getting-started/notebooks/06_rappels_classes.ipynb)
* [Une découverte de numpy](numpy)
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/01_tp_numpy.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/notebooks/01_tp_numpy.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/01_tp_numpy.ipynb)
@@ -52,7 +52,7 @@ Séance 2:
* [Découverte de pandas par l'exemple](pandas)
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/02_pandas_tp.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/notebooks/02_pandas_tp.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/02_pandas_tp.ipynb)
@@ -62,7 +62,7 @@ Séance 3:
* [Découverte de geopandas par l'exemple](geopandas)
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/03_geopandas_tp.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=03_geopandas_tp.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/03_geopandas_tp.ipynb)
diff --git a/content/manipulation/01_numpy/index.Rmd b/content/manipulation/01_numpy/index.Rmd
index 2832401ec..ecb9bc348 100644
--- a/content/manipulation/01_numpy/index.Rmd
+++ b/content/manipulation/01_numpy/index.Rmd
@@ -25,7 +25,7 @@ slug: "numpy"
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/manipulation/01_tp_numpy.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/01_tp_numpy.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/01_tp_numpy.ipynb)
diff --git a/content/manipulation/01_numpy/index.md b/content/manipulation/01_numpy/index.md
index f316c10fc..7b2e34e36 100644
--- a/content/manipulation/01_numpy/index.md
+++ b/content/manipulation/01_numpy/index.md
@@ -25,7 +25,7 @@ slug: "numpy"
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/manipulation/01_tp_numpy.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/01_tp_numpy.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/01_tp_numpy.ipynb)
diff --git a/content/manipulation/02a_pandas_tutorial/index.Rmd b/content/manipulation/02a_pandas_tutorial/index.Rmd
index e8a167339..a026d6f83 100644
--- a/content/manipulation/02a_pandas_tutorial/index.Rmd
+++ b/content/manipulation/02a_pandas_tutorial/index.Rmd
@@ -26,7 +26,7 @@ Pour visualiser le [TP associé à ce tutoriel](pandasTP) :
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/02_pandas_tp.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/notebooks/02_pandas_tp.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/02_pandas_tp.ipynb)
@@ -77,7 +77,7 @@ np.random.seed(123)
Au cours de cette démonstration des principales fonctionalités de `pandas`, et
lors du TP
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/notebooks/02_pandas_tp.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/02_pandas_tp.ipynb)
@@ -192,7 +192,7 @@ taille['koala']
L'existence d'indice rend le *subsetting* particulièrement aisé, ce que vous
pouvez expérimenter dans les TP
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
([ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
@@ -317,7 +317,7 @@ on peut partir de l'exemple des consommations de CO2 communales issues
des données de l'Ademe. Cette base de données est exploitée plus intensément
dans le TP
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
([ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
@@ -337,7 +337,7 @@ nom l'indique, de n'afficher que les dernières lignes
* `sample` qui permet d'afficher un échantillon aléatoire de *n* lignes.
Cette méthode propose de nombreuses options
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
([ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
@@ -424,7 +424,7 @@ df.quantile(q = [0.1,0.25,0.5,0.75,0.9])
```
Les exercices de TD ([![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb) [ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
visent à démontrer l'intérêt de ces méthodes dans quelques cas précis.
@@ -466,7 +466,7 @@ en conjonction des méthodes de statistiques agrégées. C'est utiles lorsqu'on
désire obtenir une idée de la part de valeurs manquantes dans un jeu de
données
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
([ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
@@ -855,7 +855,7 @@ Le TP pandas
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/manipulation/02_pandas_tp.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/02_pandas_tp.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/02_pandas_tp.ipynb)
propose une série d'exemples sur la manière de restructurer les données en
diff --git a/content/manipulation/02a_pandas_tutorial/index.md b/content/manipulation/02a_pandas_tutorial/index.md
index 32f059b1c..0a7c4142e 100644
--- a/content/manipulation/02a_pandas_tutorial/index.md
+++ b/content/manipulation/02a_pandas_tutorial/index.md
@@ -26,7 +26,7 @@ Pour visualiser le [TP associé à ce tutoriel](pandasTP) :
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/02_pandas_tp.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/notebooks/02_pandas_tp.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/02_pandas_tp.ipynb)
@@ -72,7 +72,7 @@ np.random.seed(123)
Au cours de cette démonstration des principales fonctionalités de `pandas`, et
lors du TP
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/notebooks/02_pandas_tp.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/notebooks/02_pandas_tp.ipynb)
@@ -200,7 +200,7 @@ taille['koala']
L'existence d'indice rend le *subsetting* particulièrement aisé, ce que vous
pouvez expérimenter dans les TP
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
([ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
@@ -349,7 +349,7 @@ on peut partir de l'exemple des consommations de CO2 communales issues
des données de l'Ademe. Cette base de données est exploitée plus intensément
dans le TP
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
([ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
@@ -387,7 +387,7 @@ nom l'indique, de n'afficher que les dernières lignes
* `sample` qui permet d'afficher un échantillon aléatoire de *n* lignes.
Cette méthode propose de nombreuses options
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
([ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
@@ -611,7 +611,7 @@ df.quantile(q = [0.1,0.25,0.5,0.75,0.9])
```
Les exercices de TD ([![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb) [ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
visent à démontrer l'intérêt de ces méthodes dans quelques cas précis.
@@ -683,7 +683,7 @@ en conjonction des méthodes de statistiques agrégées. C'est utiles lorsqu'on
désire obtenir une idée de la part de valeurs manquantes dans un jeu de
données
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-blue)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/pandas_intro/static/notebooks/numpy.ipynb)
([ou depuis github](https://github.com/linogaliana/python-datascientist/blob/master/content/01_data/02_pandas_tp.ipynb))
@@ -1296,7 +1296,7 @@ Le TP pandas
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/manipulation/02_pandas_tp.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/manipulation/02_pandas_tp.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/manipulation/02_pandas_tp.ipynb)
propose une série d'exemples sur la manière de restructurer les données en
diff --git a/content/manipulation/05a_s3/index.Rmd b/content/manipulation/05a_s3/index.Rmd
new file mode 100644
index 000000000..2c2ae906c
--- /dev/null
+++ b/content/manipulation/05a_s3/index.Rmd
@@ -0,0 +1,212 @@
+---
+jupyter:
+ jupytext:
+ text_representation:
+ extension: .Rmd
+ format_name: rmarkdown
+ format_version: '1.2'
+ jupytext_version: 1.6.0
+ kernelspec:
+ display_name: Python 3
+ language: python
+ name: python3
+title: "Lire des données depuis s3"
+date: 2020-07-09T15:00:00Z
+draft: false
+weight: 70
+output:
+ html_document:
+ keep_md: true
+ self_contained: true
+slug: readS3
+---
+
+# Introduction
+
+## Qu'est-ce que le système de stockage S3 ?
+
+Dans les entreprises et administrations, un nombre croissant de données sont
+disponibles depuis un système de stockage
+nommé `S3`.
+Le système S3 (*Simple Storage System*) est un système de stockage développé
+par Amazon et qui est maintenant devenu une référence pour le stockage en ligne.
+Il s'agit d'une architecture à la fois
+sécurisée (données cryptées, accès restreints) et performante.
+
+Le concept central du système S3 est le *bucket*.
+Un *bucket* est un espace (privé ou partagé) où on peut stocker une
+arborescence de fichiers. Pour accéder aux fichiers figurant
+dans un *bucket* privé, il fournit des jetons d'accès (l'équivalent d'un mot de passe)
+reconnus par le serveur de stockage. On peut alors lire et écrire dans le *bucket*.
+
+Le SSP cloud
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi) repose par exemple sur cette infrastructure technique.
+
+
+## Comment faire avec Python ?
+
+L'interaction entre ce système distant de fichiers et une session locale de Python
+est possible grâce à des API. Les deux principales librairies sont les suivantes:
+
+* [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)
+* [s3fs](https://s3fs.readthedocs.io/en/latest/)
+
+Elles offrent toutes deux la possibilité de se connecter depuis `Python`,
+à un dépôt de fichiers distant, de lister les fichiers disponibles dans un
+*bucket*, d'en télécharger un ou plusieurs ou de faire de l'*upload*
+
+{{% panel status="note" title="Note" icon="fa fa-comment" %}}
+Les exemples suivants seront réplicables pour les utilisateurs de la plateforme
+SSP-cloud
+{{% /panel %}}
+
+Personnellement, j'ai une petite préférence pour `boto3` que je trouve plus
+intuitif.
+
+# Connexion à un bucket
+
+Par la suite, on va utiliser des alias pour les trois valeurs suivantes, qui servent
+à s'authentifier.
+
+```{python, eval = FALSE}
+key_id = 'MY_KEY_ID'
+access_key = 'MY_ACCESS_KEY'
+token = "MY_TOKEN"
+```
+
+Ces valeurs peuvent être également disponibles dans
+les variables d'environnement de `Python`. Comme il s'agit d'une information
+d'authentification personnelle, il ne faut pas stocker les vraies valeurs de ces
+variables dans un projet, sous peine de partager des traits d'identité sans le
+vouloir lors d'un partage de code.
+
+## boto3
+
+Avec `boto3`, on créé d'abord un client puis on exécute des requêtes dessus.
+Pour initialiser un client, il suffit, en supposant que l'url du dépôt S3 est
+`"https://minio.lab.sspcloud.fr"`, de faire:
+
+```{python, eval = FALSE}
+import boto3
+s3 = boto3.client("s3",endpoint_url = "https://minio.lab.sspcloud.fr")
+```
+
+Il se peut que la connexion à ce stade soit refusée (HTTP error 403).
+Cela peut provenir
+d'une erreur dans l'URL utilisé. Cependant, cela reflète plus généralement
+des paramètres d'authentification erronés. Dans ce cas, il est plus fiable
+de les fournir à `boto3.client`
+
+
+```{python, eval = FALSE}
+import boto3
+s3 = boto3.client("s3",endpoint_url = "https://minio.lab.sspcloud.fr",
+ aws_access_key_id=key_id,
+ aws_secret_access_key=access_key,
+ aws_session_token = token)
+```
+
+{{% panel status="note" title="Notes" icon="fa fa-comment" %}}
+Dans le SSP-cloud,
+lorsque l'initialisation du service `Jupyter` du SSP-cloud est récente
+(moins de 12 heures), il est possible d'utiliser
+automatiquement les jetons stockés automatiquement à la création du dépôt.
+
+Si on désire accéder aux données du SSP-cloud depuis une session python extérieure
+au datalab, il faut remplacer l'url par `http://minio.lab.sspcloud.fr`
+{{% /panel %}}
+
+
+S'il n'y a pas d'erreur à ce stade, c'est que la connexion est bien effective.
+Pour le vérifier, on peut essayer de faire la liste des fichiers disponibles
+dans un `bucket` auquel on désire accéder. Par exemple, on peut vouloir
+tester l'accès aux bases `FILOSOFI` (données de revenu localisées disponibles
+sur ) au sein du bucket `donnees-insee`. Pour cela,
+la méthode `list_objects` offre toutes les options nécessaires:
+
+```{python, eval=FALSE}
+for key in s3.list_objects(Bucket='donnees-insee', Prefix='FILOSOFI')['Contents']:
+ print(key['Key'])
+```
+
+## s3fs
+
+La logique est identique avec `s3fs`.
+
+Si on a des jetons d'accès à jour et dans les variables d'environnement
+adéquates:
+
+```{python, eval=FALSE}
+import s3fs
+fs = s3fs.S3FileSystem(
+ client_kwargs={'endpoint_url': 'https://minio.lab.sspcloud.fr'})
+```
+
+Sinon, on ajoute les crédits d'authentification:
+
+```{python, eval=FALSE}
+import s3fs
+fs = s3fs.S3FileSystem(
+ client_kwargs={'endpoint_url': 'http://'+'minio.lab.sspcloud.fr'},
+ key = key_id, secret = access_key,
+ token = token)
+```
+
+Pour lister les fichiers, c'est la méthode `ls` (celle-ci ne liste pas par
+défaut les fichiers de manière récursive comme `boto3`):
+
+```{python, eval = FALSE}
+fs.ls("donnees-insee")
+```
+
+# Télécharger un fichier depuis s3 pour l'enregistrer en local
+
+## boto3
+
+```{python, eval = FALSE}
+s3.download_file('donnees-insee', "FILOSOFI/2014/FILOSOFI_COM.csv", 'data.csv')
+```
+
+## s3fs
+
+TO BE COMPLETED
+
+
+# Lire un fichier directement
+
+La méthode précédente n'est pas optimale. En effet, l'un des intérêts des API
+est qu'on peut traiter un fichier sur s3 comme s'il s'agissait d'un fichier
+sur son PC. Cela est d'ailleurs une manière plus sécurisée de procéder puisqu'on
+décrypte les données à la volée.
+
+## boto3
+
+```{python, eval = FALSE}
+obj = s3.get_object(Bucket='donnees-insee', Key="FILOSOFI/2014/FILOSOFI_COM.csv")
+df = pd.read_csv(obj['Body'], sep = ";")
+df.head(2)
+```
+
+## s3fs
+
+Le code suivant devrait permettre d'effectuer la même opération avec `s3fs`
+
+```{python, eval = FALSE}
+df = pd.read_csv(fs.open('{}/{}'.format('donnees-insee', "FILOSOFI/2014/FILOSOFI_COM.csv"),
+ mode='rb')
+ )
+
+df.head(2)
+```
+
+# Uploader un fichier
+
+### boto3
+
+```{python, eval = FALSE}
+s3_client.upload_file(file_name, bucket, object_name)
+```
+
+### s3fs
+
+TO BE COMPLETED
diff --git a/content/manipulation/05a_s3/index.md b/content/manipulation/05a_s3/index.md
new file mode 100644
index 000000000..e8bfb5128
--- /dev/null
+++ b/content/manipulation/05a_s3/index.md
@@ -0,0 +1,223 @@
+---
+jupyter:
+ jupytext:
+ text_representation:
+ extension: .Rmd
+ format_name: rmarkdown
+ format_version: '1.2'
+ jupytext_version: 1.6.0
+ kernelspec:
+ display_name: Python 3
+ language: python
+ name: python3
+title: "Lire des données depuis s3"
+date: 2020-07-09T15:00:00Z
+draft: false
+weight: 70
+output:
+ html_document:
+ keep_md: true
+ self_contained: true
+slug: readS3
+---
+
+# Introduction
+
+## Qu'est-ce que le système de stockage S3 ?
+
+Dans les entreprises et administrations, un nombre croissant de données sont
+disponibles depuis un système de stockage
+nommé `S3`.
+Le système S3 (*Simple Storage System*) est un système de stockage développé
+par Amazon et qui est maintenant devenu une référence pour le stockage en ligne.
+Il s'agit d'une architecture à la fois
+sécurisée (données cryptées, accès restreints) et performante.
+
+Le concept central du système S3 est le *bucket*.
+Un *bucket* est un espace (privé ou partagé) où on peut stocker une
+arborescence de fichiers. Pour accéder aux fichiers figurant
+dans un *bucket* privé, il fournit des jetons d'accès (l'équivalent d'un mot de passe)
+reconnus par le serveur de stockage. On peut alors lire et écrire dans le *bucket*.
+
+Le SSP cloud
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi) repose par exemple sur cette infrastructure technique.
+
+
+## Comment faire avec Python ?
+
+L'interaction entre ce système distant de fichiers et une session locale de Python
+est possible grâce à des API. Les deux principales librairies sont les suivantes:
+
+* [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)
+* [s3fs](https://s3fs.readthedocs.io/en/latest/)
+
+Elles offrent toutes deux la possibilité de se connecter depuis `Python`,
+à un dépôt de fichiers distant, de lister les fichiers disponibles dans un
+*bucket*, d'en télécharger un ou plusieurs ou de faire de l'*upload*
+
+{{% panel status="note" title="Note" icon="fa fa-comment" %}}
+Les exemples suivants seront réplicables pour les utilisateurs de la plateforme
+SSP-cloud
+{{% /panel %}}
+
+Personnellement, j'ai une petite préférence pour `boto3` que je trouve plus
+intuitif.
+
+# Connexion à un bucket
+
+Par la suite, on va utiliser des alias pour les trois valeurs suivantes, qui servent
+à s'authentifier.
+
+
+```python
+key_id = 'MY_KEY_ID'
+access_key = 'MY_ACCESS_KEY'
+token = "MY_TOKEN"
+```
+
+Ces valeurs peuvent être également disponibles dans
+les variables d'environnement de `Python`. Comme il s'agit d'une information
+d'authentification personnelle, il ne faut pas stocker les vraies valeurs de ces
+variables dans un projet, sous peine de partager des traits d'identité sans le
+vouloir lors d'un partage de code.
+
+## boto3
+
+Avec `boto3`, on créé d'abord un client puis on exécute des requêtes dessus.
+Pour initialiser un client, il suffit, en supposant que l'url du dépôt S3 est
+`"https://minio.lab.sspcloud.fr"`, de faire:
+
+
+```python
+import boto3
+s3 = boto3.client("s3",endpoint_url = "https://minio.lab.sspcloud.fr")
+```
+
+Il se peut que la connexion à ce stade soit refusée (HTTP error 403).
+Cela peut provenir
+d'une erreur dans l'URL utilisé. Cependant, cela reflète plus généralement
+des paramètres d'authentification erronés. Dans ce cas, il est plus fiable
+de les fournir à `boto3.client`
+
+
+
+```python
+import boto3
+s3 = boto3.client("s3",endpoint_url = "https://minio.lab.sspcloud.fr",
+ aws_access_key_id=key_id,
+ aws_secret_access_key=access_key,
+ aws_session_token = token)
+```
+
+{{% panel status="note" title="Notes" icon="fa fa-comment" %}}
+Dans le SSP-cloud,
+lorsque l'initialisation du service `Jupyter` du SSP-cloud est récente
+(moins de 12 heures), il est possible d'utiliser
+automatiquement les jetons stockés automatiquement à la création du dépôt.
+
+Si on désire accéder aux données du SSP-cloud depuis une session python extérieure
+au datalab, il faut remplacer l'url par `http://minio.lab.sspcloud.fr`
+{{% /panel %}}
+
+
+S'il n'y a pas d'erreur à ce stade, c'est que la connexion est bien effective.
+Pour le vérifier, on peut essayer de faire la liste des fichiers disponibles
+dans un `bucket` auquel on désire accéder. Par exemple, on peut vouloir
+tester l'accès aux bases `FILOSOFI` (données de revenu localisées disponibles
+sur ) au sein du bucket `donnees-insee`. Pour cela,
+la méthode `list_objects` offre toutes les options nécessaires:
+
+
+```python
+for key in s3.list_objects(Bucket='donnees-insee', Prefix='FILOSOFI')['Contents']:
+ print(key['Key'])
+```
+
+## s3fs
+
+La logique est identique avec `s3fs`.
+
+Si on a des jetons d'accès à jour et dans les variables d'environnement
+adéquates:
+
+
+```python
+import s3fs
+fs = s3fs.S3FileSystem(
+ client_kwargs={'endpoint_url': 'https://minio.lab.sspcloud.fr'})
+```
+
+Sinon, on ajoute les crédits d'authentification:
+
+
+```python
+import s3fs
+fs = s3fs.S3FileSystem(
+ client_kwargs={'endpoint_url': 'http://'+'minio.lab.sspcloud.fr'},
+ key = key_id, secret = access_key,
+ token = token)
+```
+
+Pour lister les fichiers, c'est la méthode `ls` (celle-ci ne liste pas par
+défaut les fichiers de manière récursive comme `boto3`):
+
+
+```python
+fs.ls("donnees-insee")
+```
+
+# Télécharger un fichier depuis s3 pour l'enregistrer en local
+
+## boto3
+
+
+```python
+s3.download_file('donnees-insee', "FILOSOFI/2014/FILOSOFI_COM.csv", 'data.csv')
+```
+
+## s3fs
+
+TO BE COMPLETED
+
+
+# Lire un fichier directement
+
+La méthode précédente n'est pas optimale. En effet, l'un des intérêts des API
+est qu'on peut traiter un fichier sur s3 comme s'il s'agissait d'un fichier
+sur son PC. Cela est d'ailleurs une manière plus sécurisée de procéder puisqu'on
+décrypte les données à la volée.
+
+## boto3
+
+
+```python
+obj = s3.get_object(Bucket='donnees-insee', Key="FILOSOFI/2014/FILOSOFI_COM.csv")
+df = pd.read_csv(obj['Body'], sep = ";")
+df.head(2)
+```
+
+## s3fs
+
+Le code suivant devrait permettre d'effectuer la même opération avec `s3fs`
+
+
+```python
+df = pd.read_csv(fs.open('{}/{}'.format('donnees-insee', "FILOSOFI/2014/FILOSOFI_COM.csv"),
+ mode='rb')
+ )
+
+df.head(2)
+```
+
+# Uploader un fichier
+
+### boto3
+
+
+```python
+s3_client.upload_file(file_name, bucket, object_name)
+```
+
+### s3fs
+
+TO BE COMPLETED
diff --git a/content/manipulation/_index.md b/content/manipulation/_index.md
index 7c9fd7d0e..102ceced7 100644
--- a/content/manipulation/_index.md
+++ b/content/manipulation/_index.md
@@ -58,7 +58,7 @@ ou
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/tree/master)
ainsi que dans les différents environnements prêts à l'emploi mis à
disposition
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master)
diff --git a/content/visualisation/_index.md b/content/visualisation/_index.md
index 699fd63a4..6b119d0de 100644
--- a/content/visualisation/_index.md
+++ b/content/visualisation/_index.md
@@ -16,7 +16,7 @@ mairie de Paris.
Seront principalement évoqués, dans la première partie,
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/visualisation/notebooks/tp5.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/visualisation/notebooks/tp5.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/visualisation/notebooks/tp5.ipynb) :
diff --git a/content/visualisation/matplotlib/TP/index.Rmd b/content/visualisation/matplotlib/TP/index.Rmd
index 68834eda2..9ea8a6419 100644
--- a/content/visualisation/matplotlib/TP/index.Rmd
+++ b/content/visualisation/matplotlib/TP/index.Rmd
@@ -59,7 +59,7 @@ os.environ['GDAL_DATA'] = r"C:\Users\W3CRK9\AppData\Local\r-miniconda\envs\r-ret
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/visualisation/notebooks/tp5.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/visualisation/notebooks/tp5.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/visualisation/notebooks/tp5.ipynb)
diff --git a/content/visualisation/matplotlib/TP/index.md b/content/visualisation/matplotlib/TP/index.md
index 19e6c99e1..4d91e68b2 100644
--- a/content/visualisation/matplotlib/TP/index.md
+++ b/content/visualisation/matplotlib/TP/index.md
@@ -28,7 +28,7 @@ slug: matplotlibTP
[![nbviewer](https://img.shields.io/badge/visualize-nbviewer-blue)](https://nbviewer.jupyter.org/github/linogaliana/python-datascientist/blob/master/content/visualisation/notebooks/tp5.ipynb)
-[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://spyrales.sspcloud.fr/my-lab/catalogue/inseefrlab-datascience/jupyter/deploiement)
+[![Onyxia](https://img.shields.io/badge/launch-onyxia-brightgreen)](https://datalab.sspcloud.fr/my-lab/catalogue/inseefrlab-helm-charts-datascience/jupyter/deploiement?resources.requests.memory=4096Mi)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/linogaliana/python-datascientist/master?filepath=content/visualisation/notebooks/tp5.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](http://colab.research.google.com/github/linogaliana/python-datascientist/blob/master/content/visualisation/notebooks/tp5.ipynb)