FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ews-coordinator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gilligan Lab for Epidemiology and Modelling
Wheat rusts
ews-coordinator
Commits
34e55b76
Commit
34e55b76
authored
1 year ago
by
L. Bower
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/main' into main
parents
d8f6227c
f45dd933
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
coordinator/ProcessorSurveysWRSIS.py
+2
-4
2 additions, 4 deletions
coordinator/ProcessorSurveysWRSIS.py
coordinator/ProcessorSurveysWRT.py
+5
-2
5 additions, 2 deletions
coordinator/ProcessorSurveysWRT.py
with
7 additions
and
6 deletions
coordinator/ProcessorSurveysWRSIS.py
+
2
−
4
View file @
34e55b76
...
@@ -104,6 +104,7 @@ def nested_to_flattened(df):
...
@@ -104,6 +104,7 @@ def nested_to_flattened(df):
'
Rust Details
'
,
'
Rust Details
'
,
'
Other Disease
'
,
'
Other Disease
'
,
'
Sample Details
'
,
'
Sample Details
'
,
'
Survey Details.Survey No
'
,
'
Survey Details.Latitude
'
,
'
Survey Details.Latitude
'
,
'
Survey Details.First Rust Observation Date
'
,
'
Survey Details.First Rust Observation Date
'
,
'
Survey Details.Longitude
'
,
'
Survey Details.Longitude
'
,
...
@@ -163,7 +164,6 @@ def nested_to_flattened(df):
...
@@ -163,7 +164,6 @@ def nested_to_flattened(df):
'
live_stemrust_samples_count
'
,
'
live_stemrust_samples_count
'
,
'
dead_yellowrust_samples_count
'
,
'
dead_yellowrust_samples_count
'
,
'
SET-OF-live_leafrust_samples
'
,
'
SET-OF-live_leafrust_samples
'
,
'
KEY
'
,
'
other_diseases_group-other_diseases
'
,
'
other_diseases_group-other_diseases
'
,
'
survey_infromation-location-Altitude
'
,
'
survey_infromation-location-Altitude
'
,
'
SET-OF-dead_stemrust_samples
'
,
'
SET-OF-dead_stemrust_samples
'
,
...
@@ -178,9 +178,6 @@ def nested_to_flattened(df):
...
@@ -178,9 +178,6 @@ def nested_to_flattened(df):
for
i
in
NEW_COLUMNS
:
for
i
in
NEW_COLUMNS
:
df
[
i
]
=
""
df
[
i
]
=
""
#TODO: replace with a better KEY column
df
[
"
KEY
"
]
=
df
.
index
# add dedicated rust columns, with default values
# add dedicated rust columns, with default values
NEW_RUST_COLUMNS
=
{
"
Stem Rust.Incident
"
:
"
none
"
,
"
Stem Rust.Severity
"
:
"
-9
"
,
"
Stem Rust.Reaction
"
:
"
na
"
,
NEW_RUST_COLUMNS
=
{
"
Stem Rust.Incident
"
:
"
none
"
,
"
Stem Rust.Severity
"
:
"
-9
"
,
"
Stem Rust.Reaction
"
:
"
na
"
,
"
Leaf Rust.Incident
"
:
"
none
"
,
"
Leaf Rust.Severity
"
:
"
-9
"
,
"
Leaf Rust.Reaction
"
:
"
na
"
,
"
Leaf Rust.Incident
"
:
"
none
"
,
"
Leaf Rust.Severity
"
:
"
-9
"
,
"
Leaf Rust.Reaction
"
:
"
na
"
,
...
@@ -221,6 +218,7 @@ def get_WRSIS_form_as_csv(form_credentials: dict, jobPath: str, config: dict, st
...
@@ -221,6 +218,7 @@ def get_WRSIS_form_as_csv(form_credentials: dict, jobPath: str, config: dict, st
'
Rust Details
'
:
'
None
'
,
'
Rust Details
'
:
'
None
'
,
'
Other Disease
'
:
'
None
'
,
'
Other Disease
'
:
'
None
'
,
'
Sample Details
'
:
'
None
'
,
'
Sample Details
'
:
'
None
'
,
'
Survey Details.Survey No
'
:
'
KEY
'
,
'
Survey Details.Latitude
'
:
'
survey_infromation-location-Latitude
'
,
'
Survey Details.Latitude
'
:
'
survey_infromation-location-Latitude
'
,
'
Survey Details.First Rust Observation Date
'
:
'
None
'
,
'
Survey Details.First Rust Observation Date
'
:
'
None
'
,
'
Survey Details.Longitude
'
:
'
survey_infromation-location-Longitude
'
,
'
Survey Details.Longitude
'
:
'
survey_infromation-location-Longitude
'
,
...
...
This diff is collapsed.
Click to expand it.
coordinator/ProcessorSurveysWRT.py
+
5
−
2
View file @
34e55b76
...
@@ -114,7 +114,6 @@ def nested_to_flattened(df):
...
@@ -114,7 +114,6 @@ def nested_to_flattened(df):
'
live_stemrust_samples_count
'
,
'
live_stemrust_samples_count
'
,
'
dead_yellowrust_samples_count
'
,
'
dead_yellowrust_samples_count
'
,
'
SET-OF-live_leafrust_samples
'
,
'
SET-OF-live_leafrust_samples
'
,
'
KEY
'
,
'
other_diseases_group-other_diseases
'
,
'
other_diseases_group-other_diseases
'
,
'
survey_infromation-location-Altitude
'
,
'
survey_infromation-location-Altitude
'
,
'
SET-OF-dead_stemrust_samples
'
,
'
SET-OF-dead_stemrust_samples
'
,
...
@@ -234,7 +233,11 @@ def get_WRT_form_as_csv(form_credentials: dict, jobPath: str, config: dict, stat
...
@@ -234,7 +233,11 @@ def get_WRT_form_as_csv(form_credentials: dict, jobPath: str, config: dict, stat
logger
.
debug
(
'
Saving raw csv file
'
)
logger
.
debug
(
'
Saving raw csv file
'
)
df_raw_filename
=
f
"
{
output_path
}
/
{
csv_filename
}
"
df_raw_filename
=
f
"
{
output_path
}
/
{
csv_filename
}
"
dataframe_raw
=
json_normalize
(
request
.
json
()[
"
listObservation
"
])
# if request is not empty, than convert it to a normalized dataframe, otherwise create an empty dataframe
if
request
.
status_code
==
200
:
dataframe_raw
=
json_normalize
(
request
.
json
()[
"
listObservation
"
])
if
request
.
status_code
==
204
:
dataframe_raw
=
json_normalize
([])
dataframe_raw
.
to_csv
(
df_raw_filename
,
index
=
False
,
quoting
=
csv
.
QUOTE_MINIMAL
)
dataframe_raw
.
to_csv
(
df_raw_filename
,
index
=
False
,
quoting
=
csv
.
QUOTE_MINIMAL
)
...
...
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