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

Specify mitigation scenarios as intervals #14

Closed
rneher opened this issue Mar 17, 2020 · 6 comments · Fixed by #323
Closed

Specify mitigation scenarios as intervals #14

rneher opened this issue Mar 17, 2020 · 6 comments · Fixed by #323
Labels
help wanted Extra attention is needed IMPORTANT Take this immediately! s:ui Scope: related to user experience, user interface, usability, accessibility t:feat Type: request of a new feature, functionality, enchancement

Comments

@rneher
Copy link
Member

rneher commented Mar 17, 2020

In some situations, it might be more convenient to specify the mitigation scenarios as time intervals:

--2020-03-01                    100%
2020-03-01 -- 2020-03-15         50%
2020-03-16 -- 2020-03-31         75%
2020-04-01 -- 2020-05-31         60%
2020-06-01 --                    50%

The data structure for this would work just about the same way as a time series of adjacent intervals, the main difference would be UI. Need to think about how to enforce that intervals tile time.

@ivan-aksamentov
Copy link
Member

ivan-aksamentov commented Mar 17, 2020

I was thinking about making the containment (mitigation) plot into a sort of a bar chart:

  • bar width corresponds to the time interval
  • bar height is the value
  • click on the bar (or on its continuation above the upper edge of it) adjusts the value
  • optionally, click and drag will display the date and the value being adjusted, for better UX
  • this would work for any time-aware parameter.
  • intervals can be non-uniform
  • interval can be set by the user
  • changing global start and end dates adds or removes the bars on the sides
  • optionally, when global dates were shrinked, and then expanded back, plot would remember the values lost on the sides and restore them

Additionally, we can represent the same data as a table. We could either display both or to add a toggle.

@ivan-aksamentov ivan-aksamentov added t:feat Type: request of a new feature, functionality, enchancement help wanted Extra attention is needed s:ui Scope: related to user experience, user interface, usability, accessibility labels Mar 17, 2020
@rneher
Copy link
Member Author

rneher commented Mar 20, 2020

I like this idea. Certainly worth exploring.

@rneher
Copy link
Member Author

rneher commented Mar 22, 2020

Here is another proposal to improve the specification of mitigation and infection control measures.

2020-03-01 -- 2020-04-15   schools closed        -10%
2020-03-15 -- 2020-05-31   bars, restaurants     -10%
2020-04-01 -- 2020-05-31   lock-down             -20%

One could have a date range selector and then include these as horizontal bars in the result plot. More measures could be added with an 'add' button (similar to filters in search interfaces). This would then translate into a time series with a few vertical steps. But the general logic of a linearly interpolated function would still hold, so this would require few changes in the algorithm.

The constraint that the combined measures can't be more than 100% is most readily addressed by making these effects multiplicative (Effects of -10%, -20%, -15% would then combine to 0.90.80.85)

@rodolfoalmeida01 and @arieltonglet, if this is something you'd be keen on, let me know. Happy to touch base.

@arieltonglet
Copy link
Contributor

This seems like an awesome feature :)
It worries me a little that it could make this part of the app a little too complex for the average user, but it sure deserves a try, specially as we are working with presets already.
I think we could tackle this when me and @rodolfoalmeida01 finish the “overall design” changes, and get to the charts. Do you agree?

@ivan-aksamentov ivan-aksamentov removed the help wanted Extra attention is needed label Mar 23, 2020
@rneher
Copy link
Member Author

rneher commented Mar 23, 2020

That would be fantastic! We could then also have presets for different measures like school closure, lock-down, vaccine etc that can be added one by one from a drop down or similar with a default value (school -20%, lock-down -40%, vaccine -80% just as examples). User then would need to select beginning and end (and these could have presets based on what we are observing now).

@ivan-aksamentov ivan-aksamentov added help wanted Extra attention is needed IMPORTANT Take this immediately! labels Mar 24, 2020
@rneher
Copy link
Member Author

rneher commented Mar 25, 2020

Let me try to flesh out a little more what I have in mind and what it would take to get there.

The basic idea is an interface of the sort
image
The names of the measures don't really matter for the algorithm and could be chosen by the user. The last number is how much the measure reduces transmission.

This would produce an array of

{tMin, tMax, name, value}

The run function would convert this into a piece-wise constant function that steps down by value at every tMin and up at every tMax. This could be represented by the current TimeSeries object with each vertical step having two entries a fraction of a day apart. Steps on the same day would need to be globbed together.

Finally, these measures could be represented by horizontal bars in the results graph to provide a visual guide.

  • form elements and data structure in state
  • function that converts sets of intervals into a TimeSeries
  • visualization of the measures in the result.

Open to more ideas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed IMPORTANT Take this immediately! s:ui Scope: related to user experience, user interface, usability, accessibility t:feat Type: request of a new feature, functionality, enchancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants