Introduction

This analysis projects vehicle miles traveled (VMT) for Grenada in the years 2020 and 2040 by simulating population growth, vehicle ownership, and urban travel distances between the two main urban centers (St. George and Grenville). We run 20 stochastic simulations per target year, sampling one of two speculative annual population growth rates (1.003 or 1.005) and using spatial centroids to compute inter-city travel distances. The output table lists VMT values for each simulation, and we report the mean projected VMT.

Data Preperation

01. Load libraries

02. Load Data

## Reading layer `Grenada' from data source 
##   `C:\Users\fauxi\OneDrive\Documents\FALL SEMESTER\EDA\Module3\Data\Data\Grenada\Grenada.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 1 feature and 1 field
## Geometry type: POLYGON
## Dimension:     XY
## Bounding box:  xmin: 421308.5 ymin: 1324915 xmax: 443132.6 ymax: 1352313
## Projected CRS: Grenada 1953 / British West Indies Grid
## Reading layer `RoadsCleaned2' from data source 
##   `C:\Users\fauxi\OneDrive\Documents\FALL SEMESTER\EDA\Module3\Data\Data\Roads\RoadsCleaned2.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 4208 features and 17 fields
## Geometry type: LINESTRING
## Dimension:     XY
## Bounding box:  xmin: 421870.7 ymin: 1325107 xmax: 443091.8 ymax: 1352134
## Projected CRS: Grenada 1953 / British West Indies Grid
## Reading layer `population_building' from data source 
##   `C:\Users\fauxi\OneDrive\Documents\FALL SEMESTER\EDA\Module3\Data\Data\Buildings_and_Pop\population_building.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 41455 features and 12 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 632772.8 ymin: 1325476 xmax: 651994.6 ymax: 1352712
## Projected CRS: WGS 84 / UTM zone 20N
## Reading layer `St Georges Densification Zone' from data source 
##   `C:\Users\fauxi\OneDrive\Documents\FALL SEMESTER\EDA\Module3\Data\Data\Densification_plan\St Georges Densification Zone.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 4 features and 3 fields
## Geometry type: POLYGON
## Dimension:     XY
## Bounding box:  xmin: 630945 ymin: 1325445 xmax: 642285 ymax: 1337475
## Projected CRS: WGS 84 / UTM zone 20N
## Reading layer `St_Georges_Grenville' from data source 
##   `C:\Users\fauxi\OneDrive\Documents\FALL SEMESTER\EDA\Module3\Data\Data\St_Georges_Grenville\St_Georges_Grenville.shp' 
##   using driver `ESRI Shapefile'
## Simple feature collection with 5 features and 3 fields
## Geometry type: POLYGON
## Dimension:     XY
## Bounding box:  xmin: 630945 ymin: 1325445 xmax: 651375 ymax: 1343325
## Projected CRS: WGS 84 / UTM zone 20N

03. Reproject and filter data

04. Visualize Data

05. Create edges’ ID from roads

06. Extract nodes from edges, taking the first the last node from each edge, and labelling them as “start” and “end”

07. Give each node a unique ID

08. Store the start and end nodes with their node IDs and their edge ID

09. Add to edges - the source node and target node - rename their node IDs to “from” and “to”

10. Remove duplicate nodes and convert nodes into sf objects using the x and y coordinates

11. Visualise the Nodes

12. Convert into tidygraph object

## # A tbl_graph: 3740 nodes and 4208 edges
## #
## # An undirected multigraph with 132 components
## #
## # Edge Data: 4,208 × 5 (active)
##     from    to edgeID                                            geometry length
##    <int> <int>  <dbl>                                    <LINESTRING [m]>    [m]
##  1     1     2      1 (645985.8 1352629, 645993.5 1352628, 646004.5 1352…  94.3 
##  2     1     3      2 (645806.8 1352377, 645811.1 1352381, 645826.8 1352… 358.  
##  3     3     4      3 (645668.4 1352359, 645705.9 1352360, 645732 135236… 152.  
##  4     5     6      4 (646500.1 1352125, 646502.2 1352147, 646507.6 1352… 324.  
##  5     7     8      5                (648487.1 1351353, 648486.7 1351360)   7.01
##  6     7     9      6 (648267.2 1351655, 648268.7 1351645, 648273.8 1351… 436.  
##  7    10    11      7 (646943.3 1351343, 646937.1 1351338, 646925.9 1351… 206.  
##  8    12    13      8 (647847.9 1351387, 647837.2 1351379, 647831.2 1351… 873.  
##  9    14    15      9 (646425.5 1350602, 646419.6 1350609, 646397.7 1350… 250.  
## 10    16    17     10                (648834.9 1350504, 648830.1 1350513)   9.85
## # ℹ 4,198 more rows
## #
## # Node Data: 3,740 × 2
##   nodeID           geometry
##    <int>        <POINT [m]>
## 1      1 (645985.8 1352629)
## 2      2 (646070.7 1352590)
## 3      3 (645806.8 1352377)
## # ℹ 3,737 more rows

13. Towncentre proxies

14. Set Origins for Trips - which will be centre points of buildings

##          [,1]    [,2]
## [1,] 647571.6 1338059

15. Set Destination for Trips - which will be towncentres

##          [,1]    [,2]
## [1,] 635166.9 1328608

16. Get all coordinates from nodes - we need this since builings/origin is not aligned with the nodes - so we need this to find the closest nodes for the origin

17. Find nearest nodes for the origins

18. Shortest distance algorithm

19. Extract numeric travel distance

# 1) pull out the raw igraph edge sequence, then coerce to numeric
#    path$epath is a list of edge‐sequences; we want the first (and only) one:
edge_seq <- as.numeric(path$epath[[1]])

# 2) slice your tidygraph’s edges by those row‐numbers, pull the 'length' column and sum it
travel_dist <- graph %>%
  tidygraph::activate(edges) %>%
  dplyr::slice(edge_seq) %>%
  dplyr::pull(length) %>%
  sum() %>%
  as.numeric()

# sanity check
cat("Inter‐city travel distance (meters):", round(travel_dist, 1), "\n")
## Inter‐city travel distance (meters): 21141.7

20. Simulation function

library(dplyr)

simulate_vmt <- function(year, n_sims = 20,
                         growth_rates = c(1.003, 1.005),
                         base_pop = 106823,
                         travel_dist) {
  # travel_dist: a numeric, the inter-city distance you computed above
  sims <- seq_len(n_sims)
  map_dfr(sims, function(i) {
    rate <- sample(growth_rates, 1)
    pop  <- base_pop * rate^(year - 2015)
    cars <- ceiling(pop / 2)
    vmt  <- cars * travel_dist
    tibble(
      Year          = year,
      SimNumber     = i,
      PopGrowthRate = rate,
      VMT           = vmt
    )
  })
}

21. Run simulations & display results

# assume `travel_dist` is already defined:
# travel_dist <- as.numeric(path$…) 

vmt_2020 <- simulate_vmt(2020, travel_dist = travel_dist)
vmt_2040 <- simulate_vmt(2040, travel_dist = travel_dist)

all_vmt <- bind_rows(vmt_2020, vmt_2040)

# 1) Print the full table:
knitr::kable(
  all_vmt,
  caption = "Simulated VMT by Year and Simulation Number"
)
Simulated VMT by Year and Simulation Number
Year SimNumber PopGrowthRate VMT
2020 1 1.005 1157739550
2020 2 1.003 1146259617
2020 3 1.005 1157739550
2020 4 1.003 1146259617
2020 5 1.005 1157739550
2020 6 1.003 1146259617
2020 7 1.003 1146259617
2020 8 1.005 1157739550
2020 9 1.003 1146259617
2020 10 1.003 1146259617
2020 11 1.005 1157739550
2020 12 1.003 1146259617
2020 13 1.005 1157739550
2020 14 1.005 1157739550
2020 15 1.003 1146259617
2020 16 1.005 1157739550
2020 17 1.005 1157739550
2020 18 1.003 1146259617
2020 19 1.005 1157739550
2020 20 1.003 1146259617
2040 1 1.005 1279177361
2040 2 1.003 1217020821
2040 3 1.003 1217020821
2040 4 1.005 1279177361
2040 5 1.005 1279177361
2040 6 1.003 1217020821
2040 7 1.003 1217020821
2040 8 1.005 1279177361
2040 9 1.005 1279177361
2040 10 1.003 1217020821
2040 11 1.005 1279177361
2040 12 1.005 1279177361
2040 13 1.003 1217020821
2040 14 1.003 1217020821
2040 15 1.005 1279177361
2040 16 1.003 1217020821
2040 17 1.005 1279177361
2040 18 1.003 1217020821
2040 19 1.005 1279177361
2040 20 1.003 1217020821
# 2) Compute and print the overall mean:
overall_mean <- mean(all_vmt$VMT)
cat("\n**Mean projected VMT (2020 & 2040):** ",
    round(overall_mean, 1), "\n")

Mean projected VMT (2020 & 2040): 1200049337

21. Interpretation

The 20 stochastic runs for each target year indicate that:

  • 2020 mean VMT: 1.1519996^{9} meters
  • 2040 mean VMT: 1.2480991^{9} meters

That is a projected increase of
8.3%
in total vehicle miles traveled over twenty years, under our assumed growth rates and “one car per two people” rule.

Inference:
This upward trend suggests that, without interventions (e.g. improved public transit, demand management, or alternative mobility strategies), Grenada’s total vehicle travel could rise substantially as its population grows. Policymakers should consider measures—such as encouraging shared mobility, investing in non-motorized transport infrastructure, or revisiting vehicle-ownership incentives—to curb this increase in VMT and its associated environmental and congestion impacts.