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

Input data for interaction with WEFEDemand API #5

Open
Bachibouzouk opened this issue Dec 2, 2024 · 3 comments
Open

Input data for interaction with WEFEDemand API #5

Bachibouzouk opened this issue Dec 2, 2024 · 3 comments
Assignees

Comments

@Bachibouzouk
Copy link
Contributor

What are the parameters (token key, other demand parameters) one need to provide to the API to get the csv files back

@paulapreuss
Copy link

paulapreuss commented Dec 2, 2024

Parser arguments:
-i SURVEY_ID
--days simulated_days
--date start_date

Apart from these, all of the inputs for the RAMP simulation come from the survey results, but this workflow for me is still a bit of a black box:

  • It seems that the currently working SURVEY_IDs are all clones of one survey that asks questions about appliances, usage windows etc., but each survey is only filled out by one respondent.
    • If the surveys are actually to be filled out by one respondent, I don't get the point of interacting with Kobotoolbox.
    • If the surveys are to be filled out by a large number of people (more likely) and the answers are then aggregated to a RAMP simulation input, I would like to have a test case for this that contains more than one row of data - it would be good to get the survey .csv to easily replicate this on my Kobo account.
  • What is the expected user behavior? How does this work from Kobotoolbox site?
    • Is there a "host" Kobotoolbox account where the necessary survey is cloned and offered to the user via e.g. a link to send around and fill out the survey from the WEFE gui (one survey per user? one survey per scenario? ...)?
    • Is the user supposed to host the survey on their own Kobotoolbox account and input their KOBO_ID and SURVEY_ID somewhere in the WEFE gui to retrieve the data? In this case we would have to provide them with the .csv template for the correct survey, so that the processing and simulation works (this process may be too high level for a lot of users).

@paulapreuss
Copy link

paulapreuss commented Dec 2, 2024

@Bachibouzouk do you know any more about this? currently making a simulation from the survey technically ~works~ but the much larger question from my perspective is how this survey is actually being hosted/served/filled out and how this interacts with our tool. Once I have more details I am happy to take over setting it up since I already started looking into a lot of this for CP Nigeria at the time.

@paulapreuss
Copy link

paulapreuss commented Dec 2, 2024

Exemplary survey output (not all that helpful without being able to look at the survey/testing it with more data)
{576606131: {'num_users': 1, 'months_present': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], 'working_days': [0, 1, 2, 3, 4, 5, 6], 'appliances': {'in_bulb': {'num_app': 1.0, 'power': 7.0, 'daily_usage_time': 12.0, 'func_cycle': 1, 'usage_window_1': [0, 7], 'usage_window_2': [18, 24]}, 'mobile': {'num_app': 1.0, 'power': 1.5, 'daily_usage_time': 2.0, 'func_cycle': 1, 'usage_window_1': [22, 24]}}, 'cooking_demands': {'meal_1': {'fuel': 'charcoal', 'stove': 'CD_traditional_charcoal', 'cooking_window_start': 7, 'cooking_window_end': 10, 'cooking_time': 1.0, 'fuel_amount': 1.1666666666666667}, 'meal_2': {'fuel': 'charcoal', 'stove': 'CD_traditional_charcoal', 'cooking_window_start': 18, 'cooking_window_end': 22, 'cooking_time': 1.5, 'fuel_amount': 1.1666666666666667}}, 'drinking_water_demand': {'daily_demand': 5.0, 'water_window_1': [18, 22]}, 'service_water_demands': {'livestock': {'daily_demand': {1: 10.0, 2: 10.0, 3: 10.0, 4: 10.0, 5: 10.0, 6: 10.0, 7: 10.0, 8: 10.0, 9: 10.0, 10: 10.0, 11: 10.0, 12: 10.0}, 'usage_windows': [[12, 18], None, None], 'pumping_head': 100.0, 'demand_duration': 1.0}, 'services': {'daily_demand': {1: 60.0, 2: 60.0, 3: 60.0, 4: 60.0, 5: 60.0, 6: 60.0, 7: 60.0, 8: 60.0, 9: 60.0, 10: 60.0, 11: 60.0, 12: 60.0}, 'usage_windows': [[7, 10], None, None], 'pumping_head': 50.0, 'demand_duration': 5.0}}, 'agro_processing_machines': {}}}

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

No branches or pull requests

2 participants