Skip to content

Commit

Permalink
chore: minor reccap data adaptations
Browse files Browse the repository at this point in the history
  • Loading branch information
lubojr committed Oct 31, 2023
1 parent 48557fa commit 43dc88e
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_10_intact_biomass_change_smooth_max
Title: Smooth max intact biomass change (RECCAP2)
Title: Smooth max intact biomass change (CCI RECCAP2)
EodashIdentifier: RECCAP_2_10
Description: RECCAP2_9_intact_biomass_change_methods_mean/RECCAP2_9.md
Themes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_11_intact_biomass_change_smooth_mean
Title: Smooth mean intact biomass change (RECCAP2)
Title: Smooth mean intact biomass change (CCI RECCAP2)
EodashIdentifier: RECCAP_2_11
Description: RECCAP2_9_intact_biomass_change_methods_mean/RECCAP2_9.md
Themes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_12_intact_biomass_change_trend_mean
Title: Mean intact biomass change trend (RECCAP2)
Title: Mean intact biomass change trend (CCI RECCAP2)
EodashIdentifier: RECCAP_2_12
Description: RECCAP2_9_intact_biomass_change_methods_mean/RECCAP2_9.md
Themes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_1_AGC_LVOD_amazonia_methods_mean_crop
Title: Methods mean aboveground carbon (RECCAP2)
Title: Methods mean aboveground carbon (CCI RECCAP2)
EodashIdentifier: RECCAP_2_1
Description: RECCAP2_1_AGC_LVOD_amazonia_methods_mean_crop/RECCAP2_1.md
Themes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_2_AGC_LVOD_amazonia_smooth_max_crop
Title: Smooth max aboveground carbon (RECCAP2)
Title: Smooth max aboveground carbon (CCI RECCAP2)
EodashIdentifier: RECCAP_2_2
Description: RECCAP2_1_AGC_LVOD_amazonia_methods_mean_crop/RECCAP2_1.md
Themes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_3_AGC_LVOD_amazonia_smooth_mean_crop
Title: Smooth mean aboveground carbon (RECCAP2)
Title: Smooth mean aboveground carbon (CCI RECCAP2)
EodashIdentifier: RECCAP_2_3
Description: RECCAP2_1_AGC_LVOD_amazonia_methods_mean_crop/RECCAP2_1.md
Themes:
Expand Down
4 changes: 2 additions & 2 deletions collections/RECCAP2_4_AGC_LVOD_amazonia_trend_mean_crop.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_4_AGC_LVOD_amazonia_trend_mean_crop
Title: Trend mean aboveground carbon (RECCAP2)
Title: Trend mean aboveground carbon (CCI RECCAP2)
EodashIdentifier: RECCAP_2_4
Description: RECCAP2_1_AGC_LVOD_amazonia_methods_mean_crop/RECCAP2_1.md
Themes:
Expand All @@ -21,4 +21,4 @@ Resources:
ColormapName: rain
Rescale: [0,150]
Legend: RECCAP2_1_AGC_LVOD_amazonia_methods_mean_crop/cm_legend.png
Image: RECCAP2_1_AGC_LVOD_amazonia_methods_mean_crop/preview.png
Image: RECCAP2_1_AGC_LVOD_amazonia_methods_mean_crop/preview.png'
2 changes: 1 addition & 1 deletion collections/RECCAP2_5_SF_biomass_growth.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_5_SF_biomass_growth
Title: Secondary forest growth (RECCAP2)
Title: Secondary forest growth (CCI RECCAP2)
EodashIdentifier: RECCAP_2_5
Description: RECCAP2_5_SF_biomass_growth/RECCAP2_5.md
Themes:
Expand Down
2 changes: 1 addition & 1 deletion collections/RECCAP2_6_deforested_biomass.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_6_deforested_biomass
Title: Deforestation (RECCAP2)
Title: Deforestation (CCI RECCAP2)
EodashIdentifier: RECCAP_2_6
Description: RECCAP2_6_deforested_biomass/RECCAP2_6.md
Themes:
Expand Down
2 changes: 1 addition & 1 deletion collections/RECCAP2_7_degraded_biomass.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_7_degraded_biomass
Title: Degradation (RECCAP2)
Title: Degradation (CCI RECCAP2)
EodashIdentifier: RECCAP_2_7
Description: RECCAP2_7_degraded_biomass/RECCAP2_7.md
Themes:
Expand Down
2 changes: 1 addition & 1 deletion collections/RECCAP2_8_edge_biomass_change.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_8_edge_biomass_change
Title: Edge biomass change (RECCAP2)
Title: Edge biomass change (CCI RECCAP2)
EodashIdentifier: RECCAP_2_8
Description: RECCAP2_8_edge_biomass_change/RECCAP2_8.md
Themes:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: RECCAP2_9_intact_biomass_change_methods_mean
Title: Methods mean intact biomass change (RECCAP2)
Title: Methods mean intact biomass change (CCI RECCAP2)
EodashIdentifier: RECCAP_2_9
Description: RECCAP2_9_intact_biomass_change_methods_mean/RECCAP2_9.md
Themes:
Expand Down
17 changes: 9 additions & 8 deletions generators/generate_indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,13 @@ def handle_GeoDB_endpoint(config, endpoint, data, catalog):
link.extra_fields["country"] = country
link.extra_fields["city"] = city

# fetch yAxis and store it to data, preventing need to save it per dataset in yml
select = "?select=y_axis&limit=1"
url = endpoint["EndPoint"] + endpoint["Database"] + "_%s"%endpoint["CollectionId"] + select
response = json.loads(requests.get(url).text)
yAxis = response[0]['y_axis']
data['yAxis'] = yAxis
if "yAxis" not in data:
# fetch yAxis and store it to data, preventing need to save it per dataset in yml
select = "?select=y_axis&limit=1"
url = endpoint["EndPoint"] + endpoint["Database"] + "_%s"%endpoint["CollectionId"] + select
response = json.loads(requests.get(url).text)
yAxis = response[0]['y_axis']
data['yAxis'] = yAxis
add_collection_information(config, collection, data)

collection.update_extent_from_items()
Expand Down Expand Up @@ -717,8 +718,8 @@ def process_STAC_Datacube_Endpoint(config, endpoint, data, catalog):
link.extra_fields["start_datetime"] = item.properties["start_datetime"]
link.extra_fields["end_datetime"] = item.properties["end_datetime"]
unit = variables.get(endpoint.get("Variable")).get('unit')
if unit:
data["yAxix"] = unit
if unit and "yAxis" not in data:
data["yAxis"] = unit
collection.update_extent_from_items()

add_collection_information(config, collection, data)
Expand Down

0 comments on commit 43dc88e

Please sign in to comment.