diff --git a/.ipynb_checkpoints/kiss_data_train-checkpoint.ipynb b/.ipynb_checkpoints/kiss_data_train-checkpoint.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..115654f7a699b4892faa125a17b53593cdb394df --- /dev/null +++ b/.ipynb_checkpoints/kiss_data_train-checkpoint.ipynb @@ -0,0 +1,1622 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "hRVHLnJDZ_5x" + }, + "source": [ + "# POC Farm Data Train Notebook\n", + "Goal of the train: run queries in separated environments without granting the notebook owner access to all the data. " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ev-naMoKaNAc" + }, + "source": [ + "## Station 1 Methane data lake\n", + "Q Please return all farms in datalake\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 654 + }, + "id": "4H0j3eDyahlM", + "outputId": "d2964efd-c1ce-491b-8c1c-6703521f0697" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: plotly.express in /usr/local/lib/python3.7/site-packages (0.4.1)\n", + "Requirement already satisfied: scipy>=0.18 in /usr/local/lib/python3.7/site-packages (from plotly.express) (1.6.0)\n", + "Requirement already satisfied: plotly>=4.1.0 in /usr/local/lib/python3.7/site-packages (from plotly.express) (4.14.3)\n", + "Requirement already satisfied: statsmodels>=0.9.0 in /usr/local/lib/python3.7/site-packages (from plotly.express) (0.12.1)\n", + "Requirement already satisfied: pandas>=0.20.0 in /usr/local/lib/python3.7/site-packages (from plotly.express) (1.2.1)\n", + "Requirement already satisfied: numpy>=1.11 in /usr/local/lib/python3.7/site-packages (from plotly.express) (1.19.5)\n", + "Requirement already satisfied: patsy>=0.5 in /usr/local/lib/python3.7/site-packages (from plotly.express) (0.5.1)\n", + "Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/site-packages (from pandas>=0.20.0->plotly.express) (2020.5)\n", + "Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/site-packages (from pandas>=0.20.0->plotly.express) (2.8.1)\n", + "Requirement already satisfied: six in /usr/local/lib/python3.7/site-packages (from patsy>=0.5->plotly.express) (1.15.0)\n", + "Requirement already satisfied: retrying>=1.3.3 in /usr/local/lib/python3.7/site-packages (from plotly>=4.1.0->plotly.express) (1.3.3)\n", + "Requirement already satisfied: plotly in /usr/local/lib/python3.7/site-packages (4.14.3)\n", + "Requirement already satisfied: six in /usr/local/lib/python3.7/site-packages (from plotly) (1.15.0)\n", + "Requirement already satisfied: retrying>=1.3.3 in /usr/local/lib/python3.7/site-packages (from plotly) (1.3.3)\n" + ] + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "fill": "toself", + "fillcolor": "rgb(255, 127, 14)", + "hoverinfo": "name", + "legendgroup": "rgb(255, 127, 14)", + "mode": "none", + "name": "greenfeed", + "showlegend": true, + "type": "scatter", + "x": [ + "2019-05-28", + "2019-06-18", + "2019-06-18", + "2019-05-28", + "2019-05-28", + "2020-02-20", + "2019-04-25", + "2019-04-25", + "2020-02-20", + "2020-02-20", + "2020-05-03", + "2020-09-15", + "2020-09-15", + "2020-05-03", + "2020-05-03", + "2020-05-04", + "2020-08-23", + "2020-08-23", + "2020-05-04", + "2020-05-04", + "2019-10-22", + "2019-11-18", + "2019-11-18", + "2019-10-22", + "2019-10-22", + "2019-06-20", + "2019-07-16", + "2019-07-16", + "2019-06-20", + "2019-06-20", + "2018-12-17", + "2019-01-14", + "2019-01-14", + "2018-12-17", + "2018-12-17", + "2020-02-10", + "2020-04-21", + "2020-04-21", + "2020-02-10", + "2020-02-10", + "2020-02-07", + "2020-03-12", + "2020-03-12", + "2020-02-07", + "2020-02-07", + "2019-05-08", + "2019-06-12", + "2019-06-12", + "2019-05-08", + "2019-05-08", + "2019-10-03", + "2020-01-14", + "2020-01-14", + "2019-10-03" + ], + "y": [ + 17.8, + 17.8, + 18.2, + 18.2, + null, + 11.8, + 11.8, + 12.2, + 12.2, + null, + 11.8, + 11.8, + 12.2, + 12.2, + null, + 9.8, + 9.8, + 10.2, + 10.2, + null, + 9.8, + 9.8, + 10.2, + 10.2, + null, + 9.8, + 9.8, + 10.2, + 10.2, + null, + 7.8, + 7.8, + 8.2, + 8.2, + null, + 7.8, + 7.8, + 8.2, + 8.2, + null, + 1.8, + 1.8, + 2.2, + 2.2, + null, + 1.8, + 1.8, + 2.2, + 2.2, + null, + -0.2, + -0.2, + 0.2, + 0.2 + ] + }, + { + "fill": "toself", + "fillcolor": "rgb(31, 119, 180)", + "hoverinfo": "name", + "legendgroup": "rgb(31, 119, 180)", + "mode": "none", + "name": "barn", + "showlegend": true, + "type": "scatter", + "x": [ + "2018-12-10", + "2020-11-03", + "2020-11-03", + "2018-12-10", + "2018-12-10", + "2018-11-13", + "2020-11-03", + "2020-11-03", + "2018-11-13" + ], + "y": [ + 12.8, + 12.8, + 13.2, + 13.2, + null, + 2.8, + 2.8, + 3.2, + 3.2 + ] + }, + { + "fill": "toself", + "fillcolor": "rgb(44, 160, 44)", + "hoverinfo": "name", + "legendgroup": "rgb(44, 160, 44)", + "mode": "none", + "name": "sniffer", + "showlegend": true, + "type": "scatter", + "x": [ + "2019-04-01", + "2020-08-31", + "2020-08-31", + "2019-04-01", + "2019-04-01", + "2019-01-31", + "2020-08-31", + "2020-08-31", + "2019-01-31", + "2019-01-31", + "2018-11-30", + "20-08-31", + "20-08-31", + "2018-11-30", + "2018-11-30", + "2019-02-28", + "2020-09-25", + "2020-09-25", + "2019-02-28", + "2019-02-28", + "2019-01-22", + "2020-09-04", + "2020-09-04", + "2019-01-22", + "2019-01-22", + "2019-05-31", + "2020-09-09", + "2020-09-09", + "2019-05-31", + "2019-05-31", + "2019-02-28", + "2020-08-03", + "2020-08-03", + "2019-02-28", + "2019-02-28", + "2019-03-01", + "2020-06-30", + "2020-06-30", + "2019-03-01", + "2019-03-01", + "2018-12-31", + "2021-01-01", + "2021-01-01", + "2018-12-31", + "2018-12-31", + "19-02-28", + "2019-10-31", + "2019-10-31", + "19-02-28", + "19-02-28", + "2019-05-31", + "2020-09-03", + "2020-09-03", + "2019-05-31" + ], + "y": [ + 16.8, + 16.8, + 17.2, + 17.2, + null, + 15.8, + 15.8, + 16.2, + 16.2, + null, + 14.8, + 14.8, + 15.2, + 15.2, + null, + 13.8, + 13.8, + 14.2, + 14.2, + null, + 10.8, + 10.8, + 11.2, + 11.2, + null, + 8.8, + 8.8, + 9.2, + 9.2, + null, + 6.8, + 6.8, + 7.2, + 7.2, + null, + 5.8, + 5.8, + 6.2, + 6.2, + null, + 4.8, + 4.8, + 5.2, + 5.2, + null, + 3.8, + 3.8, + 4.2, + 4.2, + null, + 0.8, + 0.8, + 1.2, + 1.2 + ] + }, + { + "legendgroup": "rgb(255, 127, 14)", + "marker": { + "color": "rgb(255, 127, 14)", + "opacity": 0, + "size": 1 + }, + "mode": "markers", + "name": "", + "showlegend": false, + "text": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ], + "type": "scatter", + "x": [ + "2019-05-28", + "2019-06-18", + "2020-02-20", + "2019-04-25", + "2020-05-03", + "2020-09-15", + "2020-05-04", + "2020-08-23", + "2019-10-22", + "2019-11-18", + "2019-06-20", + "2019-07-16", + "2018-12-17", + "2019-01-14", + "2020-02-10", + "2020-04-21", + "2020-02-07", + "2020-03-12", + "2019-05-08", + "2019-06-12", + "2019-10-03", + "2020-01-14" + ], + "y": [ + 18, + 18, + 12, + 12, + 12, + 12, + 10, + 10, + 10, + 10, + 10, + 10, + 8, + 8, + 8, + 8, + 2, + 2, + 2, + 2, + 0, + 0 + ] + }, + { + "legendgroup": "rgb(31, 119, 180)", + "marker": { + "color": "rgb(31, 119, 180)", + "opacity": 0, + "size": 1 + }, + "mode": "markers", + "name": "", + "showlegend": false, + "text": [ + null, + null, + null, + null + ], + "type": "scatter", + "x": [ + "2018-12-10", + "2020-11-03", + "2018-11-13", + "2020-11-03" + ], + "y": [ + 13, + 13, + 3, + 3 + ] + }, + { + "legendgroup": "rgb(44, 160, 44)", + "marker": { + "color": "rgb(44, 160, 44)", + "opacity": 0, + "size": 1 + }, + "mode": "markers", + "name": "", + "showlegend": false, + "text": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ], + "type": "scatter", + "x": [ + "2019-04-01", + "2020-08-31", + "2019-01-31", + "2020-08-31", + "2018-11-30", + "20-08-31", + "2019-02-28", + "2020-09-25", + "2019-01-22", + "2020-09-04", + "2019-05-31", + "2020-09-09", + "2019-02-28", + "2020-08-03", + "2019-03-01", + "2020-06-30", + "2018-12-31", + "2021-01-01", + "19-02-28", + "2019-10-31", + "2019-05-31", + "2020-09-03" + ], + "y": [ + 17, + 17, + 16, + 16, + 15, + 15, + 14, + 14, + 11, + 11, + 9, + 9, + 7, + 7, + 6, + 6, + 5, + 5, + 4, + 4, + 1, + 1 + ] + } + ], + "layout": { + "height": 600, + "hovermode": "closest", + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Gantt Chart" + }, + "xaxis": { + "rangeselector": { + "buttons": [ + { + "count": 7, + "label": "1w", + "step": "day", + "stepmode": "backward" + }, + { + "count": 1, + "label": "1m", + "step": "month", + "stepmode": "backward" + }, + { + "count": 6, + "label": "6m", + "step": "month", + "stepmode": "backward" + }, + { + "count": 1, + "label": "YTD", + "step": "year", + "stepmode": "todate" + }, + { + "count": 1, + "label": "1y", + "step": "year", + "stepmode": "backward" + }, + { + "step": "all" + } + ] + }, + "showgrid": false, + "type": "date", + "zeroline": false + }, + "yaxis": { + "autorange": false, + "range": [ + -1, + 20 + ], + "showgrid": false, + "ticktext": [ + "Zegveld g", + "Ysselstein s", + "Ysselstein g", + "Ysselstein B", + "Sevenum s", + "Middenmeer s", + "Markelo s", + "Lemelerveld s", + "Leeuwarden g", + "Hulst s", + "Hulst g", + "Hengelo s", + "Hengelo g", + "Hengelo B", + "Cornwerd s", + "Bunschoten s", + "Biddinghuizen s", + "Bedum s", + "Bedum g" + ], + "tickvals": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18 + ], + "zeroline": false + } + } + }, + "text/html": [ + "<div> <div id=\"714718b0-531c-4fa6-8677-a5ce0f3ea5da\" class=\"plotly-graph-div\" style=\"height:600px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"714718b0-531c-4fa6-8677-a5ce0f3ea5da\")) { Plotly.newPlot( \"714718b0-531c-4fa6-8677-a5ce0f3ea5da\", [{\"fill\": \"toself\", \"fillcolor\": \"rgb(255, 127, 14)\", \"hoverinfo\": \"name\", \"legendgroup\": \"rgb(255, 127, 14)\", \"mode\": \"none\", \"name\": \"greenfeed\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [\"2019-05-28\", \"2019-06-18\", \"2019-06-18\", \"2019-05-28\", \"2019-05-28\", \"2020-02-20\", \"2019-04-25\", \"2019-04-25\", \"2020-02-20\", \"2020-02-20\", \"2020-05-03\", \"2020-09-15\", \"2020-09-15\", \"2020-05-03\", \"2020-05-03\", \"2020-05-04\", \"2020-08-23\", \"2020-08-23\", \"2020-05-04\", \"2020-05-04\", \"2019-10-22\", \"2019-11-18\", \"2019-11-18\", \"2019-10-22\", \"2019-10-22\", \"2019-06-20\", \"2019-07-16\", \"2019-07-16\", \"2019-06-20\", \"2019-06-20\", \"2018-12-17\", \"2019-01-14\", \"2019-01-14\", \"2018-12-17\", \"2018-12-17\", \"2020-02-10\", \"2020-04-21\", \"2020-04-21\", \"2020-02-10\", \"2020-02-10\", \"2020-02-07\", \"2020-03-12\", \"2020-03-12\", \"2020-02-07\", \"2020-02-07\", \"2019-05-08\", \"2019-06-12\", \"2019-06-12\", \"2019-05-08\", \"2019-05-08\", \"2019-10-03\", \"2020-01-14\", \"2020-01-14\", \"2019-10-03\"], \"y\": [17.8, 17.8, 18.2, 18.2, null, 11.8, 11.8, 12.2, 12.2, null, 11.8, 11.8, 12.2, 12.2, null, 9.8, 9.8, 10.2, 10.2, null, 9.8, 9.8, 10.2, 10.2, null, 9.8, 9.8, 10.2, 10.2, null, 7.8, 7.8, 8.2, 8.2, null, 7.8, 7.8, 8.2, 8.2, null, 1.8, 1.8, 2.2, 2.2, null, 1.8, 1.8, 2.2, 2.2, null, -0.2, -0.2, 0.2, 0.2]}, {\"fill\": \"toself\", \"fillcolor\": \"rgb(31, 119, 180)\", \"hoverinfo\": \"name\", \"legendgroup\": \"rgb(31, 119, 180)\", \"mode\": \"none\", \"name\": \"barn\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [\"2018-12-10\", \"2020-11-03\", \"2020-11-03\", \"2018-12-10\", \"2018-12-10\", \"2018-11-13\", \"2020-11-03\", \"2020-11-03\", \"2018-11-13\"], \"y\": [12.8, 12.8, 13.2, 13.2, null, 2.8, 2.8, 3.2, 3.2]}, {\"fill\": \"toself\", \"fillcolor\": \"rgb(44, 160, 44)\", \"hoverinfo\": \"name\", \"legendgroup\": \"rgb(44, 160, 44)\", \"mode\": \"none\", \"name\": \"sniffer\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [\"2019-04-01\", \"2020-08-31\", \"2020-08-31\", \"2019-04-01\", \"2019-04-01\", \"2019-01-31\", \"2020-08-31\", \"2020-08-31\", \"2019-01-31\", \"2019-01-31\", \"2018-11-30\", \"20-08-31\", \"20-08-31\", \"2018-11-30\", \"2018-11-30\", \"2019-02-28\", \"2020-09-25\", \"2020-09-25\", \"2019-02-28\", \"2019-02-28\", \"2019-01-22\", \"2020-09-04\", \"2020-09-04\", \"2019-01-22\", \"2019-01-22\", \"2019-05-31\", \"2020-09-09\", \"2020-09-09\", \"2019-05-31\", \"2019-05-31\", \"2019-02-28\", \"2020-08-03\", \"2020-08-03\", \"2019-02-28\", \"2019-02-28\", \"2019-03-01\", \"2020-06-30\", \"2020-06-30\", \"2019-03-01\", \"2019-03-01\", \"2018-12-31\", \"2021-01-01\", \"2021-01-01\", \"2018-12-31\", \"2018-12-31\", \"19-02-28\", \"2019-10-31\", \"2019-10-31\", \"19-02-28\", \"19-02-28\", \"2019-05-31\", \"2020-09-03\", \"2020-09-03\", \"2019-05-31\"], \"y\": [16.8, 16.8, 17.2, 17.2, null, 15.8, 15.8, 16.2, 16.2, null, 14.8, 14.8, 15.2, 15.2, null, 13.8, 13.8, 14.2, 14.2, null, 10.8, 10.8, 11.2, 11.2, null, 8.8, 8.8, 9.2, 9.2, null, 6.8, 6.8, 7.2, 7.2, null, 5.8, 5.8, 6.2, 6.2, null, 4.8, 4.8, 5.2, 5.2, null, 3.8, 3.8, 4.2, 4.2, null, 0.8, 0.8, 1.2, 1.2]}, {\"legendgroup\": \"rgb(255, 127, 14)\", \"marker\": {\"color\": \"rgb(255, 127, 14)\", \"opacity\": 0, \"size\": 1}, \"mode\": \"markers\", \"name\": \"\", \"showlegend\": false, \"text\": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], \"type\": \"scatter\", \"x\": [\"2019-05-28\", \"2019-06-18\", \"2020-02-20\", \"2019-04-25\", \"2020-05-03\", \"2020-09-15\", \"2020-05-04\", \"2020-08-23\", \"2019-10-22\", \"2019-11-18\", \"2019-06-20\", \"2019-07-16\", \"2018-12-17\", \"2019-01-14\", \"2020-02-10\", \"2020-04-21\", \"2020-02-07\", \"2020-03-12\", \"2019-05-08\", \"2019-06-12\", \"2019-10-03\", \"2020-01-14\"], \"y\": [18, 18, 12, 12, 12, 12, 10, 10, 10, 10, 10, 10, 8, 8, 8, 8, 2, 2, 2, 2, 0, 0]}, {\"legendgroup\": \"rgb(31, 119, 180)\", \"marker\": {\"color\": \"rgb(31, 119, 180)\", \"opacity\": 0, \"size\": 1}, \"mode\": \"markers\", \"name\": \"\", \"showlegend\": false, \"text\": [null, null, null, null], \"type\": \"scatter\", \"x\": [\"2018-12-10\", \"2020-11-03\", \"2018-11-13\", \"2020-11-03\"], \"y\": [13, 13, 3, 3]}, {\"legendgroup\": \"rgb(44, 160, 44)\", \"marker\": {\"color\": \"rgb(44, 160, 44)\", \"opacity\": 0, \"size\": 1}, \"mode\": \"markers\", \"name\": \"\", \"showlegend\": false, \"text\": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], \"type\": \"scatter\", \"x\": [\"2019-04-01\", \"2020-08-31\", \"2019-01-31\", \"2020-08-31\", \"2018-11-30\", \"20-08-31\", \"2019-02-28\", \"2020-09-25\", \"2019-01-22\", \"2020-09-04\", \"2019-05-31\", \"2020-09-09\", \"2019-02-28\", \"2020-08-03\", \"2019-03-01\", \"2020-06-30\", \"2018-12-31\", \"2021-01-01\", \"19-02-28\", \"2019-10-31\", \"2019-05-31\", \"2020-09-03\"], \"y\": [17, 17, 16, 16, 15, 15, 14, 14, 11, 11, 9, 9, 7, 7, 6, 6, 5, 5, 4, 4, 1, 1]}], {\"height\": 600, \"hovermode\": \"closest\", \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"Gantt Chart\"}, \"xaxis\": {\"rangeselector\": {\"buttons\": [{\"count\": 7, \"label\": \"1w\", \"step\": \"day\", \"stepmode\": \"backward\"}, {\"count\": 1, \"label\": \"1m\", \"step\": \"month\", \"stepmode\": \"backward\"}, {\"count\": 6, \"label\": \"6m\", \"step\": \"month\", \"stepmode\": \"backward\"}, {\"count\": 1, \"label\": \"YTD\", \"step\": \"year\", \"stepmode\": \"todate\"}, {\"count\": 1, \"label\": \"1y\", \"step\": \"year\", \"stepmode\": \"backward\"}, {\"step\": \"all\"}]}, \"showgrid\": false, \"type\": \"date\", \"zeroline\": false}, \"yaxis\": {\"autorange\": false, \"range\": [-1, 20], \"showgrid\": false, \"ticktext\": [\"Zegveld g\", \"Ysselstein s\", \"Ysselstein g\", \"Ysselstein B\", \"Sevenum s\", \"Middenmeer s\", \"Markelo s\", \"Lemelerveld s\", \"Leeuwarden g\", \"Hulst s\", \"Hulst g\", \"Hengelo s\", \"Hengelo g\", \"Hengelo B\", \"Cornwerd s\", \"Bunschoten s\", \"Biddinghuizen s\", \"Bedum s\", \"Bedum g\"], \"tickvals\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], \"zeroline\": false}}, {\"responsive\": true} ).then(function(){\n", + " \n", + "var gd = document.getElementById('714718b0-531c-4fa6-8677-a5ce0f3ea5da');\n", + "var x = new MutationObserver(function (mutations, observer) {{\n", + " var display = window.getComputedStyle(gd).display;\n", + " if (!display || display === 'none') {{\n", + " console.log([gd, 'removed!']);\n", + " Plotly.purge(gd);\n", + " observer.disconnect();\n", + " }}\n", + "}});\n", + "\n", + "// Listen for the removal of the full notebook cells\n", + "var notebookContainer = gd.closest('#notebook-container');\n", + "if (notebookContainer) {{\n", + " x.observe(notebookContainer, {childList: true});\n", + "}}\n", + "\n", + "// Listen for the clearing of the current output cell\n", + "var outputEl = gd.closest('.output');\n", + "if (outputEl) {{\n", + " x.observe(outputEl, {childList: true});\n", + "}}\n", + "\n", + " }) }; }); </script> </div>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# # install dependencies\n", + "# # !pip3 install azure-storage-blob \n", + "# # !pip3 install azure-keyvault\n", + "!pip3 install plotly.express\n", + "!pip3 install plotly\n", + "# # !pip3 install azure-identity\n", + "# # string = \"connection string removed after running container\"\n", + "\n", + "import os, uuid\n", + "# # from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient, __version__\n", + "import pandas as pd\n", + "import pandas as pd\n", + "\n", + "import io\n", + "import plotly.figure_factory as ff\n", + "\n", + "# get simple dataframe from data-lake\n", + "def getData():\n", + " # fake data returned by datalake, because persistent storage is not available in poc\n", + " return pd.read_csv('data/station1.csv', sep=';')\n", + "\n", + "# do some fun stuff with the data\n", + "def plot(df):\n", + " df = df.sort_values('Task')\n", + " df = df.to_dict(orient='records')\n", + " fig = ff.create_gantt(df, index_col='Data', show_colorbar=True, group_tasks=True)\n", + " fig.show()\n", + "\n", + "df = getData()\n", + "\n", + "\n", + "plot(df)\n", + "\n", + "# dict = df.to_dict(orient='index')\n" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [], + "source": [ + "def plot(df):\n", + " df = df.sort_values('Task')\n", + " df = df.to_dict(orient='records')\n", + " fig = ff.create_gantt(df, index_col='Data', show_colorbar=True, group_tasks=True)\n", + " fig.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "RK7UWz3fe7XR", + "outputId": "a1687828-14c6-4d01-801c-4a58fc203145" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dictionary for Agro data cube\n", + "{0: {'Unnamed: 0': 0, 'Unnamed: 0.1': 0, 'Unnamed: 0.1.1': 0, 'Task': ' Bedum s', 'Data': 'sniffer', 'Start': '2019-04-01', 'Finish': '2020-08-31'}, 1: {'Unnamed: 0': 1, 'Unnamed: 0.1': 1, 'Unnamed: 0.1.1': 1, 'Task': ' Biddinghuizen s', 'Data': 'sniffer', 'Start': '2019-01-31', 'Finish': '2020-08-31'}, 2: {'Unnamed: 0': 2, 'Unnamed: 0.1': 2, 'Unnamed: 0.1.1': 2, 'Task': ' Bunschoten s', 'Data': 'sniffer', 'Start': '2018-11-30', 'Finish': '20-08-31'}, 3: {'Unnamed: 0': 3, 'Unnamed: 0.1': 3, 'Unnamed: 0.1.1': 3, 'Task': ' Cornwerd s', 'Data': 'sniffer', 'Start': '2019-02-28', 'Finish': '2020-09-25'}, 4: {'Unnamed: 0': 4, 'Unnamed: 0.1': 4, 'Unnamed: 0.1.1': 4, 'Task': ' Hengelo s', 'Data': 'sniffer', 'Start': '2019-01-22', 'Finish': '2020-09-04'}, 5: {'Unnamed: 0': 5, 'Unnamed: 0.1': 5, 'Unnamed: 0.1.1': 5, 'Task': ' Hulst s', 'Data': 'sniffer', 'Start': '2019-05-31', 'Finish': '2020-09-09'}, 6: {'Unnamed: 0': 6, 'Unnamed: 0.1': 6, 'Unnamed: 0.1.1': 6, 'Task': ' Lemelerveld s', 'Data': 'sniffer', 'Start': '2019-02-28', 'Finish': '2020-08-03'}, 7: {'Unnamed: 0': 7, 'Unnamed: 0.1': 7, 'Unnamed: 0.1.1': 7, 'Task': ' Markelo s', 'Data': 'sniffer', 'Start': '2019-03-01', 'Finish': '2020-06-30'}, 8: {'Unnamed: 0': 8, 'Unnamed: 0.1': 8, 'Unnamed: 0.1.1': 8, 'Task': ' Middenmeer s', 'Data': 'sniffer', 'Start': '2018-12-31', 'Finish': '2021-01-01'}, 9: {'Unnamed: 0': 9, 'Unnamed: 0.1': 9, 'Unnamed: 0.1.1': 9, 'Task': ' Sevenum s', 'Data': 'sniffer', 'Start': '19-02-28', 'Finish': '2019-10-31'}, 10: {'Unnamed: 0': 10, 'Unnamed: 0.1': 10, 'Unnamed: 0.1.1': 10, 'Task': ' Ysselstein s', 'Data': 'sniffer', 'Start': '2019-05-31', 'Finish': '2020-09-03'}, 11: {'Unnamed: 0': 11, 'Unnamed: 0.1': 11, 'Unnamed: 0.1.1': 11, 'Task': ' Bedum g', 'Data': 'greenfeed', 'Start': '2019-05-28', 'Finish': '2019-06-18'}, 12: {'Unnamed: 0': 12, 'Unnamed: 0.1': 12, 'Unnamed: 0.1.1': 12, 'Task': ' Hengelo g', 'Data': 'greenfeed', 'Start': '2020-05-03', 'Finish': '2020-09-15'}, 13: {'Unnamed: 0': 13, 'Unnamed: 0.1': 13, 'Unnamed: 0.1.1': 13, 'Task': ' Hengelo g', 'Data': 'greenfeed', 'Start': '2020-02-20', 'Finish': '2019-04-25'}, 14: {'Unnamed: 0': 14, 'Unnamed: 0.1': 14, 'Unnamed: 0.1.1': 14, 'Task': ' Hulst g', 'Data': 'greenfeed', 'Start': '2020-05-04', 'Finish': '2020-08-23'}, 15: {'Unnamed: 0': 15, 'Unnamed: 0.1': 15, 'Unnamed: 0.1.1': 15, 'Task': ' Hulst g', 'Data': 'greenfeed', 'Start': '2019-10-22', 'Finish': '2019-11-18'}, 16: {'Unnamed: 0': 16, 'Unnamed: 0.1': 16, 'Unnamed: 0.1.1': 16, 'Task': ' Hulst g', 'Data': 'greenfeed', 'Start': '2019-06-20', 'Finish': '2019-07-16'}, 17: {'Unnamed: 0': 17, 'Unnamed: 0.1': 17, 'Unnamed: 0.1.1': 17, 'Task': ' Leeuwarden g', 'Data': 'greenfeed', 'Start': '2018-12-17', 'Finish': '2019-01-14'}, 18: {'Unnamed: 0': 18, 'Unnamed: 0.1': 18, 'Unnamed: 0.1.1': 18, 'Task': ' Leeuwarden g', 'Data': 'greenfeed', 'Start': '2020-02-10', 'Finish': '2020-04-21'}, 19: {'Unnamed: 0': 19, 'Unnamed: 0.1': 19, 'Unnamed: 0.1.1': 19, 'Task': ' Ysselstein g', 'Data': 'greenfeed', 'Start': '2020-02-07', 'Finish': '2020-03-12'}, 20: {'Unnamed: 0': 20, 'Unnamed: 0.1': 20, 'Unnamed: 0.1.1': 20, 'Task': ' Ysselstein g', 'Data': 'greenfeed', 'Start': '2019-05-08', 'Finish': '2019-06-12'}, 21: {'Unnamed: 0': 21, 'Unnamed: 0.1': 21, 'Unnamed: 0.1.1': 21, 'Task': ' Zegveld g', 'Data': 'greenfeed', 'Start': '2019-10-03', 'Finish': '2020-01-14'}, 22: {'Unnamed: 0': 22, 'Unnamed: 0.1': 22, 'Unnamed: 0.1.1': 22, 'Task': ' Hengelo B', 'Data': 'barn', 'Start': '2018-12-10', 'Finish': '2020-11-03'}, 23: {'Unnamed: 0': 23, 'Unnamed: 0.1': 23, 'Unnamed: 0.1.1': 23, 'Task': ' Ysselstein B', 'Data': 'barn', 'Start': '2018-11-13', 'Finish': '2020-11-03'}}\n" + ] + } + ], + "source": [ + "print('dictionary for Agro data cube')\n", + "print(dict)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "jHQDrBGtbzRc" + }, + "source": [ + "## Station 2 Agro data cube\n", + "Q please populate average temperature for each farm in the Methane datalake dictionary\n" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "id": "YEQeiOkHb5Xr" + }, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (<ipython-input-25-698d20d86fcf>, line 1)", + "output_type": "error", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"<ipython-input-25-698d20d86fcf>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m def collect(df)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "def collect(df)\n", + " #fetch data from AgroDataCube\n", + " return df\n", + "\n", + "df = collect(df)\n", + "df.to_csv('data/station2.csv')\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "colab": { + "name": "kiss data train.ipynb", + "provenance": [], + "toc_visible": true + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8622aaf70d9e0527dcf858ceebab13edaef94c93 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +# FROM ubuntu:18.04 +from python:3.7.9-buster +RUN pip3 install jupyter +RUN pip3 install pandas +WORKDIR /home +CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"] diff --git a/README.md b/README.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9b12c0753c675fba43d12f0a94935f9545ebd11a 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,4 @@ +docker build -t fdt . + +docker run -p 8888:8888 fdt -v .:/home + diff --git a/data/station1.csv b/data/station1.csv new file mode 100644 index 0000000000000000000000000000000000000000..231452d8ff8c42db6264acf556b7a99bc7a58e23 --- /dev/null +++ b/data/station1.csv @@ -0,0 +1,25 @@ +Task;Data;Start;Finish +Bedum s;sniffer;2019-04-01;2020-08-31 +Biddinghuizen s;sniffer;2019-01-31;2020-08-31 +Bunschoten s;sniffer;2018-11-30;20-08-31 +Cornwerd s;sniffer;2019-02-28;2020-09-25 +Hengelo s;sniffer;2019-01-22;2020-09-04 +Hulst s;sniffer;2019-05-31;2020-09-09 +Lemelerveld s;sniffer;2019-02-28;2020-08-03 +Markelo s;sniffer;2019-03-01;2020-06-30 +Middenmeer s;sniffer;2018-12-31;2021-01-01 +Sevenum s;sniffer;19-02-28;2019-10-31 +Ysselstein s;sniffer;2019-05-31;2020-09-03 +Bedum g;greenfeed;2019-05-28;2019-06-18 +Hengelo g;greenfeed;2020-05-03;2020-09-15 +Hengelo g;greenfeed;2020-02-20;2019-04-25 +Hulst g;greenfeed;2020-05-04;2020-08-23 +Hulst g;greenfeed;2019-10-22;2019-11-18 +Hulst g;greenfeed;2019-06-20;2019-07-16 +Leeuwarden g;greenfeed;2018-12-17;2019-01-14 +Leeuwarden g;greenfeed;2020-02-10;2020-04-21 +Ysselstein g;greenfeed;2020-02-07;2020-03-12 +Ysselstein g;greenfeed;2019-05-08;2019-06-12 +Zegveld g;greenfeed;2019-10-03;2020-01-14 +Hengelo B;barn;2018-12-10;2020-11-03 +Ysselstein B;barn;2018-11-13;2020-11-03 \ No newline at end of file diff --git a/kiss_data_train.ipynb b/kiss_data_train.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..115654f7a699b4892faa125a17b53593cdb394df --- /dev/null +++ b/kiss_data_train.ipynb @@ -0,0 +1,1622 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "hRVHLnJDZ_5x" + }, + "source": [ + "# POC Farm Data Train Notebook\n", + "Goal of the train: run queries in separated environments without granting the notebook owner access to all the data. " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ev-naMoKaNAc" + }, + "source": [ + "## Station 1 Methane data lake\n", + "Q Please return all farms in datalake\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 654 + }, + "id": "4H0j3eDyahlM", + "outputId": "d2964efd-c1ce-491b-8c1c-6703521f0697" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: plotly.express in /usr/local/lib/python3.7/site-packages (0.4.1)\n", + "Requirement already satisfied: scipy>=0.18 in /usr/local/lib/python3.7/site-packages (from plotly.express) (1.6.0)\n", + "Requirement already satisfied: plotly>=4.1.0 in /usr/local/lib/python3.7/site-packages (from plotly.express) (4.14.3)\n", + "Requirement already satisfied: statsmodels>=0.9.0 in /usr/local/lib/python3.7/site-packages (from plotly.express) (0.12.1)\n", + "Requirement already satisfied: pandas>=0.20.0 in /usr/local/lib/python3.7/site-packages (from plotly.express) (1.2.1)\n", + "Requirement already satisfied: numpy>=1.11 in /usr/local/lib/python3.7/site-packages (from plotly.express) (1.19.5)\n", + "Requirement already satisfied: patsy>=0.5 in /usr/local/lib/python3.7/site-packages (from plotly.express) (0.5.1)\n", + "Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.7/site-packages (from pandas>=0.20.0->plotly.express) (2020.5)\n", + "Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/site-packages (from pandas>=0.20.0->plotly.express) (2.8.1)\n", + "Requirement already satisfied: six in /usr/local/lib/python3.7/site-packages (from patsy>=0.5->plotly.express) (1.15.0)\n", + "Requirement already satisfied: retrying>=1.3.3 in /usr/local/lib/python3.7/site-packages (from plotly>=4.1.0->plotly.express) (1.3.3)\n", + "Requirement already satisfied: plotly in /usr/local/lib/python3.7/site-packages (4.14.3)\n", + "Requirement already satisfied: six in /usr/local/lib/python3.7/site-packages (from plotly) (1.15.0)\n", + "Requirement already satisfied: retrying>=1.3.3 in /usr/local/lib/python3.7/site-packages (from plotly) (1.3.3)\n" + ] + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "fill": "toself", + "fillcolor": "rgb(255, 127, 14)", + "hoverinfo": "name", + "legendgroup": "rgb(255, 127, 14)", + "mode": "none", + "name": "greenfeed", + "showlegend": true, + "type": "scatter", + "x": [ + "2019-05-28", + "2019-06-18", + "2019-06-18", + "2019-05-28", + "2019-05-28", + "2020-02-20", + "2019-04-25", + "2019-04-25", + "2020-02-20", + "2020-02-20", + "2020-05-03", + "2020-09-15", + "2020-09-15", + "2020-05-03", + "2020-05-03", + "2020-05-04", + "2020-08-23", + "2020-08-23", + "2020-05-04", + "2020-05-04", + "2019-10-22", + "2019-11-18", + "2019-11-18", + "2019-10-22", + "2019-10-22", + "2019-06-20", + "2019-07-16", + "2019-07-16", + "2019-06-20", + "2019-06-20", + "2018-12-17", + "2019-01-14", + "2019-01-14", + "2018-12-17", + "2018-12-17", + "2020-02-10", + "2020-04-21", + "2020-04-21", + "2020-02-10", + "2020-02-10", + "2020-02-07", + "2020-03-12", + "2020-03-12", + "2020-02-07", + "2020-02-07", + "2019-05-08", + "2019-06-12", + "2019-06-12", + "2019-05-08", + "2019-05-08", + "2019-10-03", + "2020-01-14", + "2020-01-14", + "2019-10-03" + ], + "y": [ + 17.8, + 17.8, + 18.2, + 18.2, + null, + 11.8, + 11.8, + 12.2, + 12.2, + null, + 11.8, + 11.8, + 12.2, + 12.2, + null, + 9.8, + 9.8, + 10.2, + 10.2, + null, + 9.8, + 9.8, + 10.2, + 10.2, + null, + 9.8, + 9.8, + 10.2, + 10.2, + null, + 7.8, + 7.8, + 8.2, + 8.2, + null, + 7.8, + 7.8, + 8.2, + 8.2, + null, + 1.8, + 1.8, + 2.2, + 2.2, + null, + 1.8, + 1.8, + 2.2, + 2.2, + null, + -0.2, + -0.2, + 0.2, + 0.2 + ] + }, + { + "fill": "toself", + "fillcolor": "rgb(31, 119, 180)", + "hoverinfo": "name", + "legendgroup": "rgb(31, 119, 180)", + "mode": "none", + "name": "barn", + "showlegend": true, + "type": "scatter", + "x": [ + "2018-12-10", + "2020-11-03", + "2020-11-03", + "2018-12-10", + "2018-12-10", + "2018-11-13", + "2020-11-03", + "2020-11-03", + "2018-11-13" + ], + "y": [ + 12.8, + 12.8, + 13.2, + 13.2, + null, + 2.8, + 2.8, + 3.2, + 3.2 + ] + }, + { + "fill": "toself", + "fillcolor": "rgb(44, 160, 44)", + "hoverinfo": "name", + "legendgroup": "rgb(44, 160, 44)", + "mode": "none", + "name": "sniffer", + "showlegend": true, + "type": "scatter", + "x": [ + "2019-04-01", + "2020-08-31", + "2020-08-31", + "2019-04-01", + "2019-04-01", + "2019-01-31", + "2020-08-31", + "2020-08-31", + "2019-01-31", + "2019-01-31", + "2018-11-30", + "20-08-31", + "20-08-31", + "2018-11-30", + "2018-11-30", + "2019-02-28", + "2020-09-25", + "2020-09-25", + "2019-02-28", + "2019-02-28", + "2019-01-22", + "2020-09-04", + "2020-09-04", + "2019-01-22", + "2019-01-22", + "2019-05-31", + "2020-09-09", + "2020-09-09", + "2019-05-31", + "2019-05-31", + "2019-02-28", + "2020-08-03", + "2020-08-03", + "2019-02-28", + "2019-02-28", + "2019-03-01", + "2020-06-30", + "2020-06-30", + "2019-03-01", + "2019-03-01", + "2018-12-31", + "2021-01-01", + "2021-01-01", + "2018-12-31", + "2018-12-31", + "19-02-28", + "2019-10-31", + "2019-10-31", + "19-02-28", + "19-02-28", + "2019-05-31", + "2020-09-03", + "2020-09-03", + "2019-05-31" + ], + "y": [ + 16.8, + 16.8, + 17.2, + 17.2, + null, + 15.8, + 15.8, + 16.2, + 16.2, + null, + 14.8, + 14.8, + 15.2, + 15.2, + null, + 13.8, + 13.8, + 14.2, + 14.2, + null, + 10.8, + 10.8, + 11.2, + 11.2, + null, + 8.8, + 8.8, + 9.2, + 9.2, + null, + 6.8, + 6.8, + 7.2, + 7.2, + null, + 5.8, + 5.8, + 6.2, + 6.2, + null, + 4.8, + 4.8, + 5.2, + 5.2, + null, + 3.8, + 3.8, + 4.2, + 4.2, + null, + 0.8, + 0.8, + 1.2, + 1.2 + ] + }, + { + "legendgroup": "rgb(255, 127, 14)", + "marker": { + "color": "rgb(255, 127, 14)", + "opacity": 0, + "size": 1 + }, + "mode": "markers", + "name": "", + "showlegend": false, + "text": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ], + "type": "scatter", + "x": [ + "2019-05-28", + "2019-06-18", + "2020-02-20", + "2019-04-25", + "2020-05-03", + "2020-09-15", + "2020-05-04", + "2020-08-23", + "2019-10-22", + "2019-11-18", + "2019-06-20", + "2019-07-16", + "2018-12-17", + "2019-01-14", + "2020-02-10", + "2020-04-21", + "2020-02-07", + "2020-03-12", + "2019-05-08", + "2019-06-12", + "2019-10-03", + "2020-01-14" + ], + "y": [ + 18, + 18, + 12, + 12, + 12, + 12, + 10, + 10, + 10, + 10, + 10, + 10, + 8, + 8, + 8, + 8, + 2, + 2, + 2, + 2, + 0, + 0 + ] + }, + { + "legendgroup": "rgb(31, 119, 180)", + "marker": { + "color": "rgb(31, 119, 180)", + "opacity": 0, + "size": 1 + }, + "mode": "markers", + "name": "", + "showlegend": false, + "text": [ + null, + null, + null, + null + ], + "type": "scatter", + "x": [ + "2018-12-10", + "2020-11-03", + "2018-11-13", + "2020-11-03" + ], + "y": [ + 13, + 13, + 3, + 3 + ] + }, + { + "legendgroup": "rgb(44, 160, 44)", + "marker": { + "color": "rgb(44, 160, 44)", + "opacity": 0, + "size": 1 + }, + "mode": "markers", + "name": "", + "showlegend": false, + "text": [ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ], + "type": "scatter", + "x": [ + "2019-04-01", + "2020-08-31", + "2019-01-31", + "2020-08-31", + "2018-11-30", + "20-08-31", + "2019-02-28", + "2020-09-25", + "2019-01-22", + "2020-09-04", + "2019-05-31", + "2020-09-09", + "2019-02-28", + "2020-08-03", + "2019-03-01", + "2020-06-30", + "2018-12-31", + "2021-01-01", + "19-02-28", + "2019-10-31", + "2019-05-31", + "2020-09-03" + ], + "y": [ + 17, + 17, + 16, + 16, + 15, + 15, + 14, + 14, + 11, + 11, + 9, + 9, + 7, + 7, + 6, + 6, + 5, + 5, + 4, + 4, + 1, + 1 + ] + } + ], + "layout": { + "height": 600, + "hovermode": "closest", + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Gantt Chart" + }, + "xaxis": { + "rangeselector": { + "buttons": [ + { + "count": 7, + "label": "1w", + "step": "day", + "stepmode": "backward" + }, + { + "count": 1, + "label": "1m", + "step": "month", + "stepmode": "backward" + }, + { + "count": 6, + "label": "6m", + "step": "month", + "stepmode": "backward" + }, + { + "count": 1, + "label": "YTD", + "step": "year", + "stepmode": "todate" + }, + { + "count": 1, + "label": "1y", + "step": "year", + "stepmode": "backward" + }, + { + "step": "all" + } + ] + }, + "showgrid": false, + "type": "date", + "zeroline": false + }, + "yaxis": { + "autorange": false, + "range": [ + -1, + 20 + ], + "showgrid": false, + "ticktext": [ + "Zegveld g", + "Ysselstein s", + "Ysselstein g", + "Ysselstein B", + "Sevenum s", + "Middenmeer s", + "Markelo s", + "Lemelerveld s", + "Leeuwarden g", + "Hulst s", + "Hulst g", + "Hengelo s", + "Hengelo g", + "Hengelo B", + "Cornwerd s", + "Bunschoten s", + "Biddinghuizen s", + "Bedum s", + "Bedum g" + ], + "tickvals": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18 + ], + "zeroline": false + } + } + }, + "text/html": [ + "<div> <div id=\"714718b0-531c-4fa6-8677-a5ce0f3ea5da\" class=\"plotly-graph-div\" style=\"height:600px; width:100%;\"></div> <script type=\"text/javascript\"> require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById(\"714718b0-531c-4fa6-8677-a5ce0f3ea5da\")) { Plotly.newPlot( \"714718b0-531c-4fa6-8677-a5ce0f3ea5da\", [{\"fill\": \"toself\", \"fillcolor\": \"rgb(255, 127, 14)\", \"hoverinfo\": \"name\", \"legendgroup\": \"rgb(255, 127, 14)\", \"mode\": \"none\", \"name\": \"greenfeed\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [\"2019-05-28\", \"2019-06-18\", \"2019-06-18\", \"2019-05-28\", \"2019-05-28\", \"2020-02-20\", \"2019-04-25\", \"2019-04-25\", \"2020-02-20\", \"2020-02-20\", \"2020-05-03\", \"2020-09-15\", \"2020-09-15\", \"2020-05-03\", \"2020-05-03\", \"2020-05-04\", \"2020-08-23\", \"2020-08-23\", \"2020-05-04\", \"2020-05-04\", \"2019-10-22\", \"2019-11-18\", \"2019-11-18\", \"2019-10-22\", \"2019-10-22\", \"2019-06-20\", \"2019-07-16\", \"2019-07-16\", \"2019-06-20\", \"2019-06-20\", \"2018-12-17\", \"2019-01-14\", \"2019-01-14\", \"2018-12-17\", \"2018-12-17\", \"2020-02-10\", \"2020-04-21\", \"2020-04-21\", \"2020-02-10\", \"2020-02-10\", \"2020-02-07\", \"2020-03-12\", \"2020-03-12\", \"2020-02-07\", \"2020-02-07\", \"2019-05-08\", \"2019-06-12\", \"2019-06-12\", \"2019-05-08\", \"2019-05-08\", \"2019-10-03\", \"2020-01-14\", \"2020-01-14\", \"2019-10-03\"], \"y\": [17.8, 17.8, 18.2, 18.2, null, 11.8, 11.8, 12.2, 12.2, null, 11.8, 11.8, 12.2, 12.2, null, 9.8, 9.8, 10.2, 10.2, null, 9.8, 9.8, 10.2, 10.2, null, 9.8, 9.8, 10.2, 10.2, null, 7.8, 7.8, 8.2, 8.2, null, 7.8, 7.8, 8.2, 8.2, null, 1.8, 1.8, 2.2, 2.2, null, 1.8, 1.8, 2.2, 2.2, null, -0.2, -0.2, 0.2, 0.2]}, {\"fill\": \"toself\", \"fillcolor\": \"rgb(31, 119, 180)\", \"hoverinfo\": \"name\", \"legendgroup\": \"rgb(31, 119, 180)\", \"mode\": \"none\", \"name\": \"barn\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [\"2018-12-10\", \"2020-11-03\", \"2020-11-03\", \"2018-12-10\", \"2018-12-10\", \"2018-11-13\", \"2020-11-03\", \"2020-11-03\", \"2018-11-13\"], \"y\": [12.8, 12.8, 13.2, 13.2, null, 2.8, 2.8, 3.2, 3.2]}, {\"fill\": \"toself\", \"fillcolor\": \"rgb(44, 160, 44)\", \"hoverinfo\": \"name\", \"legendgroup\": \"rgb(44, 160, 44)\", \"mode\": \"none\", \"name\": \"sniffer\", \"showlegend\": true, \"type\": \"scatter\", \"x\": [\"2019-04-01\", \"2020-08-31\", \"2020-08-31\", \"2019-04-01\", \"2019-04-01\", \"2019-01-31\", \"2020-08-31\", \"2020-08-31\", \"2019-01-31\", \"2019-01-31\", \"2018-11-30\", \"20-08-31\", \"20-08-31\", \"2018-11-30\", \"2018-11-30\", \"2019-02-28\", \"2020-09-25\", \"2020-09-25\", \"2019-02-28\", \"2019-02-28\", \"2019-01-22\", \"2020-09-04\", \"2020-09-04\", \"2019-01-22\", \"2019-01-22\", \"2019-05-31\", \"2020-09-09\", \"2020-09-09\", \"2019-05-31\", \"2019-05-31\", \"2019-02-28\", \"2020-08-03\", \"2020-08-03\", \"2019-02-28\", \"2019-02-28\", \"2019-03-01\", \"2020-06-30\", \"2020-06-30\", \"2019-03-01\", \"2019-03-01\", \"2018-12-31\", \"2021-01-01\", \"2021-01-01\", \"2018-12-31\", \"2018-12-31\", \"19-02-28\", \"2019-10-31\", \"2019-10-31\", \"19-02-28\", \"19-02-28\", \"2019-05-31\", \"2020-09-03\", \"2020-09-03\", \"2019-05-31\"], \"y\": [16.8, 16.8, 17.2, 17.2, null, 15.8, 15.8, 16.2, 16.2, null, 14.8, 14.8, 15.2, 15.2, null, 13.8, 13.8, 14.2, 14.2, null, 10.8, 10.8, 11.2, 11.2, null, 8.8, 8.8, 9.2, 9.2, null, 6.8, 6.8, 7.2, 7.2, null, 5.8, 5.8, 6.2, 6.2, null, 4.8, 4.8, 5.2, 5.2, null, 3.8, 3.8, 4.2, 4.2, null, 0.8, 0.8, 1.2, 1.2]}, {\"legendgroup\": \"rgb(255, 127, 14)\", \"marker\": {\"color\": \"rgb(255, 127, 14)\", \"opacity\": 0, \"size\": 1}, \"mode\": \"markers\", \"name\": \"\", \"showlegend\": false, \"text\": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], \"type\": \"scatter\", \"x\": [\"2019-05-28\", \"2019-06-18\", \"2020-02-20\", \"2019-04-25\", \"2020-05-03\", \"2020-09-15\", \"2020-05-04\", \"2020-08-23\", \"2019-10-22\", \"2019-11-18\", \"2019-06-20\", \"2019-07-16\", \"2018-12-17\", \"2019-01-14\", \"2020-02-10\", \"2020-04-21\", \"2020-02-07\", \"2020-03-12\", \"2019-05-08\", \"2019-06-12\", \"2019-10-03\", \"2020-01-14\"], \"y\": [18, 18, 12, 12, 12, 12, 10, 10, 10, 10, 10, 10, 8, 8, 8, 8, 2, 2, 2, 2, 0, 0]}, {\"legendgroup\": \"rgb(31, 119, 180)\", \"marker\": {\"color\": \"rgb(31, 119, 180)\", \"opacity\": 0, \"size\": 1}, \"mode\": \"markers\", \"name\": \"\", \"showlegend\": false, \"text\": [null, null, null, null], \"type\": \"scatter\", \"x\": [\"2018-12-10\", \"2020-11-03\", \"2018-11-13\", \"2020-11-03\"], \"y\": [13, 13, 3, 3]}, {\"legendgroup\": \"rgb(44, 160, 44)\", \"marker\": {\"color\": \"rgb(44, 160, 44)\", \"opacity\": 0, \"size\": 1}, \"mode\": \"markers\", \"name\": \"\", \"showlegend\": false, \"text\": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], \"type\": \"scatter\", \"x\": [\"2019-04-01\", \"2020-08-31\", \"2019-01-31\", \"2020-08-31\", \"2018-11-30\", \"20-08-31\", \"2019-02-28\", \"2020-09-25\", \"2019-01-22\", \"2020-09-04\", \"2019-05-31\", \"2020-09-09\", \"2019-02-28\", \"2020-08-03\", \"2019-03-01\", \"2020-06-30\", \"2018-12-31\", \"2021-01-01\", \"19-02-28\", \"2019-10-31\", \"2019-05-31\", \"2020-09-03\"], \"y\": [17, 17, 16, 16, 15, 15, 14, 14, 11, 11, 9, 9, 7, 7, 6, 6, 5, 5, 4, 4, 1, 1]}], {\"height\": 600, \"hovermode\": \"closest\", \"showlegend\": true, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"autotypenumbers\": \"strict\", \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"title\": {\"text\": \"Gantt Chart\"}, \"xaxis\": {\"rangeselector\": {\"buttons\": [{\"count\": 7, \"label\": \"1w\", \"step\": \"day\", \"stepmode\": \"backward\"}, {\"count\": 1, \"label\": \"1m\", \"step\": \"month\", \"stepmode\": \"backward\"}, {\"count\": 6, \"label\": \"6m\", \"step\": \"month\", \"stepmode\": \"backward\"}, {\"count\": 1, \"label\": \"YTD\", \"step\": \"year\", \"stepmode\": \"todate\"}, {\"count\": 1, \"label\": \"1y\", \"step\": \"year\", \"stepmode\": \"backward\"}, {\"step\": \"all\"}]}, \"showgrid\": false, \"type\": \"date\", \"zeroline\": false}, \"yaxis\": {\"autorange\": false, \"range\": [-1, 20], \"showgrid\": false, \"ticktext\": [\"Zegveld g\", \"Ysselstein s\", \"Ysselstein g\", \"Ysselstein B\", \"Sevenum s\", \"Middenmeer s\", \"Markelo s\", \"Lemelerveld s\", \"Leeuwarden g\", \"Hulst s\", \"Hulst g\", \"Hengelo s\", \"Hengelo g\", \"Hengelo B\", \"Cornwerd s\", \"Bunschoten s\", \"Biddinghuizen s\", \"Bedum s\", \"Bedum g\"], \"tickvals\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], \"zeroline\": false}}, {\"responsive\": true} ).then(function(){\n", + " \n", + "var gd = document.getElementById('714718b0-531c-4fa6-8677-a5ce0f3ea5da');\n", + "var x = new MutationObserver(function (mutations, observer) {{\n", + " var display = window.getComputedStyle(gd).display;\n", + " if (!display || display === 'none') {{\n", + " console.log([gd, 'removed!']);\n", + " Plotly.purge(gd);\n", + " observer.disconnect();\n", + " }}\n", + "}});\n", + "\n", + "// Listen for the removal of the full notebook cells\n", + "var notebookContainer = gd.closest('#notebook-container');\n", + "if (notebookContainer) {{\n", + " x.observe(notebookContainer, {childList: true});\n", + "}}\n", + "\n", + "// Listen for the clearing of the current output cell\n", + "var outputEl = gd.closest('.output');\n", + "if (outputEl) {{\n", + " x.observe(outputEl, {childList: true});\n", + "}}\n", + "\n", + " }) }; }); </script> </div>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# # install dependencies\n", + "# # !pip3 install azure-storage-blob \n", + "# # !pip3 install azure-keyvault\n", + "!pip3 install plotly.express\n", + "!pip3 install plotly\n", + "# # !pip3 install azure-identity\n", + "# # string = \"connection string removed after running container\"\n", + "\n", + "import os, uuid\n", + "# # from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient, __version__\n", + "import pandas as pd\n", + "import pandas as pd\n", + "\n", + "import io\n", + "import plotly.figure_factory as ff\n", + "\n", + "# get simple dataframe from data-lake\n", + "def getData():\n", + " # fake data returned by datalake, because persistent storage is not available in poc\n", + " return pd.read_csv('data/station1.csv', sep=';')\n", + "\n", + "# do some fun stuff with the data\n", + "def plot(df):\n", + " df = df.sort_values('Task')\n", + " df = df.to_dict(orient='records')\n", + " fig = ff.create_gantt(df, index_col='Data', show_colorbar=True, group_tasks=True)\n", + " fig.show()\n", + "\n", + "df = getData()\n", + "\n", + "\n", + "plot(df)\n", + "\n", + "# dict = df.to_dict(orient='index')\n" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [], + "source": [ + "def plot(df):\n", + " df = df.sort_values('Task')\n", + " df = df.to_dict(orient='records')\n", + " fig = ff.create_gantt(df, index_col='Data', show_colorbar=True, group_tasks=True)\n", + " fig.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "RK7UWz3fe7XR", + "outputId": "a1687828-14c6-4d01-801c-4a58fc203145" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "dictionary for Agro data cube\n", + "{0: {'Unnamed: 0': 0, 'Unnamed: 0.1': 0, 'Unnamed: 0.1.1': 0, 'Task': ' Bedum s', 'Data': 'sniffer', 'Start': '2019-04-01', 'Finish': '2020-08-31'}, 1: {'Unnamed: 0': 1, 'Unnamed: 0.1': 1, 'Unnamed: 0.1.1': 1, 'Task': ' Biddinghuizen s', 'Data': 'sniffer', 'Start': '2019-01-31', 'Finish': '2020-08-31'}, 2: {'Unnamed: 0': 2, 'Unnamed: 0.1': 2, 'Unnamed: 0.1.1': 2, 'Task': ' Bunschoten s', 'Data': 'sniffer', 'Start': '2018-11-30', 'Finish': '20-08-31'}, 3: {'Unnamed: 0': 3, 'Unnamed: 0.1': 3, 'Unnamed: 0.1.1': 3, 'Task': ' Cornwerd s', 'Data': 'sniffer', 'Start': '2019-02-28', 'Finish': '2020-09-25'}, 4: {'Unnamed: 0': 4, 'Unnamed: 0.1': 4, 'Unnamed: 0.1.1': 4, 'Task': ' Hengelo s', 'Data': 'sniffer', 'Start': '2019-01-22', 'Finish': '2020-09-04'}, 5: {'Unnamed: 0': 5, 'Unnamed: 0.1': 5, 'Unnamed: 0.1.1': 5, 'Task': ' Hulst s', 'Data': 'sniffer', 'Start': '2019-05-31', 'Finish': '2020-09-09'}, 6: {'Unnamed: 0': 6, 'Unnamed: 0.1': 6, 'Unnamed: 0.1.1': 6, 'Task': ' Lemelerveld s', 'Data': 'sniffer', 'Start': '2019-02-28', 'Finish': '2020-08-03'}, 7: {'Unnamed: 0': 7, 'Unnamed: 0.1': 7, 'Unnamed: 0.1.1': 7, 'Task': ' Markelo s', 'Data': 'sniffer', 'Start': '2019-03-01', 'Finish': '2020-06-30'}, 8: {'Unnamed: 0': 8, 'Unnamed: 0.1': 8, 'Unnamed: 0.1.1': 8, 'Task': ' Middenmeer s', 'Data': 'sniffer', 'Start': '2018-12-31', 'Finish': '2021-01-01'}, 9: {'Unnamed: 0': 9, 'Unnamed: 0.1': 9, 'Unnamed: 0.1.1': 9, 'Task': ' Sevenum s', 'Data': 'sniffer', 'Start': '19-02-28', 'Finish': '2019-10-31'}, 10: {'Unnamed: 0': 10, 'Unnamed: 0.1': 10, 'Unnamed: 0.1.1': 10, 'Task': ' Ysselstein s', 'Data': 'sniffer', 'Start': '2019-05-31', 'Finish': '2020-09-03'}, 11: {'Unnamed: 0': 11, 'Unnamed: 0.1': 11, 'Unnamed: 0.1.1': 11, 'Task': ' Bedum g', 'Data': 'greenfeed', 'Start': '2019-05-28', 'Finish': '2019-06-18'}, 12: {'Unnamed: 0': 12, 'Unnamed: 0.1': 12, 'Unnamed: 0.1.1': 12, 'Task': ' Hengelo g', 'Data': 'greenfeed', 'Start': '2020-05-03', 'Finish': '2020-09-15'}, 13: {'Unnamed: 0': 13, 'Unnamed: 0.1': 13, 'Unnamed: 0.1.1': 13, 'Task': ' Hengelo g', 'Data': 'greenfeed', 'Start': '2020-02-20', 'Finish': '2019-04-25'}, 14: {'Unnamed: 0': 14, 'Unnamed: 0.1': 14, 'Unnamed: 0.1.1': 14, 'Task': ' Hulst g', 'Data': 'greenfeed', 'Start': '2020-05-04', 'Finish': '2020-08-23'}, 15: {'Unnamed: 0': 15, 'Unnamed: 0.1': 15, 'Unnamed: 0.1.1': 15, 'Task': ' Hulst g', 'Data': 'greenfeed', 'Start': '2019-10-22', 'Finish': '2019-11-18'}, 16: {'Unnamed: 0': 16, 'Unnamed: 0.1': 16, 'Unnamed: 0.1.1': 16, 'Task': ' Hulst g', 'Data': 'greenfeed', 'Start': '2019-06-20', 'Finish': '2019-07-16'}, 17: {'Unnamed: 0': 17, 'Unnamed: 0.1': 17, 'Unnamed: 0.1.1': 17, 'Task': ' Leeuwarden g', 'Data': 'greenfeed', 'Start': '2018-12-17', 'Finish': '2019-01-14'}, 18: {'Unnamed: 0': 18, 'Unnamed: 0.1': 18, 'Unnamed: 0.1.1': 18, 'Task': ' Leeuwarden g', 'Data': 'greenfeed', 'Start': '2020-02-10', 'Finish': '2020-04-21'}, 19: {'Unnamed: 0': 19, 'Unnamed: 0.1': 19, 'Unnamed: 0.1.1': 19, 'Task': ' Ysselstein g', 'Data': 'greenfeed', 'Start': '2020-02-07', 'Finish': '2020-03-12'}, 20: {'Unnamed: 0': 20, 'Unnamed: 0.1': 20, 'Unnamed: 0.1.1': 20, 'Task': ' Ysselstein g', 'Data': 'greenfeed', 'Start': '2019-05-08', 'Finish': '2019-06-12'}, 21: {'Unnamed: 0': 21, 'Unnamed: 0.1': 21, 'Unnamed: 0.1.1': 21, 'Task': ' Zegveld g', 'Data': 'greenfeed', 'Start': '2019-10-03', 'Finish': '2020-01-14'}, 22: {'Unnamed: 0': 22, 'Unnamed: 0.1': 22, 'Unnamed: 0.1.1': 22, 'Task': ' Hengelo B', 'Data': 'barn', 'Start': '2018-12-10', 'Finish': '2020-11-03'}, 23: {'Unnamed: 0': 23, 'Unnamed: 0.1': 23, 'Unnamed: 0.1.1': 23, 'Task': ' Ysselstein B', 'Data': 'barn', 'Start': '2018-11-13', 'Finish': '2020-11-03'}}\n" + ] + } + ], + "source": [ + "print('dictionary for Agro data cube')\n", + "print(dict)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "jHQDrBGtbzRc" + }, + "source": [ + "## Station 2 Agro data cube\n", + "Q please populate average temperature for each farm in the Methane datalake dictionary\n" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "id": "YEQeiOkHb5Xr" + }, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (<ipython-input-25-698d20d86fcf>, line 1)", + "output_type": "error", + "traceback": [ + "\u001b[0;36m File \u001b[0;32m\"<ipython-input-25-698d20d86fcf>\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m def collect(df)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "def collect(df)\n", + " #fetch data from AgroDataCube\n", + " return df\n", + "\n", + "df = collect(df)\n", + "df.to_csv('data/station2.csv')\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "colab": { + "name": "kiss data train.ipynb", + "provenance": [], + "toc_visible": true + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 1 +}