Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Meurou
NF26 Project
Commits
d878f237
Commit
d878f237
authored
Jun 23, 2019
by
Tianyang
Browse files
Final version
parent
66bb71c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
.DS_Store
View file @
d878f237
No preview for this file type
question2.py
View file @
d878f237
...
...
@@ -28,7 +28,6 @@ def createMap(data):
"metar"
,
"mslp"
,
"p01i"
,
"peak_wind_drct"
,
"peak_wind_gust"
,
"peak_wind_time"
,
"relh"
,
"sknt"
,
"skyc1"
,
"skyc2"
,
"skyc3"
,
"skyc4"
,
"skyl1"
,
"skyl2"
,
"skyl3"
,
"skyl4"
,
"tmpf"
,
"vsby"
,
"wxcodes"
]
for
each
in
data
.
result
():
print
(
each
)
# Here we choose not to display the None values and the METAR ID
ls
=
[
"station:"
+
each
[
4
]
+
"
\n
"
]
l
=
[
attributes
[
i
]
+
":"
+
str
(
each
[
i
+
5
])
for
i
in
range
(
len
(
attributes
))
if
each
[
i
+
5
]
!=
None
...
...
question3.py
View file @
d878f237
...
...
@@ -257,8 +257,8 @@ def checkNBvariable (x):
if
__name__
==
"__main__"
:
session
=
connection
()
start
=
input
(
"Please enter the start time [form: AAAA-MM-DD (From 2008-1-1 to 2017-12-30)]: "
)
end
=
input
(
"Please enter the end time [form: AAAA-MM-DD (From 2008-1-1 to 2017-12-30)]: "
)
start
=
input
(
"Please enter the start time [form: AAAA-MM-DD (From 2008-1
2
-1
9
to 2017-12-30)]: "
)
end
=
input
(
"Please enter the end time [form: AAAA-MM-DD (From 2008-1
2
-1
9
to 2017-12-30)]: "
)
target
=
input
(
"Which indicator do you want to check [tmpf,dwpf,etc]: "
)
targetNB
=
checkNBvariable
(
target
)
#start = '2008-12-19'
...
...
question3_compare_month.py
View file @
d878f237
...
...
@@ -310,8 +310,8 @@ def checkNBvariable (x):
if
__name__
==
"__main__"
:
session
=
connection
()
start
=
input
(
"Please enter the start time [form: AAAA-MM-DD (From 2008-1-1 to 2017-12-30)]: "
)
end
=
input
(
"Please enter the end time [form: AAAA-MM-DD (From 2008-1-1 to 2017-12-30)]: "
)
start
=
input
(
"Please enter the start time [form: AAAA-MM-DD (From 2008-1
2
-1
9
to 2017-12-30)]: "
)
end
=
input
(
"Please enter the end time [form: AAAA-MM-DD (From 2008-1
2
-1
9
to 2017-12-30)]: "
)
target
=
input
(
"Which indicator do you want to check [tmpf,dwpf,etc]: "
)
targetNB
=
checkNBvariable
(
target
)
#start = '2008-01-01'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment