Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PreprocessWeatherData
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dasharatha.vamshi
PreprocessWeatherData
Commits
5c2d105f
Commit
5c2d105f
authored
Mar 02, 2021
by
dasharatha.vamshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
e1e6add9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
21 deletions
+26
-21
logs/PreprocessWeatherData.log
logs/PreprocessWeatherData.log
+3
-0
main.py
main.py
+23
-21
scripts/common/__pycache__/config_parser.cpython-37.pyc
scripts/common/__pycache__/config_parser.cpython-37.pyc
+0
-0
No files found.
logs/PreprocessWeatherData.log
View file @
5c2d105f
...
@@ -16,3 +16,6 @@ FileNotFoundError: [WinError 3] The system cannot find the path specified: 'temp
...
@@ -16,3 +16,6 @@ FileNotFoundError: [WinError 3] The system cannot find the path specified: 'temp
2021-03-02 19:17:47,686 INFO PreprocessWeatherData Reading Json file
2021-03-02 19:17:47,686 INFO PreprocessWeatherData Reading Json file
2021-03-02 19:17:47,696 INFO PreprocessWeatherData Writing forcast data to csv file at temp/mnt/ilens/ai-job//pipe1/run1/RunModel/input\data.csv
2021-03-02 19:17:47,696 INFO PreprocessWeatherData Writing forcast data to csv file at temp/mnt/ilens/ai-job//pipe1/run1/RunModel/input\data.csv
2021-03-02 19:17:47,701 INFO PreprocessWeatherData Component executed Successfully
2021-03-02 19:17:47,701 INFO PreprocessWeatherData Component executed Successfully
2021-03-02 19:23:52,747 INFO PreprocessWeatherData Reading Json file
2021-03-02 19:23:52,761 INFO PreprocessWeatherData Writing forcast data to csv file at temp/mnt/ilens/ai-job//pipe1/run1/RunModel/input\data.csv
2021-03-02 19:23:52,766 INFO PreprocessWeatherData Component executed Successfully
main.py
View file @
5c2d105f
...
@@ -32,27 +32,29 @@ class PreProcessComponent:
...
@@ -32,27 +32,29 @@ class PreProcessComponent:
except
:
except
:
logger
.
info
(
"Failed reading Json File"
)
logger
.
info
(
"Failed reading Json File"
)
logger
.
info
(
traceback
.
format_exc
())
logger
.
info
(
traceback
.
format_exc
())
for
i
in
data
[
PreprocessWeatherDataConstants
.
DAYS_KEY
]:
try
:
self
.
date
.
append
(
i
[
PreprocessWeatherDataConstants
.
DATETIME_KEY
])
for
i
in
data
[
PreprocessWeatherDataConstants
.
DAYS_KEY
]:
self
.
ds
.
append
(
int
(
i
[
PreprocessWeatherDataConstants
.
DATETIME_KEY
]
.
split
(
"-"
)[
1
]))
self
.
date
.
append
(
i
[
PreprocessWeatherDataConstants
.
DATETIME_KEY
])
self
.
tempmax
.
append
(
i
[
PreprocessWeatherDataConstants
.
TEMPMAX_KEY
])
self
.
ds
.
append
(
int
(
i
[
PreprocessWeatherDataConstants
.
DATETIME_KEY
]
.
split
(
"-"
)[
1
]))
self
.
tempmin
.
append
(
i
[
PreprocessWeatherDataConstants
.
TEMPMIN_KEY
])
self
.
tempmax
.
append
(
i
[
PreprocessWeatherDataConstants
.
TEMPMAX_KEY
])
self
.
temp
.
append
(
i
[
PreprocessWeatherDataConstants
.
TEMP_KEY
])
self
.
tempmin
.
append
(
i
[
PreprocessWeatherDataConstants
.
TEMPMIN_KEY
])
self
.
humidity
.
append
(
i
[
PreprocessWeatherDataConstants
.
HUMIDITY_KEY
])
self
.
temp
.
append
(
i
[
PreprocessWeatherDataConstants
.
TEMP_KEY
])
self
.
precip
.
append
(
i
[
PreprocessWeatherDataConstants
.
PRECIP_KEY
])
self
.
humidity
.
append
(
i
[
PreprocessWeatherDataConstants
.
HUMIDITY_KEY
])
self
.
windspeed
.
append
(
i
[
PreprocessWeatherDataConstants
.
WINDSPEED_KEY
])
self
.
precip
.
append
(
i
[
PreprocessWeatherDataConstants
.
PRECIP_KEY
])
self
.
winddir
.
append
(
i
[
PreprocessWeatherDataConstants
.
WINDDIR_KEY
])
self
.
windspeed
.
append
(
i
[
PreprocessWeatherDataConstants
.
WINDSPEED_KEY
])
self
.
cloudcover
.
append
(
i
[
PreprocessWeatherDataConstants
.
CLOUDCOVER_KEY
])
self
.
winddir
.
append
(
i
[
PreprocessWeatherDataConstants
.
WINDDIR_KEY
])
self
.
visibility
.
append
(
i
[
PreprocessWeatherDataConstants
.
VISIBILITY_KEY
])
self
.
cloudcover
.
append
(
i
[
PreprocessWeatherDataConstants
.
CLOUDCOVER_KEY
])
forcast_data
=
pd
.
DataFrame
(
self
.
visibility
.
append
(
i
[
PreprocessWeatherDataConstants
.
VISIBILITY_KEY
])
{
"Maximum Temperature"
:
self
.
tempmax
,
"Minimum Temperature"
:
self
.
tempmin
,
"Temperature"
:
self
.
temp
,
forcast_data
=
pd
.
DataFrame
(
"Precipitation"
:
self
.
precip
,
"Wind Speed"
:
self
.
windspeed
,
"Wind Direction"
:
self
.
winddir
,
{
"Maximum Temperature"
:
self
.
tempmax
,
"Minimum Temperature"
:
self
.
tempmin
,
"Temperature"
:
self
.
temp
,
"Visibility"
:
self
.
visibility
,
"Cloud Cover"
:
self
.
cloudcover
,
"Precipitation"
:
self
.
precip
,
"Wind Speed"
:
self
.
windspeed
,
"Wind Direction"
:
self
.
winddir
,
"Relative Humidity"
:
self
.
humidity
,
"month"
:
self
.
ds
})
"Visibility"
:
self
.
visibility
,
"Cloud Cover"
:
self
.
cloudcover
,
forcast_data
.
fillna
(
method
=
null_value_method
,
inplace
=
True
)
"Relative Humidity"
:
self
.
humidity
,
"month"
:
self
.
ds
})
forcast_data
.
index
=
self
.
date
forcast_data
.
fillna
(
method
=
null_value_method
,
inplace
=
True
)
return
forcast_data
forcast_data
.
index
=
self
.
date
return
forcast_data
except
:
logger
.
info
(
traceback
.
format_exc
())
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
try
:
try
:
...
...
scripts/common/__pycache__/config_parser.cpython-37.pyc
View file @
5c2d105f
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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