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

Population #2

Open
wants to merge 1 commit into
base: feature/component-library
Choose a base branch
from
Open

Conversation

JulianBarinton
Copy link
Collaborator

@JulianBarinton JulianBarinton commented Jul 11, 2024

In the branch population, we "populate" the component library of the WEFEConfigurator.

Encountered challenges are the following:

Some answers; should lead to a follow up question:
# when e.g. desalination is indicated we should ask precisely about which technoloythe source (brackish or seawater),
# and the salinity of the source water

Some answers should be in tick box format:
crops, installed energy components, installed water components, if answer not available, we have extra box called other:: user writes down; feedback to backend developers

Technology adding from the library should not exclusively happen via survey answers:
hydropower potential has to be assumed from surrounding rivers; input from WEFESiteAnalyst
potential for desalination is there when water scarcity, and closeness to river, or brackish groundwater source in arid climate.

We have to decide which data is collected by Kobotoolbox and which data is acquired by web app survey

We should decide whether there shall be a way of modeling subsector independently (water, energy, food), if so there can be a question regarding which sector the web user wants to focus on.

@Bachibouzouk Bachibouzouk changed the base branch from master to feature/component-library July 15, 2024 11:45
@Bachibouzouk
Copy link

Bachibouzouk commented Jul 15, 2024

Some answers; should lead to a follow up question:
when e.g. desalination is indicated we should ask precisely about which technoloythe source (brackish or seawater),
and the salinity of the source water

This can be addressed by adding "subquestion": {"answer1": subquestion_id, "answer2": othersubquestion_id} if not present, then it is assumed no subquestion is necessary. There is no need to provide a subquestion to all possible answers, just provide the answers which lead to a subquestion

{"question": "", "question_id": "", "possible_answers":["answer1", "answer2"], "subquestion": {"answer1": subquestion_id, "answer2": othersubquestion_id}}

@Bachibouzouk
Copy link

Some answers should be in tick box format:

{"question": "", "question_id": "", "possible_answers":["answer1", "answer2"], "display_type": "oneof the possible type we want to define (tickbox, dropdown, tickbox_with_other, etc)"}

@Bachibouzouk
Copy link

Bachibouzouk commented Jul 24, 2024

Mutiple subquestions { ... "subquestion": {"desalination": "2.1", "chlorination": "2.5", "UV-disinfection": "2.6"}} --> { ... "subquestion": {"desalination": ["2.1", "2.2"], "chlorination": "2.5", "UV-disinfection": "2.6"}} (provide a list with more than one subquestion id

@Bachibouzouk
Copy link

Problem: what is the answer should be a float, or an int etc...

Solution:
definition of variables for type if answer is not a choice within a list of string:

TYPE_FLOAT = "float"
TYPE_INT = "int"

Then
{"question": "...", "question_id": "2","possible_answers": TYPE_FLOAT}

@Bachibouzouk
Copy link

If a question shall have additional information on hover then one should add a INFOBOX in the question's dict:

INFOBOX = "infobox"
SURVEY_STRUCTURE= [
{"question": "...", "question_id": "2","possible_answers": ..., INFOBOX: "some extra explanation"}
]

@Bachibouzouk
Copy link

For the SURVEY_ANSWER_COMPONENT_MAPPING

question types:
A) choice amongst a list

SURVEY_ANSWER_COMPONENT_MAPPING={
    "question3": {"no": "component_name", "yes": "other_component_name"},
    ....
}

B) provide a number

SURVEY_ANSWER_COMPONENT_MAPPING={
    "question3": 45.7,
    ....
}

@Bachibouzouk
Copy link

Bachibouzouk commented Aug 17, 2024

@JulianBarinton - I summarized all commits into one, let me know if you find it acceptable, we can always change it with your local branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants