You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and we want to combine these into one multidimensional indicator: population by gender, geo, year.
proposal
We need a procedure for combining indicators, as well as a procedure to extract entities from the combined result.
1. the combine_indicators procedure
procedure: combine_indicatorsingredients:
- input_ingredientresult: output_ingredientoptions:
dictionary: # a list of indicators to combine, can be inline or a json filenew_indicator_1:
- indicator: base_indicator_1_1entities:
gender: malean_other_entity: foo
- indicator: base_indicator_1_2entities:
gender: femalean_other_entity: barnew_indicator_2:
- indicator: base_indicator_2_1entities:
gender: malean_other_entity: foo
- ...
Considering similar indicators have similar name pattern, we can add a pattern option
procedure: combine_indicatorsingredients:
- input_ingredientresult: output_ingredientoptions:
pattern_dictionary:
new_indicator_1:
pattern: indicator_([0-9a-z]*)_([0-9a-z]*) # will combine all indicators with this pattern.entities: ["gender", "an_other_entities"] # assign the matched groups to the entities.
for above example, if we have 2 indicators:
indicator_male_foo
indicator_female_baz
then indicator_male_foo will be assigned gender = male and an_other_entities = foo and indicator_female_baz will be assigned gender = female and an_other_entities = baz
use case
For example, we have these indicators:
and we want to combine these into one multidimensional indicator: population by gender, geo, year.
proposal
We need a procedure for combining indicators, as well as a procedure to extract entities from the combined result.
1. the combine_indicators procedure
Considering similar indicators have similar name pattern, we can add a
pattern
optionfor above example, if we have 2 indicators:
then
indicator_male_foo
will be assignedgender = male
andan_other_entities = foo
andindicator_female_baz
will be assignedgender = female
andan_other_entities = baz
2. extract_entities
see #56
The text was updated successfully, but these errors were encountered: