Giter Site home page Giter Site logo

Comments (10)

p-a-s-c-a-l avatar p-a-s-c-a-l commented on June 19, 2024

Once clarity-h2020/csis#101 has been implemented, we need to include study_variant, time_period, emission_scenario and event_frequencyin the csisHelpers.studyInfo JS Object.

from csis-helpers-module.

p-a-s-c-a-l avatar p-a-s-c-a-l commented on June 19, 2024

Not sure if this changed lately, but the study_presets contain wrong values: e.g. instead of "scenario:historial" EMIKAT expects "Baseline" as value for emissions_scenario:

grafik

Here is documented what is expected by the table and map applications.

from csis-helpers-module.

p-a-s-c-a-l avatar p-a-s-c-a-l commented on June 19, 2024

O.K., I tried to revolve this in branch feature/010-extend-entityinfo by accessing field_var_valueinstead of field_var_meaning, but this didn't work:

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">InvalidArgumentException</em>: Field field_var_value is unknown. in <em class="placeholder">Drupal\Core\Entity\ContentEntityBase-&gt;getTranslatedField()</em> (line <em class="placeholder">587</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/ContentEntityBase.php</em>).

from csis-helpers-module.

p-a-s-c-a-l avatar p-a-s-c-a-l commented on June 19, 2024

Another thing we need in 'study_info' is 'field_eea_city_profile_name' from the Cities/Regions Taxonomy. Maybe @patrickkaleta can add this, too?

from csis-helpers-module.

DenoBeno avatar DenoBeno commented on June 19, 2024

Do you mean the "scenario:historical" and such?

If yes, this is a very simple thing to fix. Or at least to work around until we do something better. Let me explain:

We have two taxonomies governing the issue at hand: "DP variable meanings" and "DP variables"

grafik

DP variables is used in the ressource tags, whereas the DP variables meanings is used in study to indicate which combinations the user wants. Why two and not one? Because EMIKAT uses the "Baseline" where our hazard packages use the "historical" and we need some way to map this to one other.

Thus, the workaround is simply to replace the value of "meaning ID" variable in DP variables meanings taxonomy so that it's the same as the "variable value" in DP variables. I'll do this now and then your applications will get what they need.

TODO later
One day when we start doing this for non-emikat resources, we'll have to deal with the issue of synonyms. In one way or another, the helpers modules wil lhave to signal that emission scenario can be either "Baseline" or "historical" and the apps will ahve to parse the resource tags to find out which of the two these resources can understand. The alternative woudl be to hard-code such knowledge somewhere - I don't like that idea.

Resolving this is a pre-requisite for clarity-h2020/data-package#47

from csis-helpers-module.

DenoBeno avatar DenoBeno commented on June 19, 2024

OK, I have finished setting the "meaning ID" values. If there is any error left, you can fix it here: https://csis.myclimateservice.eu/admin/structure/taxonomy/manage/dp_variable_meanings/overview

This said, the titles of the "dp variable meaning" taxonomy terms are meant to be used as labels on CSIS UI. So they should probably also be exposed by csis helpers.

from csis-helpers-module.

patrickkaleta avatar patrickkaleta commented on June 19, 2024

O.K., I tried to revolve this in branch feature/010-extend-entityinfo by accessing field_var_valueinstead of field_var_meaning, but this didn't work:

The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">InvalidArgumentException</em>: Field field_var_value is unknown. in <em class="placeholder">Drupal\Core\Entity\ContentEntityBase-&gt;getTranslatedField()</em> (line <em class="placeholder">587</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/ContentEntityBase.php</em>).

@p-a-s-c-a-l
As explained by Denis, there are two taxonomies at play here and you were trying to access the field of one taxonomy in the second taxonomy, where it's not present... and Drupal doesn't like things like that.

Denis already finished his workaround, so you should now get the wished results. I will revert the changes in feature/010-extend-entityinfo.

Another thing we need in 'study_info' is 'field_eea_city_profile_name' from the Cities/Regions Taxonomy. Maybe @patrickkaleta can add this, too?

That field was added to the studyInfo object already a while ago. It's called eea_city_name, but I can rename it to eea_city_profile_name if you like.
studyInfo-attributes

from csis-helpers-module.

p-a-s-c-a-l avatar p-a-s-c-a-l commented on June 19, 2024

but I can rename it to eea_city_profile_name if you like.

no it's o.k. Thanks.

regarding the variables / taxonomies / taxonomy mappings / meanings / .... : we shouldn't overcomplicate things. lets keep it simple and move on.

from csis-helpers-module.

DenoBeno avatar DenoBeno commented on June 19, 2024

I wonder what is the status of this ticket now?

In principle we have all we need at the moment. So maybe it's done?
We also know that more will be needed later, see #14 (comment). So is it on hold then?

from csis-helpers-module.

p-a-s-c-a-l avatar p-a-s-c-a-l commented on June 19, 2024

It's done. We open a new issue if we need more.

from csis-helpers-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.