Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

api: Start to explore major changes we may need to make to the model input API. #53

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gorzell
Copy link
Contributor

@gorzell gorzell commented Jun 3, 2020

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.

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.
Copy link
Contributor

@aeisenberg aeisenberg left a 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": [
Copy link
Contributor

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": {
Copy link
Contributor

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": {
Copy link
Contributor

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": {
Copy link
Contributor

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": {
Copy link
Contributor

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?

Copy link
Contributor

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,
Copy link
Contributor

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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"inteventions": {
"interventions": {

}
},
"required": [
"startDate",
"endDate",
"inteventions",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"inteventions",
"interventions",

export type ISODate = string

export enum Intensity {
Mild = 'mild',
Moderate = 'moderate',
Aggressive = 'aggressive',
}

export enum InterventionType {
Copy link
Contributor

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",
Copy link
Contributor

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": {
Copy link
Contributor

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": {
Copy link
Contributor

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?

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

Successfully merging this pull request may close these issues.

3 participants