-
Notifications
You must be signed in to change notification settings - Fork 5
api: Start to explore major changes we may need to make to the model input API. #53
base: master
Are you sure you want to change the base?
Conversation
input API. Explore how we can provide more data for both calibration and inteventions to the models and their connectors. The goal is give them more flexibiity by providing more of the data we have on hand and allowing them to decide how to best use it to configure their model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is generally the right direction. This will be a fairly big rewrite of the UI.
Also, an open question for me is how will the dates for the historical data be chosen? Do we just choose a few reasonable dates, like date of first intervention, last date we have data for, date of 100th death, etc? Or do we want the user to have some control over this?
"reductionPopulationContact" | ||
], | ||
"type": "object" | ||
}, | ||
"InterventionType": { | ||
"enum": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use text instead of numbers here?
"deaths": { | ||
"type": "number" | ||
}, | ||
"mobility": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is mobility just a single number? Or do we need something more complex than this?
}, | ||
"type": "array" | ||
}, | ||
"endDate": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the last date for which we have data?
"endDate": { | ||
"$ref": "#/definitions/ISODate" | ||
}, | ||
"totalCases": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is totalCases
different from cumulativeCases
? Could we just assume that endDate
is the latest date in the actuals
array?
"$ref": "#/definitions/Intensity", | ||
"description": "The level to which individuals with symptoms self-isolate." | ||
"intensity": { | ||
"$ref": "#/definitions/Intensity" | ||
}, | ||
"reductionPopulationContact": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little confused how this will work if the reductionPopulationContact
is associated with an intervention, rather than an interventionPeriod
. Are we expecting that everything is additive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or...I think this should just be removed...
export type ISODate = string | ||
|
||
export enum Intensity { | ||
Mild = 'mild', | ||
Moderate = 'moderate', | ||
Aggressive = 'aggressive', | ||
} | ||
|
||
export enum InterventionType { | ||
CaseIsolation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you change each row to:
CaseIsolation = 'CaseIsolation',
Then the json schema enum will use strings, not numbers.
"socialDistancing": { | ||
"$ref": "#/definitions/Intensity", | ||
"description": "The level of social distancing in the region." | ||
"inteventions": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"inteventions": { | |
"interventions": { |
} | ||
}, | ||
"required": [ | ||
"startDate", | ||
"endDate", | ||
"inteventions", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"inteventions", | |
"interventions", |
export type ISODate = string | ||
|
||
export enum Intensity { | ||
Mild = 'mild', | ||
Moderate = 'moderate', | ||
Aggressive = 'aggressive', | ||
} | ||
|
||
export enum InterventionType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have an external reference for the choices here?
@@ -161,8 +244,7 @@ | |||
}, | |||
"required": [ | |||
"calibrationDate", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this too, since calibrationData
has a sequence of dates? Then models can choose the relevant date to calibrate against.
"description": "The total number of confirmed cases in the region before the calibration date.", | ||
"type": "number" | ||
"calibrationData": { | ||
"$ref": "#/definitions/HistoricalData" | ||
}, | ||
"calibrationDate": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar: can we remove this now?
"Actual": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"cases": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The perennial question: new cases or current known cases?
Explore how we can provide more data for both calibration and
interventions to the models and their connectors. The goal is give them
more flexibility by providing more of the data we have on hand and
allowing them to decide how to best use it to configure their model.