Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Impact/Risk assement model for Heat Waves with EMIKAT #22

Closed
maesbri opened this issue Aug 8, 2018 · 26 comments
Closed
Assignees
Labels
BB: Catalogue of ER & AO Catalogue of Elements at Risk and Adaptation Options Building Block SHOWSTOPPER Feature or bug, that, if not addressed, renders the CSIS essentially useless

Comments

@maesbri
Copy link

maesbri commented Aug 8, 2018

Implementation of the model defined in #21.

@p-a-s-c-a-l
Copy link
Member

@p-a-s-c-a-l
Copy link
Member

Some ideas for the expected output format of the model, visualisation of tabular data but also the need for an additional aggregation of the model results for easy scenario analysis and comparison are discussed in this issue: clarity-h2020/scenario-analysis#7

@p-a-s-c-a-l
Copy link
Member

Related discussions that need feedback from @clarity-h2020/mathematical-models-implementation-team :

@p-a-s-c-a-l
Copy link
Member

p-a-s-c-a-l commented Nov 28, 2018

General workflow and examples based on this comment:

When Impact shall be calculated (IA/RA Step),

  1. CSIS Frontend sends request to Impact Model Service (EMKIT + some simple REST Interface) with URI of the current study object. (you need to be logged-in at CSIS to access these example URIs)
  2. Impact Model Service needs to authenticate at CSIS and retrieves study object JSON representation. The study object JSON is a 'flat' object, so it contains just links to sub-objects like data-package. Question @therter : Mabe there is possibility to get an object from that API that is already completely resolved with all of its sub objects?
  3. Impact Model Service extracts from the study object the properties relevant for the impact model. E.g. field_area and field_data_package.
  4. The Data Package object, which follows the Data Package Specification contains meta-data for all HC-LE/EE/VA datasets needed by the impact model service (as sub-objects in field_resources).
  5. the datasets should be 'preconfigured' at the level of the Impact Model Service, so the service just needs the unique ids of the respective datasets listed in field_resources. @fgeyer16 Could we use the field uuid to uniquely identify a datasets or does the uuid change for each new revision?

To be discussed: How to notify the CSIS of new Impact Model Results? In general, the Impact Model Service should call the JSON API and PUT meta-data following the Data Resource Specification (JSON Example). But this meta-data about the IA/RA results must not be added to the original Data Package but a copy that is only accessible by the members of the study.

@humerh
Copy link

humerh commented Nov 28, 2018

We have to concern the following events:

  • Creating a new study area: This should trigger a PUT call to emikat ("insertNewScenario") with the fields (name, description) -> returns also the ID of the new created Scenario
    The description field should at the end contain the description of the study (<2000 chars) PLUS some METADATA, like
    CSIS_STUDY_AREA: LL_X, LL_Y, RU_X, RU_Y (in WGS84)
    CSIS_URL: url to get further info for the study and the data packages

  • Updating a study: This should trigger a PUSH call to emikat ("updateScenario") with the fields (scenarioId, name, description)

As a consequence of UPDATE all data (mbd) are resynchronized to emikat again.

.....
(further definitions will be provided after a already planned session with Patrik Kaleta on Monday)

A SWAGGER-Interface to emikat will be available at the location:
https://service.emikat.at/EmiKat/swagger/index.html

@patrickkaleta
Copy link

After our weekly developer telco this monday, @bernhardsk @humerh @fgeyer16 and I discussed how Emikat and Drupal could communicate and exchange data. For now we will try the following:

  • using the SWAGGER-Interface Drupal will notify Emikat when a new Study is created or an existing one is being updated and send necessary information (Study ID, Study area, path to data-package,...)
  • additional information can be retrieved by Emikat via a REST-view which will contain all necessary fields (since accessing the whole Study object via REST is probably an overkill)
  • Drupal will have to store the Emikat-given ID (which it will receive as response from Emikat) of the Study as well, so that in the case of changes in a Study, Drupal can tell Emikat which study needs to be updated. (For that we will look into the Business-rules module to see how this could be implemented)

@p-a-s-c-a-l
Copy link
Member

Interesting! Would it make sense / be possible to define such a REST View for Map Layers that are relevant in the context of a specific step. Please have a look at this issue @therter is working on: clarity-h2020/map-component#2

Currently we intend to load the whole study JSON + Data Package & Data Resources JSON and parse it in the Map Component. A REST View that extracts just the relevant properties from the (Data Package Resources) would me more convenient.

@patrickkaleta
Copy link

@p-a-s-c-a-l
Yes, creating such a REST View with only the relevant properties from the data-resource should be possible.

I will first deal with the REST view for Emikat (as sort of a proof of concept) and then have a closer look at the issue you mentioned above.

@patrickkaleta
Copy link

I had a look at this over the weekend and tried implementing the following:

  1. based on the StudyID a REST view returns the path to another REST view for each resource in the datapackage which is used in the Study
    1step_path-to-resource

  2. the second REST view returns the relevant fields
    2step_resource_analysis-context

Originally I tried to do it all in one step, but the problem is getting the necessary data throughout all the different content types (Study -> Data package -> Resource -> Analysis context). It is possible to display a View inside another View (I did that for the second step where I display the Analysis context fields as a nested View), but as can be seen in the second Screenshot it doesn't appear to be properly formatted JSON.

Would it work for the map compoment, to make multiple REST calls in order to get all necessary fields or does it need to happen in just one REST call?

@fgeyer16
Copy link
Contributor

@patrickkaleta
How did you nest the second view into the first?

@therter
Copy link

therter commented Dec 10, 2018

@patrickkaleta Yes, it is also possible to make multiple rest calls from the map component

@patrickkaleta
Copy link

@fgeyer16
in this particular instance I displayed the analysis context as a field with the formatter set to "View" and selected the other REST view. As a view argument I'm passing the Field value, which is the ID of the analysis context.

You can view the settings of this REST view here:
https://csis.myclimateservice.eu/admin/structure/views/view/rest_node/edit/rest_export_4

@fgeyer16
Copy link
Contributor

@patrickkaleta
OK This is they way I had done it as well.

@maesbri
Copy link
Author

maesbri commented Mar 14, 2019

@p-a-s-c-a-l , @therter

HC-LE resources have been added to the Naples data package (resources identifier ranging from 26 to 29).

@p-a-s-c-a-l
Copy link
Member

Model implemented, API available here.

T1.3 Climate Services Co-creation automation moved this from To do to Done Jul 2, 2019
T4.2 Catalogue of Elements at Risk and Adaptation Options automation moved this from In progress to Done Jul 2, 2019
T3.4 Adaptation Strategies and Decision Support automation moved this from In progress to Done Jul 2, 2019
@p-a-s-c-a-l
Copy link
Member

Recent changes in model to be implemented.

@p-a-s-c-a-l p-a-s-c-a-l reopened this Aug 7, 2019
T1.3 Climate Services Co-creation automation moved this from Done to In Progress Aug 7, 2019
T4.2 Catalogue of Elements at Risk and Adaptation Options automation moved this from Done to In progress Aug 7, 2019
T3.4 Adaptation Strategies and Decision Support automation moved this from Done to In progress Aug 7, 2019
@p-a-s-c-a-l p-a-s-c-a-l moved this from In Progress to Backlog: High Priority in T1.3 Climate Services Co-creation Aug 19, 2019
@DenoBeno
Copy link

In theory this is done. Who and how (and when) can check if the output makes sense?

@DenoBeno
Copy link

Implemented for heat mortality, I suppose? Close this and open new one for other impacts?

@p-a-s-c-a-l p-a-s-c-a-l changed the title Implementation of Impact/Risk assement model with EMIKAT Implementation of Impact/Risk assement model for Heat Waves with EMIKAT Oct 15, 2019
T1.3 Climate Services Co-creation automation moved this from Backlog: High Priority to Done Oct 15, 2019
T4.2 Catalogue of Elements at Risk and Adaptation Options automation moved this from In progress to Done Oct 15, 2019
T3.4 Adaptation Strategies and Decision Support automation moved this from In progress to Done Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB: Catalogue of ER & AO Catalogue of Elements at Risk and Adaptation Options Building Block SHOWSTOPPER Feature or bug, that, if not addressed, renders the CSIS essentially useless
Development

No branches or pull requests

10 participants