devtools::load_all (".", export_all = FALSE)
This project currently processes data for the two cities of Accra,
Ghana, and Kathmandu, Nepal. Most functions accept a single
argument as one of the two of these (without country specifications).
Having downloaded and locally installed the package, the following lines
are necessary to pre-process and locally save required data.
city <- "Kathmandu" # or Accra hw <- who3_network (city) # way network bus <- who3_bus_network (city) bus <- who3_bus_centrality (city) cent <- who3_centrality (city) # time-based centrality for motorcars b <- who3_buildings (city) netf <- who3_flow (city) # calculate pedestrian flows from buses and activity centres
The main results are then returned from an additional function which appends columns quantifying densities of motorcars, and equivalent dispersed values representing dispersal of pollutant away from vehicular sources of origin. The single additional parameter of this function specifies the width of a Gaussian diespersal kernel in metres.
netf <- who3_disperse_centrality (city, disperse_width = 200)
That returns an
data.frame with columns for pedestrian
"flow"), vehicular flows (
"centrality"), and dispersed
vehicular flows (
"centrality_disp"). The direct exposure of
pedestrians to vehicular emissions can then be obtained by multiplying
flow * centrality_disp.