Skip to content

Commit 26f5ac8

Browse files
committed
force all analysis levels to be one of 3
1 parent 40123bf commit 26f5ac8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/ej/cmr_to_models.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def categorize_processing_level(level):
6565
elif level in advanced_analysis_levels:
6666
return "advanced analysis"
6767
else:
68-
return "unknown"
68+
return "advanced analysis"
6969

7070

71-
ej_dump = json.load(open("scripts/ej/ej_dump_20240814_143036.json"))
71+
ej_dump = json.load(open("backups/ej_dump_20240814_143036.json"))
7272
for dataset in ej_dump:
7373
ej_row = EnvironmentalJusticeRow(
7474
destination_server=EnvironmentalJusticeRow.DestinationServerChoices.DEV,
@@ -78,7 +78,9 @@ def categorize_processing_level(level):
7878
limitations=dataset.get("umm", {}).get("AccessConstraints", {}).get("Description", ""),
7979
format=dataset.get("meta", {}).get("format", ""),
8080
temporal_extent=", ".join(dataset.get("umm", {}).get("TemporalExtents", [{}])[0].get("SingleDateTimes", [])),
81-
intended_use=categorize_processing_level(dataset.get("umm", {}).get("ProcessingLevel", {}).get("Id", "")),
81+
intended_use=categorize_processing_level(
82+
dataset.get("umm", {}).get("ProcessingLevel", {}).get("Id", "advanced analysis")
83+
),
8284
source_link=generate_source_link(dataset.get("umm", {}).get("DOI", {})),
8385
indicators=dataset["indicators"], # Not provided in the data
8486
geographic_coverage="", # Not provided in the data

0 commit comments

Comments
 (0)