From 77d50e1e31e2c9a66e388ae3335e4cc5436b7e25 Mon Sep 17 00:00:00 2001 From: Armin Schlegel Date: Fri, 13 May 2022 13:29:12 +0200 Subject: [PATCH] fix: fixed missing requirements for jupyter notebook, added hints in readme --- data-export/README.md | 3 +++ data-export/view-life-data/main.ipynb | 14 +++++++------- data-export/view-life-data/requirements.txt | 2 ++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/data-export/README.md b/data-export/README.md index ce7a35e..b4fd01d 100644 --- a/data-export/README.md +++ b/data-export/README.md @@ -69,6 +69,7 @@ kubectl get secrets -o jsonpath='{.data.NATS_ADDRESS}' nats-server-info | base64 Execute `receive-historic-data` application to collect histroic data from data endpoint and store data in local file `data.csv`. ```bash $ cd data-export/receive-historic-data +$ pip3 install -r requirements.txt $ python main.py 2022-04-25 16:23:13 root INFO Connecting to NATS server: tls://connect.ngs.global:4222 2022-04-25 16:23:48 root INFO Received all historic data. Proceed with live data. @@ -90,3 +91,5 @@ To run Jupyter Notebook open the file `data-export/view-life-data/main.ipynb` e. Scroll down to the bottom of the file to view the graph. ![Jupyter Output Example](../docs/data-export-jupyter-output.png) + +**⚠ NOTE:** If you experience issues with the notebook regarding missing packages please run `pip3 install -r requirements.txt` in the notebook directory. \ No newline at end of file diff --git a/data-export/view-life-data/main.ipynb b/data-export/view-life-data/main.ipynb index 21df655..14209d5 100644 --- a/data-export/view-life-data/main.ipynb +++ b/data-export/view-life-data/main.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -28,7 +28,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -50,7 +50,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -76,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -134,7 +134,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -184,13 +184,13 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "7579abb3acfd47948f98728048188ebf", + "model_id": "90dc85455897428ea06c4b02c2586411", "version_major": 2, "version_minor": 0 }, diff --git a/data-export/view-life-data/requirements.txt b/data-export/view-life-data/requirements.txt index 2294b25..1d6d89d 100644 --- a/data-export/view-life-data/requirements.txt +++ b/data-export/view-life-data/requirements.txt @@ -3,3 +3,5 @@ matplotlib==3.5.1 nats_py==2.1.0 numpy==1.19.2 python-dotenv==0.20.0 +ipykernel==6.13.0 +ipympl==0.9.1 \ No newline at end of file