Skip to content

Commit f584910

Browse files
committed
Update Airflow_Visualiser.ipynb
fix
1 parent ea33481 commit f584910

1 file changed

Lines changed: 24 additions & 13 deletions

File tree

scripts/Airflow_Visualiser.ipynb

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": null,
6-
"id": "908ec2f7",
7-
"metadata": {},
8-
"outputs": [],
9-
"source": []
10-
},
11-
{
12-
"cell_type": "code",
13-
"execution_count": 12,
5+
"execution_count": 1,
146
"id": "26787210",
157
"metadata": {},
168
"outputs": [],
@@ -29,6 +21,7 @@
2921
"from ipywidgets import VBox, HBox\n",
3022
"import re\n",
3123
"from uncertainties import unumpy as unp\n",
24+
"from uncertainties import ufloat, nominal_value, std_dev\n",
3225
"\n",
3326
"\n",
3427
"# ---------------------------------------------------------------------\n",
@@ -45,8 +38,19 @@
4538
"# ---------------------------------------------------------------------\n",
4639
"# Functions Import\n",
4740
"# ---------------------------------------------------------------------\n",
48-
"from functions_MS import get_series, get_ECW\n",
49-
"\n",
41+
"def get_series(df, region):\n",
42+
" row = df.loc[region]\n",
43+
" row = row.iloc[2:]\n",
44+
" time = np.arange(len(row))\n",
45+
" values = np.array([nominal_value(v) for v in row])\n",
46+
" errors = np.array([std_dev(v) for v in row])\n",
47+
" return time, values, errors\n",
48+
"\n",
49+
"def get_ECW(df, region):\n",
50+
" row = df.loc[region]\n",
51+
" ECW_Upper = row[1]\n",
52+
" ECW_Lower = row[0]\n",
53+
" return ECW_Lower, ECW_Upper\n",
5054
"\n",
5155
"CADRPP = 100 # L/s\n",
5256
"UNRegion_list = ['Australia and New Zealand',\n",
@@ -109,7 +113,7 @@
109113
},
110114
{
111115
"cell_type": "code",
112-
"execution_count": 13,
116+
"execution_count": 2,
113117
"id": "9b973096",
114118
"metadata": {},
115119
"outputs": [
@@ -148,7 +152,7 @@
148152
{
149153
"data": {
150154
"application/vnd.jupyter.widget-view+json": {
151-
"model_id": "2f837238fc7c4820921e39e59aed9c6b",
155+
"model_id": "2b99829a20834bda8f090ed64be96eb2",
152156
"version_major": 2,
153157
"version_minor": 0
154158
},
@@ -158,6 +162,13 @@
158162
},
159163
"metadata": {},
160164
"output_type": "display_data"
165+
},
166+
{
167+
"name": "stdout",
168+
"output_type": "stream",
169+
"text": [
170+
"[INFO] region_to_iso mapping rebuilt automatically.\n"
171+
]
161172
}
162173
],
163174
"source": [

0 commit comments

Comments
 (0)