-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,6 +2,66 @@ | |||||
"$ref": "#/definitions/ModelInput", | ||||||
"$schema": "http://json-schema.org/draft-07/schema#", | ||||||
"definitions": { | ||||||
"Actual": { | ||||||
"additionalProperties": false, | ||||||
"properties": { | ||||||
"cases": { | ||||||
"type": "number" | ||||||
}, | ||||||
"cumulativeCases": { | ||||||
"type": "number" | ||||||
}, | ||||||
"cumulativeDeaths": { | ||||||
"type": "number" | ||||||
}, | ||||||
"date": { | ||||||
"$ref": "#/definitions/ISODate" | ||||||
}, | ||||||
"deaths": { | ||||||
"type": "number" | ||||||
}, | ||||||
"mobility": { | ||||||
"type": "number" | ||||||
} | ||||||
}, | ||||||
"required": [ | ||||||
"date", | ||||||
"cases", | ||||||
"cumulativeCases", | ||||||
"deaths", | ||||||
"cumulativeDeaths" | ||||||
], | ||||||
"type": "object" | ||||||
}, | ||||||
"HistoricalData": { | ||||||
"additionalProperties": false, | ||||||
"properties": { | ||||||
"actuals": { | ||||||
"items": { | ||||||
"$ref": "#/definitions/Actual" | ||||||
}, | ||||||
"type": "array" | ||||||
}, | ||||||
"endDate": { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the last date for which we have data? |
||||||
"$ref": "#/definitions/ISODate" | ||||||
}, | ||||||
"totalCases": { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is |
||||||
"description": "The total number of confirmed cases in the region before the calibration date.", | ||||||
"type": "number" | ||||||
}, | ||||||
"totalDeaths": { | ||||||
"description": "The total number of deaths in the region before the calibration date.", | ||||||
"type": "number" | ||||||
} | ||||||
}, | ||||||
"required": [ | ||||||
"endDate", | ||||||
"totalCases", | ||||||
"totalDeaths", | ||||||
"actuals" | ||||||
], | ||||||
"type": "object" | ||||||
}, | ||||||
"ISODate": { | ||||||
"type": "string" | ||||||
}, | ||||||
|
@@ -13,40 +73,68 @@ | |||||
], | ||||||
"type": "string" | ||||||
}, | ||||||
"InterventionPeriod": { | ||||||
"Intervention": { | ||||||
"additionalProperties": false, | ||||||
"properties": { | ||||||
"caseIsolation": { | ||||||
"$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 commentThe reason will be displayed to describe this comment to others. Learn more. A little confused how this will work if the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or...I think this should just be removed... |
||||||
"description": "The estimated reduction in population contact resulting from\nall of the above interventions. Some models require this generalized\nparameter instead of the individual interventions.", | ||||||
"type": "number" | ||||||
}, | ||||||
"schoolClosure": { | ||||||
"$ref": "#/definitions/Intensity", | ||||||
"description": "The level of school closure in the region." | ||||||
"type": { | ||||||
"$ref": "#/definitions/InterventionType" | ||||||
} | ||||||
}, | ||||||
"required": [ | ||||||
"type" | ||||||
], | ||||||
"type": "object" | ||||||
}, | ||||||
"InterventionPeriod": { | ||||||
"additionalProperties": false, | ||||||
"properties": { | ||||||
"endDate": { | ||||||
"$ref": "#/definitions/ISODate" | ||||||
}, | ||||||
"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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"items": { | ||||||
"$ref": "#/definitions/Intervention" | ||||||
}, | ||||||
"type": "array" | ||||||
}, | ||||||
"reductionPopulationContact": { | ||||||
"description": "The estimated reduction in population contact resulting from\nall of the above interventions. Some models require this generalized\nparameter instead of the individual interventions.", | ||||||
"type": "number" | ||||||
}, | ||||||
"startDate": { | ||||||
"$ref": "#/definitions/ISODate", | ||||||
"description": "An ISO-8601 string encoding the date that these interventions begin." | ||||||
}, | ||||||
"voluntaryHomeQuarantine": { | ||||||
"$ref": "#/definitions/Intensity", | ||||||
"description": "The level to which entire households self-isolate when one member\nof the household has symptoms." | ||||||
} | ||||||
}, | ||||||
"required": [ | ||||||
"startDate", | ||||||
"endDate", | ||||||
"inteventions", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"reductionPopulationContact" | ||||||
], | ||||||
"type": "object" | ||||||
}, | ||||||
"InterventionType": { | ||||||
"enum": [ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you use text instead of numbers here? |
||||||
0, | ||||||
1, | ||||||
2, | ||||||
3, | ||||||
4, | ||||||
5, | ||||||
6, | ||||||
7, | ||||||
8, | ||||||
9 | ||||||
], | ||||||
"type": "number" | ||||||
}, | ||||||
"ModelInput": { | ||||||
"additionalProperties": false, | ||||||
"description": "A generalized description of the input to an epidemiological model.", | ||||||
|
@@ -70,18 +158,13 @@ | |||||
"ModelParameters": { | ||||||
"additionalProperties": false, | ||||||
"properties": { | ||||||
"calibrationCaseCount": { | ||||||
"description": "The total number of confirmed cases in the region before the calibration date.", | ||||||
"type": "number" | ||||||
"calibrationData": { | ||||||
"$ref": "#/definitions/HistoricalData" | ||||||
}, | ||||||
"calibrationDate": { | ||||||
"$ref": "#/definitions/ISODate", | ||||||
"description": "An ISO-8601 string encoding the date of the most recent case data in the region." | ||||||
}, | ||||||
"calibrationDeathCount": { | ||||||
"description": "The total number of deaths in the region before the calibration date.", | ||||||
"type": "number" | ||||||
}, | ||||||
"interventionPeriods": { | ||||||
"description": "A list of time periods, each with a different set of interventions.", | ||||||
"items": { | ||||||
|
@@ -99,8 +182,7 @@ | |||||
}, | ||||||
"required": [ | ||||||
"calibrationDate", | ||||||
"calibrationCaseCount", | ||||||
"calibrationDeathCount", | ||||||
"calibrationData", | ||||||
"r0", | ||||||
"interventionPeriods" | ||||||
], | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,66 @@ | |
"$ref": "#/definitions/ModelOutput", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"Actual": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"cases": { | ||
"type": "number" | ||
}, | ||
"cumulativeCases": { | ||
"type": "number" | ||
}, | ||
"cumulativeDeaths": { | ||
"type": "number" | ||
}, | ||
"date": { | ||
"$ref": "#/definitions/ISODate" | ||
}, | ||
"deaths": { | ||
"type": "number" | ||
}, | ||
"mobility": { | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"date", | ||
"cases", | ||
"cumulativeCases", | ||
"deaths", | ||
"cumulativeDeaths" | ||
], | ||
"type": "object" | ||
}, | ||
"HistoricalData": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"actuals": { | ||
"items": { | ||
"$ref": "#/definitions/Actual" | ||
}, | ||
"type": "array" | ||
}, | ||
"endDate": { | ||
"$ref": "#/definitions/ISODate" | ||
}, | ||
"totalCases": { | ||
"description": "The total number of confirmed cases in the region before the calibration date.", | ||
"type": "number" | ||
}, | ||
"totalDeaths": { | ||
"description": "The total number of deaths in the region before the calibration date.", | ||
"type": "number" | ||
} | ||
}, | ||
"required": [ | ||
"endDate", | ||
"totalCases", | ||
"totalDeaths", | ||
"actuals" | ||
], | ||
"type": "object" | ||
}, | ||
"ISODate": { | ||
"type": "string" | ||
}, | ||
|
@@ -13,40 +73,68 @@ | |
], | ||
"type": "string" | ||
}, | ||
"InterventionPeriod": { | ||
"Intervention": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"caseIsolation": { | ||
"$ref": "#/definitions/Intensity", | ||
"description": "The level to which individuals with symptoms self-isolate." | ||
"intensity": { | ||
"$ref": "#/definitions/Intensity" | ||
}, | ||
"reductionPopulationContact": { | ||
"description": "The estimated reduction in population contact resulting from\nall of the above interventions. Some models require this generalized\nparameter instead of the individual interventions.", | ||
"type": "number" | ||
}, | ||
"schoolClosure": { | ||
"$ref": "#/definitions/Intensity", | ||
"description": "The level of school closure in the region." | ||
"type": { | ||
"$ref": "#/definitions/InterventionType" | ||
} | ||
}, | ||
"required": [ | ||
"type" | ||
], | ||
"type": "object" | ||
}, | ||
"InterventionPeriod": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"endDate": { | ||
"$ref": "#/definitions/ISODate" | ||
}, | ||
"socialDistancing": { | ||
"$ref": "#/definitions/Intensity", | ||
"description": "The level of social distancing in the region." | ||
"inteventions": { | ||
"items": { | ||
"$ref": "#/definitions/Intervention" | ||
}, | ||
"type": "array" | ||
}, | ||
"reductionPopulationContact": { | ||
"description": "The estimated reduction in population contact resulting from\nall of the above interventions. Some models require this generalized\nparameter instead of the individual interventions.", | ||
"type": "number" | ||
}, | ||
"startDate": { | ||
"$ref": "#/definitions/ISODate", | ||
"description": "An ISO-8601 string encoding the date that these interventions begin." | ||
}, | ||
"voluntaryHomeQuarantine": { | ||
"$ref": "#/definitions/Intensity", | ||
"description": "The level to which entire households self-isolate when one member\nof the household has symptoms." | ||
} | ||
}, | ||
"required": [ | ||
"startDate", | ||
"endDate", | ||
"inteventions", | ||
"reductionPopulationContact" | ||
], | ||
"type": "object" | ||
}, | ||
"InterventionType": { | ||
"enum": [ | ||
0, | ||
1, | ||
2, | ||
3, | ||
4, | ||
5, | ||
6, | ||
7, | ||
8, | ||
9 | ||
], | ||
"type": "number" | ||
}, | ||
"ModelInput": { | ||
"additionalProperties": false, | ||
"description": "A generalized description of the input to an epidemiological model.", | ||
|
@@ -132,18 +220,13 @@ | |
"ModelParameters": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"calibrationCaseCount": { | ||
"description": "The total number of confirmed cases in the region before the calibration date.", | ||
"type": "number" | ||
"calibrationData": { | ||
"$ref": "#/definitions/HistoricalData" | ||
}, | ||
"calibrationDate": { | ||
"$ref": "#/definitions/ISODate", | ||
"description": "An ISO-8601 string encoding the date of the most recent case data in the region." | ||
}, | ||
"calibrationDeathCount": { | ||
"description": "The total number of deaths in the region before the calibration date.", | ||
"type": "number" | ||
}, | ||
"interventionPeriods": { | ||
"description": "A list of time periods, each with a different set of interventions.", | ||
"items": { | ||
|
@@ -161,8 +244,7 @@ | |
}, | ||
"required": [ | ||
"calibrationDate", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we remove this too, since |
||
"calibrationCaseCount", | ||
"calibrationDeathCount", | ||
"calibrationData", | ||
"r0", | ||
"interventionPeriods" | ||
], | ||
|
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?