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
eea-tools
dat2csv
Commits
f8df1c00
Commit
f8df1c00
authored
Jan 27, 2017
by
Christoffer Stoll
Browse files
validation_flag 0 bug
parent
fd588489
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dat2csv.py
View file @
f8df1c00
...
...
@@ -84,13 +84,14 @@ def parse_dat(file_name, id, timezone):
for
c
in
range
(
2
,
len
(
l
)):
cols
=
l
[
c
].
split
(
","
)
if
len
(
cols
)
==
3
:
val
=
nlstrip
(
cols
[
2
])
d
=
OrderedDict
()
d
[
"sampling_point_id"
]
=
id
d
[
"begin_position"
]
=
parse_date
(
cols
[
0
],
timezone
)
d
[
"end_position"
]
=
parse_date
(
cols
[
0
],
timezone
,
24
if
timestep
==
"day"
else
1
)
d
[
"value"
]
=
cols
[
1
]
d
[
"verification_flag"
]
=
1
d
[
"validation_flag"
]
=
nlstrip
(
cols
[
2
])
d
[
"validation_flag"
]
=
-
1
if
val
==
0
else
val
d
[
"concentration"
]
=
"http://dd.eionet.europa.eu/vocabulary/uom/concentration/"
+
unit
d
[
"timestep"
]
=
"http://dd.eionet.europa.eu/vocabulary/aq/primaryObservation/"
+
timestep
a
.
append
(
d
)
...
...
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