Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MetObsAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
MetObsAPI
Commits
610561b5
Unverified
Commit
610561b5
authored
Mar 9, 2017
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Fix wind direction in data api
parent
2d760b93
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
metobsapi/data_api.py
+3
-4
3 additions, 4 deletions
metobsapi/data_api.py
with
3 additions
and
4 deletions
metobsapi/data_api.py
+
3
−
4
View file @
610561b5
...
...
@@ -92,9 +92,8 @@ def handle_influxdb_result(result, symbols, interval):
frame
=
pd
.
DataFrame
(
data_points
,
columns
=
[
'
time
'
]
+
influx_symbs
)
frame
.
set_index
(
'
time
'
,
inplace
=
True
)
frame
.
fillna
(
value
=
np
.
nan
,
inplace
=
True
)
if
influx_symbs
[
-
1
]
==
'
wind_north
'
:
# remove wind components
if
'
wind_dir
'
in
frame
.
columns
:
if
influx_symbs
[
-
1
]
==
'
wind_north
'
and
'
wind_dir
ection
'
in
frame
.
columns
:
frame
[
'
wind_direction
'
]
=
np
.
rad2deg
(
np
.
arctan2
(
frame
[
'
wind_east
'
],
frame
[
'
wind_north
'
]))
frame
=
frame
.
iloc
[:,
:
-
2
]
frame
.
columns
=
req_syms
[:
-
2
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment