::p_load(olsrr, corrplot, ggpubr, sf, spdep, GWmodel, tmap, tidyverse, gtsummary, SpatialAcc, ggstatsplot, reshape2) pacman
Accessibility to COVID-19 vaccination centres in Singapore
Overview
In a bid to combat Covid-19, Singapore has roll out, Starting from January 4 2023, anyone who needs a Covid-19 immunization or a booster shot can come into any vaccination centers for their shots (The Straits Times, 2023). Residents could visit Vaccine Go Where (https://www.gowhere.gov.sg/vaccine) to look for their nearest vaccination center based on their postal code, a web application designed by Government Technology Agency (GovTech) of Singapore. (The Straits Times, 2023)
In this exercise, we attempt to look at the Geospatial properties of accessibility of vaccination centers and how residents might prefer one vaccination center over another using Geospatial analytics.
We load the required library for the exercise below:
…
Geospatial Data Wrangling
Using the URA Master Plan 2014 subzone boundary GIS data, we will load the spatial data with st_read()
= st_read(dsn="data/geospatial", layer="MP14_SUBZONE_WEB_PL") mpsz
Reading layer `MP14_SUBZONE_WEB_PL' from data source
`D:\Allanckw\ISSS624\Hands-on_Ex6\data\geospatial' using driver `ESRI Shapefile'
Simple feature collection with 323 features and 15 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: 2667.538 ymin: 15748.72 xmax: 56396.44 ymax: 50256.33
Projected CRS: SVY21
We then transform the dataset to the SVY21 projection system and ensure that it is valid with the below code
= st_transform(mpsz, 3414)
mpsz_svy21
= mpsz_svy21 mpsz_svy21_SubZone
We will then need to create a 250m radius hexagons GIS data. This data set was created by using st_make_grid() of sf package, we will also create an ID for every hexagon.
<- st_as_sfc(mpsz_svy21) %>%
grid_250 st_make_grid(square = FALSE, cellsize = c(2.5e2, 2.5e2)) %>%
st_sf() %>%
mutate(id_250 = 1:nrow(.)) # this will be "final" id
We save the hexagon file into a new RDS
saveRDS(grid_250, "data/geospatial/hexagon.rds")
= readRDS("data/geospatial/hexagon.rds")
grid_250 ttm()
tm_shape(grid_250) +
tmap_options(check.and.fix = TRUE) +
tm_polygons("id_250", alpha = 0.1) +
tm_view(set.zoom.limits = c(10,15))