Skip to content

Commit

Permalink
chore: updated story and added it to the race config; fix: issue with…
Browse files Browse the repository at this point in the history
… theme definition for story
  • Loading branch information
santilland committed Dec 20, 2024
1 parent ca4a185 commit 9ba7fe7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
18 changes: 5 additions & 13 deletions app/public/data/storytelling-md/RACE/CropOM.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@

# Regional yield forecast and crop water demand <!--{ as="img" mode="hero" src="https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2018/09/watering_crops/17679972-1-eng-GB/Watering_crops_pillars.jpg" }-->
### Forecasts for commodity crops with CropOM’s CropModel API <!--{ style="font-size:1.2rem;opacity:0.7;margin-top:1rem;" }-->


##
##

County-level crop yield averages are among the most widely used agricultural indicators, as they are highly valuable to various economic sectors and government institutions. Crop yield data is a crucial input for shaping policies that ensure food security, inform structural economic decisions, and guide market evaluations. Statistical agencies typically release this data at the end of the growing season, after collecting actual figures from producers. While these statistics are vital for assessing the performance of a country's agricultural sector, they reflect only past outcomes.

Expand All @@ -22,7 +18,7 @@ A demonstration of CropOM's service capabilities is currently featured on the [R
The map below illustrates the crop yield indicator for maize, under average scenario conditions. Other crops including soybean, sunflower and wheat, as well as two additional scenarios (best and worst) are [available on the RACE Dashboard](https://race.esa.int/?indicator=CROPOMHU1&x=2193607.25256&y=5996965.74672&z=7.4418).


## Crop Yield <!--{as="eox-map" style="width: 100%; height: 500px;" layers='[{"type":"Tile","properties":{"id":"Overlay labels"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.jpg"]}},{"type":"Vector","properties":{"id":"Hungary yield"},"source":{"type":"Vector","url":"https://api.cropom-dev.com/crop_model/regional_forecast?country_code=HU","format":{"type":"GeoJSON","dataProjection":"EPSG:3035"}}},{"type":"Tile","properties":{"id":"Terrain light"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpg"]}}]' zoom="7.441804831648481" center=[19.705509223276863,47.335235548548724] }-->
## Crop Yield <!--{as="eox-map" style="width: 100%; height: 500px;" layers='[{"type":"Tile","properties":{"id":"Overlay labels"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.jpg"]}},{"type":"Vector","properties":{"id":"Hungary yield"},"style":{"jsonform":{"type":"object","title":"Data configuration","properties":{"crop":{"title":"Crop","type":"string","enum":["Maize","Soybean","Sunflower","Wheat"],"default":"Maize"},"vstat":{"title":"Statistical value","type":"string","enum":["average","best","worst"],"default":"average"},"vminmax":{"title":"Dynamic range","description":"Yield [t/ha]","type":"object","properties":{"vmin":{"type":"number","minimum":0,"maximum":50,"format":"range","default":2},"vmax":{"type":"number","minimum":0,"maximum":50,"format":"range","default":20}},"format":"minmax"}}},"variables":{"crop":"Maize","vstat":"average","vmin":2,"vmax":7.7},"fill-color":["case",["==",["get","yield","Maize","average"],"N/A"],[253,231,37,0.25],["interpolate",["linear"],["/",["-",["get","yield","Maize","average"],2],7.7],0,[68,1,84,1],0.06666666666666667,[70,23,103,1],0.13333333333333333,[71,44,122,1],0.2,[65,63,131,1],0.26666666666666666,[59,81,139,1],0.3333333333333333,[52,97,141,1],0.4,[44,113,142,1],0.4666666666666667,[39,129,142,1],0.5333333333333333,[33,144,141,1],0.6,[39,173,129,1],0.6666666666666666,[66,187,114,1],0.7333333333333333,[92,200,99,1],0.8,[131,210,75,1],0.8666666666666667,[170,220,50,1],0.9333333333333333,[212,226,44,1],1,[253,231,37,1]]],"stroke-color":"black","stroke-width":1,"layerId":"crop_forecast_hu"},"source":{"type":"Vector","url":"https://api.cropom-dev.com/crop_model/regional_forecast?country_code=HU","format":{"type":"GeoJSON","dataProjection":"EPSG:3035"}}},{"type":"Tile","properties":{"id":"Terrain light"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpg"]}}]' zoom="6.69708496650794" center=[19.7,46.75390620626126] }-->

<center>
<img src="https://raw.githubusercontent.com/eurodatacube/eodash-assets/main/collections/crop_forecast_CropOM/cm_legend.png" height="50">
Expand All @@ -36,7 +32,7 @@ Similar to its regional yield forecasting capabilities, CropOM’s Crop Model AP

## Water Demand <!--{ as="eox-map" mode="tour" }-->

### <!--{ layers='[{"type":"Tile","properties":{"id":"Overlay labels"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.jpg"]}},{"type":"Vector","properties":{"id":"Hungary water demand"},"source":{"type":"Vector","url":"https://api.cropom-dev.com/crop_model/regional_forecast?country_code=HU","format":{"type":"GeoJSON","dataProjection":"EPSG:3035"}}},{"type":"Tile","properties":{"id":"Terrain light"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpg"]}}]' zoom="7.441804831648481" center=[18.476090997297124,47.13203096458341] animationOptions={duration:500}}-->
### <!--{ layers='[{"type":"Tile","properties":{"id":"Overlay labels"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.jpg"]}},{"type":"Vector","properties":{"id":"Hungary water demand"},"style":{"jsonform":{"type":"object","title":"Data configuration","properties":{"crop":{"title":"Crop","type":"string","enum":["Maize","Soybean","Sunflower","Wheat"],"default":"Maize"},"vstat":{"title":"Statistical value","type":"string","enum":["average","best","worst"],"default":"average"},"vminmax":{"title":"Dynamic range","description":"Water need [mm]","type":"object","properties":{"vmin":{"type":"number","minimum":0,"maximum":800,"format":"range","default":0},"vmax":{"type":"number","minimum":0,"maximum":800,"format":"range","default":500}},"format":"minmax"}}},"variables":{"crop":"Maize","vstat":"average","vmin":179.82,"vmax":263.69},"fill-color":["case",["==",["get","water_need","Maize","average"],"N/A"],[253,231,37,0.25],["interpolate",["linear"],["/",["-",["get","water_need","Maize","average"],179.82],263.69],0,[68,1,84,1],0.06666666666666667,[70,23,103,1],0.13333333333333333,[71,44,122,1],0.2,[65,63,131,1],0.26666666666666666,[59,81,139,1],0.3333333333333333,[52,97,141,1],0.4,[44,113,142,1],0.4666666666666667,[39,129,142,1],0.5333333333333333,[33,144,141,1],0.6,[39,173,129,1],0.6666666666666666,[66,187,114,1],0.7333333333333333,[92,200,99,1],0.8,[131,210,75,1],0.8666666666666667,[170,220,50,1],0.9333333333333333,[212,226,44,1],1,[253,231,37,1]]],"stroke-color":"black","stroke-width":1,"layerId":"crop_forecast_hu_water"},"source":{"type":"Vector","url":"https://api.cropom-dev.com/crop_model/regional_forecast?country_code=HU","format":{"type":"GeoJSON","dataProjection":"EPSG:3035"}}},{"type":"Tile","properties":{"id":"Terrain light"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpg"]}}]' zoom="6.69708496650794" center=[19.7,46.75390620626126] animationOptions={duration:500}}-->
#### County Level Forecast
Managing irrigation water to ensure that all food producers have adequate supply for successful operations is primarily a regional responsibility rather than a statewide endeavor. To support regional water management authorities—who have the legal authority and physical access to irrigation channel systems—detailed and precise mapping is essential.

Expand All @@ -49,7 +45,7 @@ By visualizing the water needs of sub-county regions and highlighting areas wher
Map Legend
</center>

### <!--{ layers='[{"type":"Tile","properties":{"id":"Overlay labels"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.jpg"]}},{"type":"Vector","properties":{"id":"Hungary Békés subcounty water demand"},"source":{"type":"Vector","url":"https://api.cropom-dev.com/crop_model/regional_forecast?region_code=HU332","format":{"type":"GeoJSON","dataProjection":"EPSG:3035"}}},{"type":"Tile","properties":{"id":"Terrain light"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpg"]}}]' zoom="9.078636090861195" center=[20.80031526858213,46.65980722911988] animationOptions={duration:500}}-->
### <!--{ layers='[{"type":"Tile","properties":{"id":"Overlay labels"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.jpg"]}},{"type":"Vector","properties":{"id":"Hungary Békés subcounty yield"},"style":{"jsonform":{"type":"object","title":"Data configuration","properties":{"crop":{"title":"Crop","type":"string","enum":["Maize","Soybean","Sunflower","Wheat"],"default":"Maize"},"vstat":{"title":"Statistical value","type":"string","enum":["average","best","worst"],"default":"average"},"vminmax":{"title":"Dynamic range","description":"Yield [t/ha]","type":"object","properties":{"vmin":{"type":"number","minimum":0,"maximum":50,"format":"range","default":2},"vmax":{"type":"number","minimum":0,"maximum":50,"format":"range","default":20}},"format":"minmax"}}},"variables":{"crop":"Maize","vstat":"average","vmin":1.24,"vmax":3.82},"fill-color":["case",["==",["get","yield","Maize","average"],"N/A"],[253,231,37,0.25],["interpolate",["linear"],["/",["-",["get","yield","Maize","average"],1.24],3.82],0,[68,1,84,1],0.06666666666666667,[70,23,103,1],0.13333333333333333,[71,44,122,1],0.2,[65,63,131,1],0.26666666666666666,[59,81,139,1],0.3333333333333333,[52,97,141,1],0.4,[44,113,142,1],0.4666666666666667,[39,129,142,1],0.5333333333333333,[33,144,141,1],0.6,[39,173,129,1],0.6666666666666666,[66,187,114,1],0.7333333333333333,[92,200,99,1],0.8,[131,210,75,1],0.8666666666666667,[170,220,50,1],0.9333333333333333,[212,226,44,1],1,[253,231,37,1]]],"stroke-color":"black","stroke-width":1,"layerId":"crop_forecast_hu_bekes"},"source":{"type":"Vector","url":"https://api.cropom-dev.com/crop_model/regional_forecast?region_code=HU332","format":{"type":"GeoJSON","dataProjection":"EPSG:3035"}}},{"type":"Tile","properties":{"id":"Terrain light"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpg"]}}]' zoom="9.049803408653483" center=[21.049999999999997,46.71545914037338] animationOptions={duration:500}}-->
#### Sub-county Level Forecasting
Yield forecasts are also provided for the same sub-county regions.

Expand All @@ -59,11 +55,7 @@ Yield forecasts are also provided for the same sub-county regions.
Map Legend
</center>

<center>
<img src="https://raw.githubusercontent.com/eurodatacube/eodash-assets/main/collections/crop_forecast_CropOM/subcounty-water-demand.jpg" height="300">
</center>

### <!--{ layers='[{"type":"Tile","properties":{"id":"Overlay labels"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.jpg"]}},{"type":"Vector","properties":{"id":"Hungary Mezőhegyes microregion water demand"},"source":{"type":"Vector","url":"https://api.cropom-dev.com/crop_model/regional_forecast?region_code=HU3321","format":{"type":"GeoJSON","dataProjection":"EPSG:3035"}}},{"type":"Tile","properties":{"id":"Terrain light"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpg"]}}]' zoom="10.684851048961821" center=[20.92919359324035,46.38579258132742] animationOptions={duration:500}}-->
### <!--{ layers='[{"type":"Tile","properties":{"id":"Overlay labels"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/overlay_base_bright_3857/default/g/{z}/{y}/{x}.jpg"]}},{"type":"Vector","properties":{"id":"Hungary Mezőhegyes microregion water demand"},"style":{"jsonform":{"type":"object","title":"Data configuration","properties":{"crop":{"title":"Crop","type":"string","enum":["Maize","Soybean","Sunflower","Wheat"],"default":"Maize"},"vstat":{"title":"Statistical value","type":"string","enum":["average","best","worst"],"default":"average"},"vminmax":{"title":"Dynamic range","description":"Water need [mm]","type":"object","properties":{"vmin":{"type":"number","minimum":0,"maximum":800,"format":"range","default":0},"vmax":{"type":"number","minimum":0,"maximum":800,"format":"range","default":500}},"format":"minmax"}}},"variables":{"crop":"Maize","vstat":"average","vmin":227.74,"vmax":251.71},"fill-color":["case",["==",["get","water_need","Maize","average"],"N/A"],[253,231,37,0.25],["interpolate",["linear"],["/",["-",["get","water_need","Maize","average"],227.74],251.71],0,[68,1,84,1],0.06666666666666667,[70,23,103,1],0.13333333333333333,[71,44,122,1],0.2,[65,63,131,1],0.26666666666666666,[59,81,139,1],0.3333333333333333,[52,97,141,1],0.4,[44,113,142,1],0.4666666666666667,[39,129,142,1],0.5333333333333333,[33,144,141,1],0.6,[39,173,129,1],0.6666666666666666,[66,187,114,1],0.7333333333333333,[92,200,99,1],0.8,[131,210,75,1],0.8666666666666667,[170,220,50,1],0.9333333333333333,[212,226,44,1],1,[253,231,37,1]]],"stroke-color":"black","stroke-width":1,"layerId":"crop_forecast_hu_mezohegyes_water"},"source":{"type":"Vector","url":"https://api.cropom-dev.com/crop_model/regional_forecast?region_code=HU3321","format":{"type":"GeoJSON","dataProjection":"EPSG:3035"}}},{"type":"Tile","properties":{"id":"Terrain light"},"source":{"type":"XYZ","urls":["//s2maps-tiles.eu/wmts/1.0.0/terrain-light_3857/default/g/{z}/{y}/{x}.jpg"]}}]' zoom="10.473578924860789" center=[20.97,46.38803298583869] animationOptions={duration:500}}-->
#### Micro-region level
Moving further down the scale to microregions, which is essentially the level of municipalities, the information can support the operation of companies, and local communities, providing information on the water demand of agriculture for every actor to facilitate informed discussion on water use.
<center>
Expand Down
10 changes: 9 additions & 1 deletion app/src/config/stories.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
"esa": {
"agriculture": {},
"water": {},
"land": {},
"land": {
"yield-forecast-crop-water-demand": {
"storyMarkdown": "./data/storytelling-md/RACE/CropOM.md",
"title": "Regional yield forecast and crop water demand",
"subtitle": "Forecasts for commodity crops with CropOM's CropModel API",
"image": "https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2018/09/watering_crops/17679972-1-eng-GB/Watering_crops_pillars.jpg",
"imagePlaceholder": "https://www.esa.int/var/esa/storage/images/esa_multimedia/images/2018/09/watering_crops/17679972-1-eng-GB/Watering_crops_pillars.jpg"
}
},
"health": {},
"air": {},
"economy": {}
Expand Down
3 changes: 3 additions & 0 deletions app/src/views/DashboardCustom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -661,13 +661,16 @@ export default {
}
}
if (this.officialDashboard && this.storyModeEnabled) {
/*
TODO: I think this is no longer needed here
if (!this.getCurrentTheme) {
if (existingConfiguration) {
const currentTheme = Object.entries(storiesConfig[this.appConfig.id])
.find((stories) => Object.values(stories[1]).includes(existingConfiguration))[0];
this.loadTheme(currentTheme);
}
}
*/
} else {
this.loadTheme(null);
}
Expand Down

0 comments on commit 9ba7fe7

Please sign in to comment.