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
DRrelationships fromithimrpackage (NOTE: Will be replaced bydrpapackage) -
Read
DISEASE_INVENTORYfrominputs/dose_response/disease_outcomes_lookup.csv -
Read
BACKGROUND_POLLUION_TABLEfrominputs/background-air-pollution/1_apmeans.csv -
Read
age categoriesfrominputs/scenarios/190330_sp_ind_codebook.xlsx -
Read scenario and city specific
emissions_distancesandpa_distancesfrominputs/distances/ -
Read
city_total_distancesby mode, frominputs/distances/mode_road_city.csv -
Read
injury_tablefrominputs/injury/processed_injuries_9.Rds -
Read
city_regions_tablefrominputs/mh_regions_lad_lookup.csvand filter for only those regions mentioned in theinjury_table -
Read
scenariosfiles per for theglobal_scenfor eachLAD(Local Authority District) -
Set
ithim_setup_parameters -
Loop through all
city_regions-
Read
GBDdata -
Read
inh_distances -
Filter
LADfor 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
DISTfor motorised modes (car,motorcycleandbus) for eachLADfromemission_distances -
Set city-specific parameters for background
PM2.5andtransport_share, which are read fromBACKGROUND_POLLUION_TABLE -
For each sample, do the following:
- Create
SiNcoefficients forCAS_EXPONENTandSTR_EXPONENTfromparameters - Initialize
VEHICLE_INVENTORYfor the modes - Using
DISTandpp_summaryto calculatescenario_pm_calculations - Using
pm_conc_ppcalcualateRR_AP_calculationsusinggen_ap_rr - Calculate
total_mmetusingpp_summary - Calculate
RR_PA_calculationsusingithimr::gen_pa_rr - Calculate combined
APandPArelative riskRR_PA_AP_calculations- by multiplying, usingcombined_rr_ap_pa
- Create
-