-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcalc_hia_gbd2017_pm25.py
executable file
·355 lines (341 loc) · 25.3 KB
/
calc_hia_gbd2017_pm25.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
#!/usr/bin/env python3
import numpy as np
import glob
from import_npz import import_npz
from find_nearest import find_nearest
def calc_rr_gbd2017_pm25(apm25, hpm25, dict_pm25_ier):
""" convert PM2.5 to rr using the GBD2017 IER function for PM2.5 """
""" call example: calc_hia_gbd2017_pm25(apm25, hpm25, pop_z_2015, dict_ages, dict_bm, dict_pm25_ier, sfu) """
causes = ['lri', 'lc', 'copd', 'diab', 'str', 'ihd']
ages = ['25_29', '30_34', '35_39', '40_44', '45_49', '50_54', '55_59', '60_64', '65_69', '70_74',
'75_79', '80_84', '85_89', '90_94', '95up']
metrics = ['mean', 'upper', 'lower']
# relative risk
# non-sfu, apm25 only (all)
# sfu, apm25 and hpm25 (female, male, child)
dict_rr = {}
for cause in ['lri', 'lc', 'copd', 'diab']:
for metric in metrics:
dict_rr.update({ cause + '_' + metric :
np.array([[dict_pm25_ier['rr_gbd2017_' + cause + '_' + metric][find_nearest(dict_pm25_ier['rr_gbd2017_conc'], apm25[lat][lon] + hpm25[lat][lon])]
for lon in range(apm25.shape[1])] for lat in range(apm25.shape[0])]) })
for cause in ['str', 'ihd']: # also split by age
for metric in metrics:
for age in ages:
dict_rr.update({ cause + '_' + metric + '_' + age :
np.array([[dict_pm25_ier['rr_gbd2017_' + cause + '_' + metric + '_' + age][find_nearest(dict_pm25_ier['rr_gbd2017_conc'], apm25[lat][lon] + hpm25[lat][lon])]
for lon in range(apm25.shape[1])] for lat in range(apm25.shape[0])]) })
return dict_rr
def calc_hia_gbd2017_pm25(apm25, hpm25_female, hpm25_male, hpm25_child, dict_rr_apm25, dict_rr_tpm25_female, dict_rr_tpm25_male, dict_rr_tpm25_child, pop_z_2015, dict_ages, dict_bm, dict_pm25_ier, sfu):
""" health impact assessment using the GBD2017 IER function for PM2.5 """
""" inputs are exposure to annual-mean ambient and household PM2.5 on a global grid at 0.25 degrees """
""" estimated for all ages individually """
""" call example: calc_hia_gbd2017_pm25(apm25, hpm25_female, hpm25_male, hpm25_child, dict_rr_apm25, dict_rr_tpm25_female, dict_rr_tpm25_male, dict_rr_tpm25_child, pop_z_2015, dict_ages, dict_bm, dict_pm25_ier, sfu) """
# inputs
causes = ['lri', 'lc', 'copd', 'diab', 'str', 'ihd']
ages = ['25_29', '30_34', '35_39', '40_44', '45_49', '50_54', '55_59', '60_64', '65_69', '70_74',
'75_79', '80_84', '85_89', '90_94', '95up']
lri_adult_ages = ['20_24', '25_29', '30_34', '35_39', '40_44', '45_49', '50_54', '55_59', '60_64', '65_69', '70_74',
'75_79', '80_84', '85_89', '90_94', '95up']
lri_child_ages = ['eneo', 'lneo', 'pneo', '1_4', '5_9', '10_14', '15_19']
outcomes = ['mort', 'yll', 'yld']
metrics = ['mean', 'upper', 'lower']
lcc = 2.4 # no cap at 84 ugm-3
ratio = {}
ratio.update({ 'ihd':0.141 }) # for yld, rr = (ratio_ihd * rr) - ratio_ihd + 1
ratio.update({ 'str':0.553 }) # for yld, rr = (ratio_str * rr) - ratio_str + 1
# health impact assessment
hia_pm25 = {}
hia_pm25.update({ 'pop' : pop_z_2015 })
hia_pm25.update({ 'apm25_popweighted' : pop_z_2015 * apm25 })
hia_pm25.update({ 'hpm25_female_popweighted' : pop_z_2015 * hpm25_female })
hia_pm25.update({ 'hpm25_male_popweighted' : pop_z_2015 * hpm25_male })
hia_pm25.update({ 'hpm25_child_popweighted' : pop_z_2015 * hpm25_child })
# no sfu apm25, sfu apm25 female, sfu hpm25 female, sfu apm25 male, sfu hpm25 male
for cause in ['lri', 'lc', 'copd', 'diab']:
for outcome in outcomes:
for metric in metrics:
for age in ages:
# no sfu - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_nosfu_apm25_' + cause + '_' + metric + '_' + age :
(1 - sfu) # non-solid fuel using household only
* pop_z_2015
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_both_' + metric + '_' + age]
* (dict_rr_apm25[cause + '_' + metric] - 1) / dict_rr_apm25[cause + '_' + metric] })
# sfu (female) - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_apm25_female_' + cause + '_' + metric + '_' + age :
sfu # sfu using households
* (apm25 / (apm25 + hpm25_female)) # apm25 fraction of paf
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_female_' + metric + '_' + age]
* (dict_rr_tpm25_female[cause + '_' + metric] - 1) / dict_rr_tpm25_female[cause + '_' + metric] })
# sfu (female) - hpm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_hpm25_female_' + cause + '_' + metric + '_' + age :
sfu
* (hpm25_female / (apm25 + hpm25_female))
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_female_' + metric + '_' + age]
* (dict_rr_tpm25_female[cause + '_' + metric] - 1) / dict_rr_tpm25_female[cause + '_' + metric] })
# sfu (male) - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_apm25_male_' + cause + '_' + metric + '_' + age :
sfu
* (apm25 / (apm25 + hpm25_male))
* (pop_z_2015 / 2) # half for male
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_male_' + metric + '_' + age]
* (dict_rr_tpm25_male[cause + '_' + metric] - 1) / dict_rr_tpm25_male[cause + '_' + metric] })
# sfu (male) - hpm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_hpm25_male_' + cause + '_' + metric + '_' + age :
sfu
* (hpm25_male / (apm25 + hpm25_male))
* (pop_z_2015 / 2) # half for male
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_male_' + metric + '_' + age]
* (dict_rr_tpm25_male[cause + '_' + metric] - 1) / dict_rr_tpm25_male[cause + '_' + metric] })
# additional for lri 20_24 and children
# no sfu apm25 adult, sfu apm25 adult female, sfu hpm25 adult female, sfu apm25 adult male, sfu hpm25 adult male
# no sfu apm25 child, sfu apm25 child, sfu hpm25 child
for outcome in outcomes:
for metric in metrics:
# no sfu - apm25 - mort, yll, yld - age = 20_24
hia_pm25.update({ outcome + '_nosfu_apm25_lri_' + metric + '_20_24' :
(1 - sfu)
* pop_z_2015
* dict_ages['cf_age_fraction_20_24_grid']
* dict_bm['i_' + outcome + '_lri_both_' + metric + '_20_24']
* (dict_rr_apm25['lri_' + metric] - 1) / dict_rr_apm25['lri_' + metric] })
# sfu (female) - apm25 - mort, yll, yld - age = 20_24
hia_pm25.update({ outcome + '_sfu_apm25_female_lri_' + metric + '_20_24' :
sfu
* (apm25 / (apm25 + hpm25_female))
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_20_24_grid']
* dict_bm['i_' + outcome + '_lri_female_' + metric + '_20_24']
* (dict_rr_tpm25_female['lri_' + metric] - 1) / dict_rr_tpm25_female['lri_' + metric] })
# sfu (female) - hpm25 - mort, yll, yld - age = 20_24
hia_pm25.update({ outcome + '_sfu_hpm25_female_lri_' + metric + '_20_24' :
sfu
* (hpm25_female / (apm25 + hpm25_female))
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_20_24_grid']
* dict_bm['i_' + outcome + '_lri_female_' + metric + '_20_24']
* (dict_rr_tpm25_female['lri_' + metric] - 1) / dict_rr_tpm25_female['lri_' + metric] })
# sfu (male) - apm25 - mort, yll, yld - age = 20_24
hia_pm25.update({ outcome + '_sfu_apm25_male_lri_' + metric + '_20_24' :
sfu
* (apm25 / (apm25 + hpm25_male))
* (pop_z_2015 / 2) # half for male
* dict_ages['cf_age_fraction_20_24_grid']
* dict_bm['i_' + outcome + '_lri_male_' + metric + '_20_24']
* (dict_rr_tpm25_male['lri_' + metric] - 1) / dict_rr_tpm25_male['lri_' + metric] })
# sfu (male) - hpm25 - mort, yll, yld - age = 20_24
hia_pm25.update({ outcome + '_sfu_hpm25_male_lri_' + metric + '_20_24' :
sfu
* (hpm25_male / (apm25 + hpm25_male))
* (pop_z_2015 / 2) # half for male
* dict_ages['cf_age_fraction_20_24_grid']
* dict_bm['i_' + outcome + '_lri_male_' + metric + '_20_24']
* (dict_rr_tpm25_male['lri_' + metric] - 1) / dict_rr_tpm25_male['lri_' + metric] })
for age in lri_child_ages:
# no sfu - apm25 - mort, yll, yld - age < 20
hia_pm25.update({ outcome + '_nosfu_apm25_lri_' + metric + '_' + age :
(1 - sfu)
* pop_z_2015
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_lri_both_' + metric + '_' + age]
* (dict_rr_apm25['lri_' + metric] - 1) / dict_rr_apm25['lri_' + metric] })
# sfu (child) - apm25 - mort, yll, yld - age < 20
hia_pm25.update({ outcome + '_sfu_apm25_child_lri_' + metric + '_' + age :
sfu
* (apm25 / (apm25 + hpm25_child))
* pop_z_2015
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_lri_both_' + metric + '_' + age]
* (dict_rr_tpm25_child['lri_' + metric] - 1) / dict_rr_tpm25_child['lri_' + metric] })
# sfu (child) - hpm25 - mort, yll, yld - age < 20
hia_pm25.update({ outcome + '_sfu_hpm25_child_lri_' + metric + '_' + age :
sfu
* (hpm25_child / (apm25 + hpm25_child))
* pop_z_2015
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_lri_both_' + metric + '_' + age]
* (dict_rr_tpm25_child['lri_' + metric] - 1) / dict_rr_tpm25_child['lri_' + metric] })
# no sfu apm25, sfu apm25 female, sfu hpm25 female, sfu apm25 male, sfu hpm25 male
for cause in ['ihd', 'str']:
for outcome in ['mort', 'yll']:
for metric in metrics:
for age in ages:
# no sfu - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_nosfu_apm25_' + cause + '_' + metric + '_' + age :
(1 - sfu)
* pop_z_2015
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_both_' + metric + '_' + age]
* (dict_rr_apm25[cause + '_' + metric + '_' + age] - 1) / dict_rr_apm25[cause + '_' + metric + '_' + age] })
# sfu (female) - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_apm25_female_' + cause + '_' + metric + '_' + age :
sfu
* (apm25 / (apm25 + hpm25_female))
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_female_' + metric + '_' + age]
* (dict_rr_tpm25_female[cause + '_' + metric + '_' + age] - 1) / dict_rr_tpm25_female[cause + '_' + metric + '_' + age] })
# sfu (female) - hpm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_hpm25_female_' + cause + '_' + metric + '_' + age :
sfu
* (hpm25_female / (apm25 + hpm25_female))
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_female_' + metric + '_' + age]
* (dict_rr_tpm25_female[cause + '_' + metric + '_' + age] - 1) / dict_rr_tpm25_female[cause + '_' + metric + '_' + age] })
# sfu (male) - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_apm25_male_' + cause + '_' + metric + '_' + age :
sfu
* (apm25 / (apm25 + hpm25_male))
* (pop_z_2015 / 2) # half for male
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_male_' + metric + '_' + age]
* (dict_rr_tpm25_male[cause + '_' + metric + '_' + age] - 1) / dict_rr_tpm25_male[cause + '_' + metric + '_' + age] })
# sfu (male) - hpm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_hpm25_male_' + cause + '_' + metric + '_' + age :
sfu
* (hpm25_male / (apm25 + hpm25_male))
* (pop_z_2015 / 2) # half for male
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_male_' + metric + '_' + age]
* (dict_rr_tpm25_male[cause + '_' + metric + '_' + age] - 1) / dict_rr_tpm25_male[cause + '_' + metric + '_' + age] })
# yld with ratios for ihd and str
for cause in ['ihd', 'str']:
for outcome in ['yld']:
for metric in metrics:
for age in ages:
# no sfu - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_nosfu_apm25_' + cause + '_' + metric + '_' + age :
(1 - sfu)
* pop_z_2015
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_both_' + metric + '_' + age]
* ((( (ratio[cause] * dict_rr_apm25[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 ) - 1) / ( (ratio[cause] * dict_rr_apm25[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 )) })
# sfu (female) - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_apm25_female_' + cause + '_' + metric + '_' + age :
sfu
* (apm25 / (apm25 + hpm25_female))
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_female_' + metric + '_' + age]
* ((( (ratio[cause] * dict_rr_tpm25_female[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 ) - 1) / ( (ratio[cause] * dict_rr_tpm25_female[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 )) })
# sfu (female) - hpm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_hpm25_female_' + cause + '_' + metric + '_' + age :
sfu
* (hpm25_female / (apm25 + hpm25_female))
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_female_' + metric + '_' + age]
* ((( (ratio[cause] * dict_rr_tpm25_female[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 ) - 1) / ( (ratio[cause] * dict_rr_tpm25_female[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 )) })
# sfu (male) - apm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_apm25_male_' + cause + '_' + metric + '_' + age :
sfu
* (apm25 / (apm25 + hpm25_male))
* (pop_z_2015 / 2) # half for male
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_male_' + metric + '_' + age]
* ((( (ratio[cause] * dict_rr_tpm25_male[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 ) - 1) / ( (ratio[cause] * dict_rr_tpm25_male[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 )) })
# sfu (male) - hpm25 - mort, yll, yld - age > 25
hia_pm25.update({ outcome + '_sfu_hpm25_male_' + cause + '_' + metric + '_' + age :
sfu
* (hpm25_male / (apm25 + hpm25_male))
* (pop_z_2015 / 2) # half for male
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_' + outcome + '_' + cause + '_male_' + metric + '_' + age]
* ((( (ratio[cause] * dict_rr_tpm25_male[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 ) - 1) / ( (ratio[cause] * dict_rr_tpm25_male[cause + '_' + metric + '_' + age]) - ratio[cause] + 1 )) })
# cata
for metric in metrics:
for age in ages:
# sfu (female) - hpm25 - yld - age > 25
hia_pm25.update({ 'yld_sfu_hpm25_female_cata_' + metric + '_' + age :
sfu
* (pop_z_2015 / 2) # half for female
* dict_ages['cf_age_fraction_' + age + '_grid']
* dict_bm['i_yld_cata_female_' + metric + '_' + age]
* ((1.0247 * hpm25_female / 10 ) - 1 ) / ( 1.0247 * hpm25_female / 10 ) })
# mort, yll, yld - totals
for cause in causes:
for outcome in outcomes:
for metric in metrics:
# apm25
# no sfu
hia_pm25.update({ outcome + '_nosfu_apm25_' + cause + '_' + metric + '_total' :
sum([value for key, value in hia_pm25.items()
if outcome + '_nosfu_apm25_' + cause + '_' + metric in key]) })
# sfu - female
hia_pm25.update({ outcome + '_sfu_apm25_female_' + cause + '_' + metric + '_total' :
sum([value for key, value in hia_pm25.items()
if outcome + '_sfu_apm25_female_' + cause + '_' + metric in key]) })
# sfu - male
hia_pm25.update({ outcome + '_sfu_apm25_male_' + cause + '_' + metric + '_total' :
sum([value for key, value in hia_pm25.items()
if outcome + '_sfu_apm25_male_' + cause + '_' + metric in key]) })
# sfu - child
hia_pm25.update({ outcome + '_sfu_apm25_child_' + cause + '_' + metric + '_total' :
sum([value for key, value in hia_pm25.items()
if outcome + '_sfu_apm25_child_' + cause + '_' + metric in key]) })
# sfu - total
hia_pm25.update({ outcome + '_sfu_apm25_' + cause + '_' + metric + '_total' :
hia_pm25[outcome + '_sfu_apm25_female_' + cause + '_' + metric + '_total']
+ hia_pm25[outcome + '_sfu_apm25_male_' + cause + '_' + metric + '_total']
+ hia_pm25[outcome + '_sfu_apm25_child_' + cause + '_' + metric + '_total'] })
# apm25 - total
hia_pm25.update({ outcome + '_apm25_' + cause + '_' + metric + '_total' :
hia_pm25[outcome + '_sfu_apm25_' + cause + '_' + metric + '_total']
+ hia_pm25[outcome + '_nosfu_apm25_' + cause + '_' + metric + '_total'] })
# sfu - hpm25 - female
hia_pm25.update({ outcome + '_sfu_hpm25_female_' + cause + '_' + metric + '_total' :
sum([value for key, value in hia_pm25.items()
if outcome + '_sfu_hpm25_female_' + cause + '_' + metric in key]) })
# sfu - hpm25 - male
hia_pm25.update({ outcome + '_sfu_hpm25_male_' + cause + '_' + metric + '_total' :
sum([value for key, value in hia_pm25.items()
if outcome + '_sfu_hpm25_male_' + cause + '_' + metric in key]) })
# sfu - hpm25 - child
hia_pm25.update({ outcome + '_sfu_hpm25_child_' + cause + '_' + metric + '_total' :
sum([value for key, value in hia_pm25.items()
if outcome + '_sfu_hpm25_child_' + cause + '_' + metric in key]) })
# sfu - hpm25
hia_pm25.update({ outcome + '_hpm25_' + cause + '_' + metric + '_total' :
hia_pm25[outcome + '_sfu_hpm25_female_' + cause + '_' + metric + '_total']
+ hia_pm25[outcome + '_sfu_hpm25_male_' + cause + '_' + metric + '_total']
+ hia_pm25[outcome + '_sfu_hpm25_child_' + cause + '_' + metric + '_total'] })
# tpm25
hia_pm25.update({ outcome + '_tpm25_' + cause + '_' + metric + '_total' :
hia_pm25[outcome + '_apm25_' + cause + '_' + metric + '_total']
+ hia_pm25[outcome + '_hpm25_' + cause + '_' + metric + '_total'] })
# dalys - total
for split in ['apm25', 'hpm25', 'tpm25']:
for cause in causes:
for outcome in outcomes:
for metric in metrics:
hia_pm25.update({ 'dalys_' + split + '_' + cause + '_' + metric + '_total':
hia_pm25['yll_' + split + '_' + cause + '_' + metric + '_total']
+ hia_pm25['yld_' + split + '_' + cause + '_' + metric + '_total'] })
for split in ['apm25', 'hpm25', 'tpm25']:
for outcome in ['mort', 'yll', 'yld', 'dalys']:
for metric in metrics:
# 6cod - total
hia_pm25.update({ outcome + '_' + split + '_6cod_' + metric + '_total' :
sum([value for key, value in hia_pm25.items()
if outcome in key and metric in key
and split in key and 'total' in key
and not '6cod' in key
and not 'female' in key
and not 'male' in key
and not 'child' in key
and not 'nosfu' in key
and not 'sfu' in key]) })
# 6cod rates - total
hia_pm25.update({ outcome + '_' + split + '_rate_6cod_' + metric + '_total' :
hia_pm25[outcome + '_' + split + '_6cod_' + metric + '_total']
* ( 100000 / pop_z_2015) })
return hia_pm25