aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xskewt.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/skewt.py b/skewt.py
index 52aeed6..9646fed 100755
--- a/skewt.py
+++ b/skewt.py
@@ -23,9 +23,9 @@ TIME='23:00:00'
URL=f'http://weather.uwyo.edu/cgi-bin/bufrraob.py?datetime={DATE}%20{TIME}&id={STATION}&type=TEXT:CSV'
print(URL)
-#result = requests.get(URL)
-#RAW_DATA_LINES=result.content.decode('UTF-8').splitlines()
-RAW_DATA_LINES= open('data.csv').readlines()
+result = requests.get(URL)
+RAW_DATA_LINES=result.content.decode('UTF-8').splitlines()
+#RAW_DATA_LINES= open('data.csv').readlines()
p = []
T = []
@@ -40,6 +40,9 @@ for row in csvreader:
# skip any line with empty values
continue
+ if float(row[3]) in p: # Skip double p entries
+ continue
+
p.append(float(row[3]))
T.append(float(row[5]))
Td.append(float(row[6]))