-
Notifications
You must be signed in to change notification settings - Fork 0
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
jidea-110 New time series #30
base: main
Are you sure you want to change the base?
Changes from 8 commits
640d6fa
7d7d610
9e01b1d
1276b19
b1442da
c8bd90a
5bdcc2d
c66e074
aa1d4a5
6286cda
c601838
140b7cc
4c793d1
3f5e97b
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 | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -107,7 +107,49 @@ | |||||||||||||||||||||||||||||||||
"description": "Number of infectious individuals, comprising both symptomatic and asymptomatic infections, including those in need of hospitalisation." }, | ||||||||||||||||||||||||||||||||||
{ "id": "hospitalised", "label": "Hospital demand", "description": "Infections requiring hospitalisation" }, | ||||||||||||||||||||||||||||||||||
{ "id": "dead", "label": "Dead", "description": "Total deaths" }, | ||||||||||||||||||||||||||||||||||
{ "id": "vaccinated", "label": "Vaccinated", "description": "Total number of vaccinations administered" } | ||||||||||||||||||||||||||||||||||
{ "id": "vaccinated", "label": "Vaccinated", "description": "Total number of vaccinations administered" }, | ||||||||||||||||||||||||||||||||||
{ "id": "new_infections", "label": "New Infections", "description": "Number of new infections per day" }, | ||||||||||||||||||||||||||||||||||
{ "id": "new_hospitalisations", "label": "New Hospitalisations", "description": "Number of patients who are hospitalised per day" }, | ||||||||||||||||||||||||||||||||||
{ "id": "new_deaths", "label": "New deaths", "description": "Number of deaths per day" }, | ||||||||||||||||||||||||||||||||||
{ "id": "new_vaccinations", "label": "New vaccinations", "description": "Number of vaccinations per day" } | ||||||||||||||||||||||||||||||||||
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. Could "New deaths" and "New vaccinations" be capitalised to follow the previous few labels? Only an issue if these are going to be displayed in the front end, otherwise don't bother! 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. The house style I'm going for is actually to only capitalize once per title: so it's New Infections and New Hospitalisations that need to change. 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
It's neat how the t_s_groups have nouns as their ids while time_series themselves have adjectives as ids -- helps us avoid the ids colliding. So let's regularise on that and have all the time_series adjectives where possible. 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 suggestion of an edited description to align with the description of the corresponding total (and to be more accurate):
Suggested change
|
||||||||||||||||||||||||||||||||||
], | ||||||||||||||||||||||||||||||||||
"time_series_roles": [ | ||||||||||||||||||||||||||||||||||
{"id": "total", "label": "Total"}, | ||||||||||||||||||||||||||||||||||
{"id": "daily", "label": "Daily"} | ||||||||||||||||||||||||||||||||||
], | ||||||||||||||||||||||||||||||||||
"time_series_groups": [ | ||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||
"id": "infections", | ||||||||||||||||||||||||||||||||||
"label": "Infections", | ||||||||||||||||||||||||||||||||||
"time_series": { | ||||||||||||||||||||||||||||||||||
"total": "prevalence", | ||||||||||||||||||||||||||||||||||
"daily": "new_infections" | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||
"id": "hospitalisations", | ||||||||||||||||||||||||||||||||||
"label": "Hospitalisations", | ||||||||||||||||||||||||||||||||||
"time_series": { | ||||||||||||||||||||||||||||||||||
"total": "hospitalised", | ||||||||||||||||||||||||||||||||||
"daily": "new_hospitalisations" | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||
"id": "deaths", | ||||||||||||||||||||||||||||||||||
"label": "Deaths", | ||||||||||||||||||||||||||||||||||
"time_series": { | ||||||||||||||||||||||||||||||||||
"total": "dead", | ||||||||||||||||||||||||||||||||||
"daily": "new_deaths" | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||
"id": "vaccinations", | ||||||||||||||||||||||||||||||||||
"label": "Vaccinations", | ||||||||||||||||||||||||||||||||||
"time_series": { | ||||||||||||||||||||||||||||||||||
"total": "vaccinated", | ||||||||||||||||||||||||||||||||||
"daily": "new_vaccinations" | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,25 @@ | |
"items": { | ||
"$ref": "#/$defs/displayInfo" | ||
} | ||
}, | ||
"time_series_roles": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/displayInfo" | ||
} | ||
}, | ||
"time_series_groups": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"id": { "type": "string" }, | ||
"label": { "type": "string" }, | ||
"time_series": { "type": "object" } | ||
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 there no way to specify that this object's keys must be 'time_series_role's? If not, what good does it do to define the time_series_roles array? 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. I don't think so, in the schema. The reason for putting in the time_series_roles array was to include metadata, which the front end might choose to use i.e. label. |
||
}, | ||
"additionalProperties": false, | ||
"required": ["id", "label", "time_series"] | ||
} | ||
} | ||
}, | ||
"additionalProperties": false, | ||
|
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 code here definitely works, but here's a suggestion to cut down calls to
get_incidence()
: