This package is hosted on Github. Please install it using this command:
remotes::install_github("ithim/ithim-r")
save r: saveRds(rdsfile, version = 2)
city region names: https://github.com/metahit/mh-execute/blob/master/inputs/mh_regions_lad_lookup.csv
mh-execute: everything it calls, nothing it doesn't call
Loop through all scenarios (cyc_scen
and car_scen
) in global_scen
:
-
Set
NSAMPLES
(sample size) - currently set to 4 -
Set parameters with their distributions (for instance
MMET_CYCLING
) -
Set default mode speeds
-
Get
DR
relationships fromithimr
package (NOTE: Will be replaced bydrpa
package) -
Read
DISEASE_INVENTORY
frominputs/dose_response/disease_outcomes_lookup.csv
-
Read
BACKGROUND_POLLUION_TABLE
frominputs/background-air-pollution/1_apmeans.csv
-
Read
age categories
frominputs/scenarios/190330_sp_ind_codebook.xlsx
-
Read scenario and city specific
emissions_distances
andpa_distances
frominputs/distances/
-
Read
city_total_distances
by mode, frominputs/distances/mode_road_city.csv
-
Read
injury_table
frominputs/injury/processed_injuries_9.Rds
-
Read
city_regions_table
frominputs/mh_regions_lad_lookup.csv
and filter for only those regions mentioned in theinjury_table
-
Read
scenarios
files per for theglobal_scen
for eachLAD
(Local Authority District) -
Set
ithim_setup_parameters
-
Loop through all
city_regions
-
Read
GBD
data -
Read
inh_distances
-
Filter
LAD
for the currentcity_region
-
Create
per person summary
(pp_summary
) for all scenarios by summarizing total mode specific duration per person. Also summarize, where present,work_ltpa_marg_mmet
-
Summarise
DIST
for motorised modes (car
,motorcycle
andbus
) for eachLAD
fromemission_distances
-
Set city-specific parameters for background
PM2.5
andtransport_share
, which are read fromBACKGROUND_POLLUION_TABLE
-
For each sample, do the following:
- Create
SiN
coefficients forCAS_EXPONENT
andSTR_EXPONENT
fromparameters
- Initialize
VEHICLE_INVENTORY
for the modes - Using
DIST
andpp_summary
to calculatescenario_pm_calculations
- Using
pm_conc_pp
calcualateRR_AP_calculations
usinggen_ap_rr
- Calculate
total_mmet
usingpp_summary
- Calculate
RR_PA_calculations
usingithimr::gen_pa_rr
- Calculate combined
AP
andPA
relative riskRR_PA_AP_calculations
- by multiplying, usingcombined_rr_ap_pa
- Create
-