Skip to content

Commit 755dcaf

Browse files
committed
Add vehicle inventory to the ithim object as well. Re #93
1 parent a362ec4 commit 755dcaf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

multi_city_script.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
rm(list=ls())
22
library(ithimr)
3+
library(readxl)
34

45
if (!require("drpa",character.only = TRUE)) {
56
print('Installing "drpa" package...')
@@ -163,7 +164,7 @@ ithim_objects <- outcome <- outcome_pp <- yll_per_hundred_thousand <- list()
163164

164165
toplot <- matrix(0, nrow = 3, ncol = length(cities)) #3 scenarios, 20 cities
165166
ithim_objects <- list()
166-
print(system.time(for(city in cities[1]){
167+
print(system.time(for(city in cities){
167168
print(city)
168169
ithim_objects[[city]] <- run_ithim_setup(
169170
LATAM = latam,
@@ -200,6 +201,7 @@ print(system.time(for(city in cities[1]){
200201
ithim_objects[[city]]$disease_burden <- DISEASE_BURDEN
201202
ithim_objects[[city]]$PM_emission_inventory <- PM_EMISSION_INVENTORY
202203
ithim_objects[[city]]$injury_table <- INJURY_TABLE
204+
ithim_objects[[city]]$vehicle_inventory <- VEHICLE_INVENTORY
203205

204206
## store results to plot
205207
min_ages <- sapply(ithim_objects[[city]]$outcome$hb$ylls$age_cat,function(x)as.numeric(strsplit(x,'-')[[1]][1]))

0 commit comments

Comments
 (0)