Skip to content

Commit a542072

Browse files
authoredJul 9, 2020
Add description for first four columns in individual file (BDI-pathogens#139)
1 parent 2e7c207 commit a542072

6 files changed

+215
-75
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Table: individual file
2+
| Column name | Description |
3+
| ---- | ---- |
4+
| `ID` | Unique identifier of the individual |
5+
| `current_status` | Disease status of the individual at the point at which the individual file is written to file. See the transmission file for the status of an individual through time. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. |
6+
| `age_group` | Age group of the individual |
7+
| `occupation_network` | Occupation network to which this individual has membership (coded by the `enum OCCUPATION_NETWORKS` enum in constant.h) |
8+
| `worker_type` | Type of hospital worker (coded by the `enum WORKER_TYPES` in constant.h) (default -1) |
9+
| `assigned_worker_ward_type` | Type of ward within which this individual works (coded by the `enum HOSPITAL_WARD_TYPES` in constant.h) (default -1) |
10+
| `house_no` | Household identifier to which this individual belongs |
11+
| `quarantined` | Is the individual currently quarantined (1=Yes; 0=No). See the quarantine reasons at each time step for a complete list of quarantined individuals through time. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. |
12+
| `time_quarantined` | Time at which the individual was quarantined if they are currently quarantined. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. |
13+
| `test_status` | `quarantine_test_result` attribute of the individual struct. Currently mainly used for testing purposes. Takes the following values: -2: the individual is not currently being tested; -1 (-3): a (priority) test has been ordered; 0: the individual is waiting for a result which will be negative; 1: the individual is waiting for a test result which will be positive; note that regardless of the result once the test result has been received this variables returns to not current being tested (-2) |
14+
| `app_user` | Is this individual an app user (1=Yes; 0=No) |
15+
| `mean_interactions` | Number of random daily interactions of the individual (the random_interactions attribute of the individual struct) |
16+
| `infection_count` | Number of times this individual has been infected with SARS-CoV-2 |

‎documentation/output_files/output_file_dictionary.csv

+46-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ total_infected_50_59,Cumulative infected aged 50-59 years,timeseries
1313
total_infected_60_69,Cumulative infected aged 60-69 years,timeseries
1414
total_infected_70_79,Cumulative infected aged 70-79 years,timeseries
1515
total_infected_80,Cumulative infected aged 80+ years,timeseries
16-
total_case,Cumulative cases,timeseries
16+
total_case,Cumulative cases (a case is defined by a positive test result),timeseries
1717
total_case_0_9,Cumulative cases aged 0-9 years,timeseries
1818
total_case_10_19,Cumulative cases aged 10-19 years,timeseries
1919
total_case_20_29,Cumulative cases aged 20-29 years,timeseries
@@ -23,8 +23,7 @@ total_case_50_59,Cumulative cases aged 50-59 years,timeseries
2323
total_case_60_69,Cumulative cases aged 60-69 years,timeseries
2424
total_case_70_79,Cumulative cases aged 70-79 years,timeseries
2525
total_case_80,Cumulative cases aged 80+ years,timeseries
26-
total_death,Cumulative deaths,timeseries
27-
total_death,Cumulative deaths,timeseries
26+
total_death,Cumulative deaths (where COVID19 is the primary cause of death),timeseries
2827
total_death_0_9,Cumulative deaths aged 0-9 years,timeseries
2928
total_death_10_19,Cumulative deaths aged 10-19 years,timeseries
3029
total_death_20_29,Cumulative deaths aged 20-29 years,timeseries
@@ -57,4 +56,47 @@ n_quarantine_events,Daily number of quarantine events,timeseries
5756
n_quarantine_release_events,Daily number of quarantine release events,timeseries
5857
n_quarantine_events_app_user,Daily number of quarantine events of app users,timeseries
5958
n_quarantine_release_events_app_user,Daily number of quarantine release events of app users,timeseries
60-
59+
ID,Unique identifier of the individual,individual file
60+
current_status,Disease status of the individual at the point at which the individual file is written to file. See the transmission file for the status of an individual through time. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. ,individual file
61+
age_group,Age group of the individual,individual file
62+
occupation_network,Occupation network to which this individual has membership (coded by the `enum OCCUPATION_NETWORKS` enum in constant.h),individual file
63+
worker_type,Type of hospital worker (coded by the `enum WORKER_TYPES` in constant.h) (default -1),individual file
64+
assigned_worker_ward_type,Type of ward within which this individual works (coded by the `enum HOSPITAL_WARD_TYPES` in constant.h) (default -1),individual file
65+
house_no,Household identifier to which this individual belongs,individual file
66+
quarantined,Is the individual currently quarantined (1=Yes; 0=No). See the quarantine reasons at each time step for a complete list of quarantined individuals through time. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. ,individual file
67+
time_quarantined,Time at which the individual was quarantined if they are currently quarantined. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. ,individual file
68+
test_status,`quarantine_test_result` attribute of the individual struct. Currently mainly used for testing purposes. Takes the following values: -2: the individual is not currently being tested; -1 (-3): a (priority) test has been ordered; 0: the individual is waiting for a result which will be negative; 1: the individual is waiting for a test result which will be positive; note that regardless of the result once the test result has been received this variables returns to not current being tested (-2),individual file
69+
app_user,Is this individual an app user (1=Yes; 0=No),individual file
70+
mean_interactions,Number of random daily interactions of the individual (the random_interactions attribute of the individual struct),individual file
71+
infection_count,Number of times this individual has been infected with SARS-CoV-2,individual file
72+
ID_recipient,Unique identifier of the recipient,transmission file
73+
age_group_recipient,Age group of the recipient (coded by the `enum AGE_GROUPS` in constant.h),transmission file
74+
house_no_recipient,Household identifier of the recipient,transmission file
75+
occupation_network_recipient,Occupation network of the recipient (coded by the `enum OCCUPATION_NETWORKS` within constant.h),transmission file
76+
worker_type_recipient,Type of hospital worker of the recipient (coded by the `enum WORKER_TYPES` in constant.h) (default -1),transmission file
77+
hospital_state_recipient,Hospital status of the recipient at time of transmission (coded by `enum EVENT_TYPES` in constant.h) (default NOT_IN_HOSPITAL),transmission file
78+
infector_network,Network within which the transmission took place (coded by the `enum INTERACTION_TYPE` within constant.h),transmission file
79+
generation_time,Generation time of this transmission event (days; time from infection of the source to transmission) (0 for seed cases),transmission file
80+
ID_source,Unique identifier of the source (same as ID_recipient for seed cases),transmission file
81+
age_group_source,Age group of the source (coded by the `enum AGE_GROUPS` in constant.h),transmission file
82+
house_no_source,Household identifier of the source,transmission file
83+
occupation_network_source,Occupation network of the source (coded by the `enum OCCUPATION_NETWORKS` within constant.h),transmission file
84+
worker_type_source,Type of hospital worker of the source at time of transmission (coded by the `enum WORKER_TYPES` in constant.h) (default -1),transmission file
85+
hospital_state_source,Hospital status of the source (coded by `enum EVENT_TYPES` in constant.h) (default NOT_IN_HOSPITAL),transmission file
86+
time_infected_source,Time when source was infected,transmission file
87+
status_source,Infectious status of the source at time of transmission (coded by `enum EVENT_TYPES` within constant.h),transmission file
88+
time_infected,Time at which transmission took place (time measured as day number of the simulation),transmission file
89+
time_presymptomatic,Time at which the recipient became presymptomatic (-1 if never),transmission file
90+
time_presymptomatic_mild,Time at which the recipient became presymptomatic (if mildly infected) (-1 if never),transmission file
91+
time_presymptomatic_severe,Time at which the recipient became presymptomatic (if severely infected) (-1 if never),transmission file
92+
time_symptomatic,Time at which the recipient became symptomatic (-1 if never),transmission file
93+
time_symptomatic_mild,Time at which the recipient became symptomatic (if mildly infected) (-1 if never),transmission file
94+
time_symptomatic_severe,Time at which the recipient became symptomatic (if severely infected) (-1 if never),transmission file
95+
time_asymptomatic,Time at which the recipient became asymptomatic (-1 if never),transmission file
96+
time_hospitalised,Time at which the recipient became hospitalised (-1 if never),transmission file
97+
time_critical,Time at which the recipient became critical (-1 if never),transmission file
98+
time_hospitalised_recovering,Time at which the recipient was discharged from critical but remained in hospital (-1 if never),transmission file
99+
time_death,Time at which the recipient died (-1 if never),transmission file
100+
time_recovered,Time at which the recipient recovered (-1 if never),transmission file
101+
time_susceptible,Time at which the recipient became susceptible again (if waning immunity is possible),transmission file
102+
is_case,Was the recipient identified as a case (positive test result) (1=Yes; 0=No),transmission file
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,104 @@
11
# Table: Output file dictionary
2-
| Column name | Description |
3-
| ---- | ---- |
4-
| `time` | Day number of the simulation |
5-
| `lockdown` | Is lockdown currently on (1 = Yes; 0 = No) |
6-
| `test_on_symptoms` | Is testing on symptoms currently on (1=Yes; 0=No) |
7-
| `app_turned_on` | Is the app currently on (1= Yes; 0 = No) |
8-
| `total_infected` | Cumulative infected |
9-
| `total_infected_0_9` | Cumulative infected aged 0-9 years |
10-
| `total_infected_10_19` | Cumulative infected aged 10-19 years |
11-
| `total_infected_20_29` | Cumulative infected aged 20-29 years |
12-
| `total_infected_30_39` | Cumulative infected aged 30-39 years |
13-
| `total_infected_40_49` | Cumulative infected aged 40-49 years |
14-
| `total_infected_50_59` | Cumulative infected aged 50-59 years |
15-
| `total_infected_60_69` | Cumulative infected aged 60-69 years |
16-
| `total_infected_70_79` | Cumulative infected aged 70-79 years |
17-
| `total_infected_80` | Cumulative infected aged 80+ years |
18-
| `total_case` | Cumulative cases |
19-
| `total_case_0_9` | Cumulative cases aged 0-9 years |
20-
| `total_case_10_19` | Cumulative cases aged 10-19 years |
21-
| `total_case_20_29` | Cumulative cases aged 20-29 years |
22-
| `total_case_30_39` | Cumulative cases aged 30-39 years |
23-
| `total_case_40_49` | Cumulative cases aged 40-49 years |
24-
| `total_case_50_59` | Cumulative cases aged 50-59 years |
25-
| `total_case_60_69` | Cumulative cases aged 60-69 years |
26-
| `total_case_70_79` | Cumulative cases aged 70-79 years |
27-
| `total_case_80` | Cumulative cases aged 80+ years |
28-
| `total_death` | Cumulative deaths |
29-
| `total_death` | Cumulative deaths |
30-
| `total_death_0_9` | Cumulative deaths aged 0-9 years |
31-
| `total_death_10_19` | Cumulative deaths aged 10-19 years |
32-
| `total_death_20_29` | Cumulative deaths aged 20-29 years |
33-
| `total_death_30_39` | Cumulative deaths aged 30-39 years |
34-
| `total_death_40_49` | Cumulative deaths aged 40-49 years |
35-
| `total_death_50_59` | Cumulative deaths aged 50-59 years |
36-
| `total_death_60_69` | Cumulative deaths aged 60-69 years |
37-
| `total_death_70_79` | Cumulative deaths aged 70-79 years |
38-
| `total_death_80` | Cumulative deaths aged 80+ years |
39-
| `n_presymptom` | Current number presymptomatic (both mild and severe) |
40-
| `n_asymptom` | Current number asymptomatic |
41-
| `n_quarantine` | Current number in quarantine |
42-
| `n_tests` | Current number of tests reporting results today |
43-
| `n_symptoms` | Current number of symptomatic (both mild and severe) |
44-
| `n_hospital` | Current number in hospital who have not yet required critical care |
45-
| `n_hospitalised_recovering` | Current number in hospital who left critical care but not been discharged |
46-
| `n_critical` | Current number in critical care |
47-
| `n_death` | Daily number of deaths |
48-
| `n_recovered` | Cumulative number recovered |
49-
| `hospital_admissions` | Daily hospital admissions |
50-
| `hospital_admissions_total` | Cumulative hospital admissions |
51-
| `hospital_to_critical_daily` | Daily transitions from hospital to critical |
52-
| `hospital_to_critical_total` | Cumulative transitions from hospital to critical |
53-
| `n_quarantine_infected` | Current number in quarantine that have ever been infected |
54-
| `n_quarantine_recovered` | Current number in quarantine that are recovered |
55-
| `n_quarantine_app_user` | Current number of app users in quarantine |
56-
| `n_quarantine_app_user_infected` | Current number of app users in quarantine that have ever been infected |
57-
| `n_quarantine_app_user_recovered` | Current number of app users in quarantine that are recovered |
58-
| `n_quarantine_events` | Daily number of quarantine events |
59-
| `n_quarantine_release_events` | Daily number of quarantine release events |
60-
| `n_quarantine_events_app_user` | Daily number of quarantine events of app users |
61-
| `n_quarantine_release_events_app_user` | Daily number of quarantine release events of app users |
2+
| Column name | Description | File type |
3+
| ---- | ---- | ---- |
4+
| `time` | Day number of the simulation | timeseries |
5+
| `lockdown` | Is lockdown currently on (1 = Yes; 0 = No) | timeseries |
6+
| `test_on_symptoms` | Is testing on symptoms currently on (1=Yes; 0=No) | timeseries |
7+
| `app_turned_on` | Is the app currently on (1= Yes; 0 = No) | timeseries |
8+
| `total_infected` | Cumulative infected | timeseries |
9+
| `total_infected_0_9` | Cumulative infected aged 0-9 years | timeseries |
10+
| `total_infected_10_19` | Cumulative infected aged 10-19 years | timeseries |
11+
| `total_infected_20_29` | Cumulative infected aged 20-29 years | timeseries |
12+
| `total_infected_30_39` | Cumulative infected aged 30-39 years | timeseries |
13+
| `total_infected_40_49` | Cumulative infected aged 40-49 years | timeseries |
14+
| `total_infected_50_59` | Cumulative infected aged 50-59 years | timeseries |
15+
| `total_infected_60_69` | Cumulative infected aged 60-69 years | timeseries |
16+
| `total_infected_70_79` | Cumulative infected aged 70-79 years | timeseries |
17+
| `total_infected_80` | Cumulative infected aged 80+ years | timeseries |
18+
| `total_case` | Cumulative cases (a case is defined by a positive test result) | timeseries |
19+
| `total_case_0_9` | Cumulative cases aged 0-9 years | timeseries |
20+
| `total_case_10_19` | Cumulative cases aged 10-19 years | timeseries |
21+
| `total_case_20_29` | Cumulative cases aged 20-29 years | timeseries |
22+
| `total_case_30_39` | Cumulative cases aged 30-39 years | timeseries |
23+
| `total_case_40_49` | Cumulative cases aged 40-49 years | timeseries |
24+
| `total_case_50_59` | Cumulative cases aged 50-59 years | timeseries |
25+
| `total_case_60_69` | Cumulative cases aged 60-69 years | timeseries |
26+
| `total_case_70_79` | Cumulative cases aged 70-79 years | timeseries |
27+
| `total_case_80` | Cumulative cases aged 80+ years | timeseries |
28+
| `total_death` | Cumulative deaths (where COVID19 is the primary cause of death) | timeseries |
29+
| `total_death_0_9` | Cumulative deaths aged 0-9 years | timeseries |
30+
| `total_death_10_19` | Cumulative deaths aged 10-19 years | timeseries |
31+
| `total_death_20_29` | Cumulative deaths aged 20-29 years | timeseries |
32+
| `total_death_30_39` | Cumulative deaths aged 30-39 years | timeseries |
33+
| `total_death_40_49` | Cumulative deaths aged 40-49 years | timeseries |
34+
| `total_death_50_59` | Cumulative deaths aged 50-59 years | timeseries |
35+
| `total_death_60_69` | Cumulative deaths aged 60-69 years | timeseries |
36+
| `total_death_70_79` | Cumulative deaths aged 70-79 years | timeseries |
37+
| `total_death_80` | Cumulative deaths aged 80+ years | timeseries |
38+
| `n_presymptom` | Current number presymptomatic (both mild and severe) | timeseries |
39+
| `n_asymptom` | Current number asymptomatic | timeseries |
40+
| `n_quarantine` | Current number in quarantine | timeseries |
41+
| `n_tests` | Current number of tests reporting results today | timeseries |
42+
| `n_symptoms` | Current number of symptomatic (both mild and severe) | timeseries |
43+
| `n_hospital` | Current number in hospital who have not yet required critical care | timeseries |
44+
| `n_hospitalised_recovering` | Current number in hospital who left critical care but not been discharged | timeseries |
45+
| `n_critical` | Current number in critical care | timeseries |
46+
| `n_death` | Daily number of deaths | timeseries |
47+
| `n_recovered` | Cumulative number recovered | timeseries |
48+
| `hospital_admissions` | Daily hospital admissions | timeseries |
49+
| `hospital_admissions_total` | Cumulative hospital admissions | timeseries |
50+
| `hospital_to_critical_daily` | Daily transitions from hospital to critical | timeseries |
51+
| `hospital_to_critical_total` | Cumulative transitions from hospital to critical | timeseries |
52+
| `n_quarantine_infected` | Current number in quarantine that have ever been infected | timeseries |
53+
| `n_quarantine_recovered` | Current number in quarantine that are recovered | timeseries |
54+
| `n_quarantine_app_user` | Current number of app users in quarantine | timeseries |
55+
| `n_quarantine_app_user_infected` | Current number of app users in quarantine that have ever been infected | timeseries |
56+
| `n_quarantine_app_user_recovered` | Current number of app users in quarantine that are recovered | timeseries |
57+
| `n_quarantine_events` | Daily number of quarantine events | timeseries |
58+
| `n_quarantine_release_events` | Daily number of quarantine release events | timeseries |
59+
| `n_quarantine_events_app_user` | Daily number of quarantine events of app users | timeseries |
60+
| `n_quarantine_release_events_app_user` | Daily number of quarantine release events of app users | timeseries |
61+
| `ID` | Unique identifier of the individual | individual file |
62+
| `current_status` | Disease status of the individual at the point at which the individual file is written to file. See the transmission file for the status of an individual through time. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. | individual file |
63+
| `age_group` | Age group of the individual | individual file |
64+
| `occupation_network` | Occupation network to which this individual has membership (coded by the `enum OCCUPATION_NETWORKS` enum in constant.h) | individual file |
65+
| `worker_type` | Type of hospital worker (coded by the `enum WORKER_TYPES` in constant.h) (default -1) | individual file |
66+
| `assigned_worker_ward_type` | Type of ward within which this individual works (coded by the `enum HOSPITAL_WARD_TYPES` in constant.h) (default -1) | individual file |
67+
| `house_no` | Household identifier to which this individual belongs | individual file |
68+
| `quarantined` | Is the individual currently quarantined (1=Yes; 0=No). See the quarantine reasons at each time step for a complete list of quarantined individuals through time. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. | individual file |
69+
| `time_quarantined` | Time at which the individual was quarantined if they are currently quarantined. Note that this is a variable that may change throughout the simulation and so may be removed from this file in the future. | individual file |
70+
| `test_status` | `quarantine_test_result` attribute of the individual struct. Currently mainly used for testing purposes. Takes the following values: -2: the individual is not currently being tested; -1 (-3): a (priority) test has been ordered; 0: the individual is waiting for a result which will be negative; 1: the individual is waiting for a test result which will be positive; note that regardless of the result once the test result has been received this variables returns to not current being tested (-2) | individual file |
71+
| `app_user` | Is this individual an app user (1=Yes; 0=No) | individual file |
72+
| `mean_interactions` | Number of random daily interactions of the individual (the random_interactions attribute of the individual struct) | individual file |
73+
| `infection_count` | Number of times this individual has been infected with SARS-CoV-2 | individual file |
74+
| `ID_recipient` | Unique identifier of the recipient | transmission file |
75+
| `age_group_recipient` | Age group of the recipient (coded by the `enum AGE_GROUPS` in constant.h) | transmission file |
76+
| `house_no_recipient` | Household identifier of the recipient | transmission file |
77+
| `occupation_network_recipient` | Occupation network of the recipient (coded by the `enum OCCUPATION_NETWORKS` within constant.h) | transmission file |
78+
| `worker_type_recipient` | Type of hospital worker of the recipient (coded by the `enum WORKER_TYPES` in constant.h) (default -1) | transmission file |
79+
| `hospital_state_recipient` | Hospital status of the recipient at time of transmission (coded by `enum EVENT_TYPES` in constant.h) (default NOT_IN_HOSPITAL) | transmission file |
80+
| `infector_network` | Network within which the transmission took place (coded by the `enum INTERACTION_TYPE` within constant.h) | transmission file |
81+
| `generation_time` | Generation time of this transmission event (days; time from infection of the source to transmission) (0 for seed cases) | transmission file |
82+
| `ID_source` | Unique identifier of the source (same as ID_recipient for seed cases) | transmission file |
83+
| `age_group_source` | Age group of the source (coded by the `enum AGE_GROUPS` in constant.h) | transmission file |
84+
| `house_no_source` | Household identifier of the source | transmission file |
85+
| `occupation_network_source` | Occupation network of the source (coded by the `enum OCCUPATION_NETWORKS` within constant.h) | transmission file |
86+
| `worker_type_source` | Type of hospital worker of the source at time of transmission (coded by the `enum WORKER_TYPES` in constant.h) (default -1) | transmission file |
87+
| `hospital_state_source` | Hospital status of the source (coded by `enum EVENT_TYPES` in constant.h) (default NOT_IN_HOSPITAL) | transmission file |
88+
| `time_infected_source` | Time when source was infected | transmission file |
89+
| `status_source` | Infectious status of the source at time of transmission (coded by `enum EVENT_TYPES` within constant.h) | transmission file |
90+
| `time_infected` | Time at which transmission took place (time measured as day number of the simulation) | transmission file |
91+
| `time_presymptomatic` | Time at which the recipient became presymptomatic (-1 if never) | transmission file |
92+
| `time_presymptomatic_mild` | Time at which the recipient became presymptomatic (if mildly infected) (-1 if never) | transmission file |
93+
| `time_presymptomatic_severe` | Time at which the recipient became presymptomatic (if severely infected) (-1 if never) | transmission file |
94+
| `time_symptomatic` | Time at which the recipient became symptomatic (-1 if never) | transmission file |
95+
| `time_symptomatic_mild` | Time at which the recipient became symptomatic (if mildly infected) (-1 if never) | transmission file |
96+
| `time_symptomatic_severe` | Time at which the recipient became symptomatic (if severely infected) (-1 if never) | transmission file |
97+
| `time_asymptomatic` | Time at which the recipient became asymptomatic (-1 if never) | transmission file |
98+
| `time_hospitalised` | Time at which the recipient became hospitalised (-1 if never) | transmission file |
99+
| `time_critical` | Time at which the recipient became critical (-1 if never) | transmission file |
100+
| `time_hospitalised_recovering` | Time at which the recipient was discharged from critical but remained in hospital (-1 if never) | transmission file |
101+
| `time_death` | Time at which the recipient died (-1 if never) | transmission file |
102+
| `time_recovered` | Time at which the recipient recovered (-1 if never) | transmission file |
103+
| `time_susceptible` | Time at which the recipient became susceptible again (if waning immunity is possible) | transmission file |
104+
| `is_case` | Was the recipient identified as a case (positive test result) (1=Yes; 0=No) | transmission file |

‎documentation/output_files/timeseries.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
| `total_infected_60_69` | Cumulative infected aged 60-69 years |
1616
| `total_infected_70_79` | Cumulative infected aged 70-79 years |
1717
| `total_infected_80` | Cumulative infected aged 80+ years |
18-
| `total_case` | Cumulative cases |
18+
| `total_case` | Cumulative cases (a case is defined by a positive test result) |
1919
| `total_case_0_9` | Cumulative cases aged 0-9 years |
2020
| `total_case_10_19` | Cumulative cases aged 10-19 years |
2121
| `total_case_20_29` | Cumulative cases aged 20-29 years |
@@ -25,8 +25,7 @@
2525
| `total_case_60_69` | Cumulative cases aged 60-69 years |
2626
| `total_case_70_79` | Cumulative cases aged 70-79 years |
2727
| `total_case_80` | Cumulative cases aged 80+ years |
28-
| `total_death` | Cumulative deaths |
29-
| `total_death` | Cumulative deaths |
28+
| `total_death` | Cumulative deaths (where COVID19 is the primary cause of death) |
3029
| `total_death_0_9` | Cumulative deaths aged 0-9 years |
3130
| `total_death_10_19` | Cumulative deaths aged 10-19 years |
3231
| `total_death_20_29` | Cumulative deaths aged 20-29 years |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Table: transmission file
2+
| Column name | Description |
3+
| ---- | ---- |
4+
| `ID_recipient` | Unique identifier of the recipient |
5+
| `age_group_recipient` | Age group of the recipient (coded by the `enum AGE_GROUPS` in constant.h) |
6+
| `house_no_recipient` | Household identifier of the recipient |
7+
| `occupation_network_recipient` | Occupation network of the recipient (coded by the `enum OCCUPATION_NETWORKS` within constant.h) |
8+
| `worker_type_recipient` | Type of hospital worker of the recipient (coded by the `enum WORKER_TYPES` in constant.h) (default -1) |
9+
| `hospital_state_recipient` | Hospital status of the recipient at time of transmission (coded by `enum EVENT_TYPES` in constant.h) (default NOT_IN_HOSPITAL) |
10+
| `infector_network` | Network within which the transmission took place (coded by the `enum INTERACTION_TYPE` within constant.h) |
11+
| `generation_time` | Generation time of this transmission event (days; time from infection of the source to transmission) (0 for seed cases) |
12+
| `ID_source` | Unique identifier of the source (same as ID_recipient for seed cases) |
13+
| `age_group_source` | Age group of the source (coded by the `enum AGE_GROUPS` in constant.h) |
14+
| `house_no_source` | Household identifier of the source |
15+
| `occupation_network_source` | Occupation network of the source (coded by the `enum OCCUPATION_NETWORKS` within constant.h) |
16+
| `worker_type_source` | Type of hospital worker of the source at time of transmission (coded by the `enum WORKER_TYPES` in constant.h) (default -1) |
17+
| `hospital_state_source` | Hospital status of the source (coded by `enum EVENT_TYPES` in constant.h) (default NOT_IN_HOSPITAL) |
18+
| `time_infected_source` | Time when source was infected |
19+
| `status_source` | Infectious status of the source at time of transmission (coded by `enum EVENT_TYPES` within constant.h) |
20+
| `time_infected` | Time at which transmission took place (time measured as day number of the simulation) |
21+
| `time_presymptomatic` | Time at which the recipient became presymptomatic (-1 if never) |
22+
| `time_presymptomatic_mild` | Time at which the recipient became presymptomatic (if mildly infected) (-1 if never) |
23+
| `time_presymptomatic_severe` | Time at which the recipient became presymptomatic (if severely infected) (-1 if never) |
24+
| `time_symptomatic` | Time at which the recipient became symptomatic (-1 if never) |
25+
| `time_symptomatic_mild` | Time at which the recipient became symptomatic (if mildly infected) (-1 if never) |
26+
| `time_symptomatic_severe` | Time at which the recipient became symptomatic (if severely infected) (-1 if never) |
27+
| `time_asymptomatic` | Time at which the recipient became asymptomatic (-1 if never) |
28+
| `time_hospitalised` | Time at which the recipient became hospitalised (-1 if never) |
29+
| `time_critical` | Time at which the recipient became critical (-1 if never) |
30+
| `time_hospitalised_recovering` | Time at which the recipient was discharged from critical but remained in hospital (-1 if never) |
31+
| `time_death` | Time at which the recipient died (-1 if never) |
32+
| `time_recovered` | Time at which the recipient recovered (-1 if never) |
33+
| `time_susceptible` | Time at which the recipient became susceptible again (if waning immunity is possible) |
34+
| `is_case` | Was the recipient identified as a case (positive test result) (1=Yes; 0=No) |

‎python/create_output_file_dictionaries.py

+14-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from os.path import join
33
import pandas as pd, numpy as np
44

5-
def create_markdown_from_df(df, title = ""):
5+
def create_markdown_from_df(df, title = "", include_file_type = False):
66
"""
77
Create text string of markdown table from pandas dataframe of OpenABM-Covid19 parameters
88
Used in automated creation of markdown tables for model documentation.
@@ -36,11 +36,17 @@ def create_markdown_from_df(df, title = ""):
3636

3737
table_body = list()
3838
for i, row in df.iterrows():
39-
40-
table_row = "| `{}` | {} |".format(
41-
row["Column name"],
42-
row.Description)
43-
39+
40+
if include_file_type:
41+
table_row = "| `{}` | {} | {} |".format(
42+
row["Column name"],
43+
row.Description,
44+
row["File type"])
45+
else:
46+
table_row = "| `{}` | {} |".format(
47+
row["Column name"],
48+
row.Description)
49+
4450
table_body.append(table_row)
4551

4652
output = title_text + header + hline + table_body
@@ -76,8 +82,8 @@ def create_markdown_from_df(df, title = ""):
7682
f.write(markdown_table)
7783

7884
# Generate table for all parameters
79-
df_all = df.replace(np.nan, "-").drop(columns = ["File type"])
80-
markdown_table = create_markdown_from_df(df_all, title = "Table: Output file dictionary")
85+
df_all = df.replace(np.nan, "-")
86+
markdown_table = create_markdown_from_df(df_all, title = "Table: Output file dictionary", include_file_type = True)
8187

8288
with open(join("documentation", "output_files", "output_file_dictionary.md"), 'w') as f:
8389
f.write(markdown_table)

0 commit comments

Comments
 (0)
Please sign in to comment.