Social area analysis (SAA), which is a generic name for a number of methods employing census and other data to classify small areas into similar socioeconomic groups, is an approach which quantifies data in a useful fashion and has important applications in regional development, urban planning, medical and health services research. The potentialities of the approach for Liveable City planning and Smart City preparedness, however, have yet to be explored.
In this take-home exercise, you are tasked to segment Singapore at the planning subzone level into homogeneous socioeconomic areas by combining geodemographic data extracted from Singapore Department of Statistics and urban functions extracted from the geospatial data provided. From the Singapore Residents by Planning Area Subzone, Age Group, Sex and Type of Dwelling, June 2011-2019 provide by Singapore Department of Statistics, you are required the extract the following indicators for 2019: Economy active population (i.e. age 25-64), Young group (i.e. age 0-24), Aged group (i.e 65 and above), Population density, HDB1-2RM dwellers, HDB3-4RM dwellers, HDB5RM-Ec dweller, Condominium and apartment dwellers and Landed property dwellers.
From the geospatial data provided, you are required to extract the following urban functions:
packages = c('rgdal', 'spdep', 'ClustGeo', 'tmap', 'sf', 'ggpubr', 'cluster', 'heatmaply', 'corrplot', 'psych', 'tidyverse', 'dplyr', 'factoextra')
for (p in packages){
if(!require(p, character.only = T)){
install.packages(p)
}
library(p,character.only = T)
}
residential <- read_csv ("data/aspatial/respopagesextod2011to2019.csv")
Extract according to the following indicators:
resident_2019<-residential %>%
filter (Time==2019) %>%
mutate(SZ = toupper(SZ)) %>%
group_by(SZ, TOD) %>%
spread(AG, Pop) %>%
mutate(`YOUNG` = sum(`0_to_4` + `5_to_9` + `10_to_14` + `15_to_19` + `20_to_24`)) %>%
mutate(`ECONOMY ACTIVE` = sum(`25_to_29` + `30_to_34` + `35_to_39` + `40_to_44` + `45_to_49` + `50_to_54` + `55_to_59` + `60_to_64`)) %>%
mutate(`AGED`= sum(`65_to_69` + `70_to_74` + `75_to_79` + `80_to_84` + `85_to_89` + `90_and_over`)) %>%
filter(Sex=="Males") %>%
group_by(SZ,TOD) %>%
mutate(`dwellers_by_room_and_sz` = sum(`YOUNG`, `AGED`, `ECONOMY ACTIVE`)) %>%
group_by(SZ, PA) %>%
mutate(`Subzone_pop` = sum(`dwellers_by_room_and_sz`)) %>%
select (`PA`,`SZ`, `TOD`,`YOUNG`,`ECONOMY ACTIVE`,`AGED`,`dwellers_by_room_and_sz`,`Subzone_pop`)
resident_2019<-resident_2019 %>%
spread(TOD, `dwellers_by_room_and_sz`) %>%
select(`PA`,`SZ`,`YOUNG`,`ECONOMY ACTIVE`, `AGED`,`HDB 1- and 2-Room Flats`, `HDB 3-Room Flats`, `HDB 4-Room Flats`, `HDB 5-Room and Executive Flats`, `Condominiums and Other Apartments`, `Landed Properties`, `Subzone_pop`)
First step: Check for NA values
colSums(is.na(resident_2019))
## PA SZ
## 0 0
## YOUNG ECONOMY ACTIVE
## 0 0
## AGED HDB 1- and 2-Room Flats
## 0 980
## HDB 3-Room Flats HDB 4-Room Flats
## 980 980
## HDB 5-Room and Executive Flats Condominiums and Other Apartments
## 980 980
## Landed Properties Subzone_pop
## 980 0
Second step: Replace NA values with value “0”.
resident_2019[is.na(resident_2019)] <- 0
Third step: Check for NA values again to ensure the NA values are replaced already.
colSums(is.na(resident_2019))
## PA SZ
## 0 0
## YOUNG ECONOMY ACTIVE
## 0 0
## AGED HDB 1- and 2-Room Flats
## 0 0
## HDB 3-Room Flats HDB 4-Room Flats
## 0 0
## HDB 5-Room and Executive Flats Condominiums and Other Apartments
## 0 0
## Landed Properties Subzone_pop
## 0 0
Fourth Step: To derive at the total count for HDB 3 and 4 room flats, it is necessary to sum them up.
resident_2019 <- resident_2019 %>%
group_by(SZ,PA) %>%
mutate(`HDB 3- and 4-Room Flats` = `HDB 3-Room Flats` + `HDB 4-Room Flats`) %>%
select(`PA`, `SZ`, `YOUNG`, `ECONOMY ACTIVE`, `AGED`, `HDB 1- and 2-Room Flats`, `HDB 3- and 4-Room Flats`, `HDB 5-Room and Executive Flats`, `Condominiums and Other Apartments`, `Landed Properties`, `Subzone_pop`)
mpsz <- st_read(dsn = "data/geospatial", layer="MP14_SUBZONE_WEB_PL")
## Reading layer `MP14_SUBZONE_WEB_PL' from data source `/Users/danstongoh/Desktop/SMU/Term 3A/Geospatial/Take Home Exercises/IS415_Take-Home_Ex03/data/geospatial' using driver `ESRI Shapefile'
## Simple feature collection with 323 features and 15 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: 2667.538 ymin: 15748.72 xmax: 56396.44 ymax: 50256.33
## proj4string: +proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +datum=WGS84 +units=m +no_defs
Combine both the mpsz data and residential data together.
residential_mpsz_total <- left_join(resident_2019, mpsz, by=c("SZ" = "SUBZONE_N"))
## Warning: Column `SZ`/`SUBZONE_N` joining character vector and factor, coercing
## into character vector
Determining the population density based on each subzone:
residential_mpsz <- residential_mpsz_total %>%
select(`PA`,`SZ`,`YOUNG`,`ECONOMY ACTIVE`,`AGED`,`HDB 1- and 2-Room Flats`, `HDB 3- and 4-Room Flats`, `HDB 5-Room and Executive Flats`, `Condominiums and Other Apartments`, `Landed Properties`, `Subzone_pop` ,`SHAPE_Area`) %>%
mutate(`Pop_density`=`Subzone_pop`/`SHAPE_Area`)
Calculating the total count for each variable without geometry:
residential_mpsz <- residential_mpsz %>%
group_by(SZ) %>%
summarise (`YOUNG` = sum(`YOUNG`), `ECONOMY ACTIVE` = sum(`ECONOMY ACTIVE`), `AGED` = sum(`AGED`), `HDB 1- and 2-Room Flats` = sum(`HDB 1- and 2-Room Flats`),`HDB 3- and 4-Room Flats` = sum(`HDB 3- and 4-Room Flats`),`HDB 5-Room and Executive Flats` = sum(`HDB 5-Room and Executive Flats`), `Condominiums and Other Apartments` = sum(`Condominiums and Other Apartments`),`Landed Properties` = sum(`Landed Properties`), `Pop_density` = unique(`Pop_density`), `Subzone_pop` = unique(`Subzone_pop`))
Removing the subzones with population = 0, such as areas like Yio Chu Kang North:
residential_mpsz <- filter(residential_mpsz, `Subzone_pop`> 0)
Creating one with geometry data:
geo_residential_mpsz <- residential_mpsz_total %>%
select(`PA`,`SZ`,`YOUNG`,`ECONOMY ACTIVE`,`AGED`,`HDB 1- and 2-Room Flats`, `HDB 3- and 4-Room Flats`, `HDB 5-Room and Executive Flats`, `Condominiums and Other Apartments`, `Landed Properties`, `Subzone_pop` ,`SHAPE_Area`, `geometry`) %>%
mutate(`Pop_density`=`Subzone_pop`/`SHAPE_Area`)
Creating the sum for the one with geometry data:
sum_geo_residential_mpsz <- geo_residential_mpsz %>%
group_by(SZ, PA) %>%
summarise (`YOUNG` = sum(`YOUNG`), `ECONOMY ACTIVE` = sum(`ECONOMY ACTIVE`), `AGED` = sum(`AGED`), `HDB 1- and 2-Room Flats` = sum(`HDB 1- and 2-Room Flats`),`HDB 3- and 4-Room Flats` = sum(`HDB 3- and 4-Room Flats`),`HDB 5-Room and Executive Flats` = sum(`HDB 5-Room and Executive Flats`), `Condominiums and Other Apartments` = sum(`Condominiums and Other Apartments`),`Landed Properties` = sum(`Landed Properties`), `Subzone_pop` = unique(`Subzone_pop`), `Pop_density` = unique(`Pop_density`), `SHAPE_Area` = unique(`SHAPE_Area`), `geometry` = unique(`geometry`))
sum_geo_residential_mpsz <- filter(sum_geo_residential_mpsz, `Subzone_pop`> 0)
Import the 5 geospatial datasets required:
govtembassy <- st_read(dsn="data/geospatial",layer="Govt_Embassy")
## Reading layer `Govt_Embassy' from data source `/Users/danstongoh/Desktop/SMU/Term 3A/Geospatial/Take Home Exercises/IS415_Take-Home_Ex03/data/geospatial' using driver `ESRI Shapefile'
## Simple feature collection with 443 features and 5 fields
## geometry type: POINT
## dimension: XY
## bbox: xmin: 103.6282 ymin: 1.24911 xmax: 103.9884 ymax: 1.45765
## CRS: 4326
business <- st_read(dsn="data/geospatial",layer="Business")
## Reading layer `Business' from data source `/Users/danstongoh/Desktop/SMU/Term 3A/Geospatial/Take Home Exercises/IS415_Take-Home_Ex03/data/geospatial' using driver `ESRI Shapefile'
## Simple feature collection with 6550 features and 5 fields
## geometry type: POINT
## dimension: XY
## bbox: xmin: 103.6147 ymin: 1.24605 xmax: 104.0044 ymax: 1.4698
## CRS: 4326
shopping <- st_read(dsn="data/geospatial",layer="Shopping")
## Reading layer `Shopping' from data source `/Users/danstongoh/Desktop/SMU/Term 3A/Geospatial/Take Home Exercises/IS415_Take-Home_Ex03/data/geospatial' using driver `ESRI Shapefile'
## Simple feature collection with 511 features and 5 fields
## geometry type: POINT
## dimension: XY
## bbox: xmin: 103.679 ymin: 1.24779 xmax: 103.9644 ymax: 1.4535
## CRS: 4326
financial <- st_read(dsn="data/geospatial",layer="Financial")
## Reading layer `Financial' from data source `/Users/danstongoh/Desktop/SMU/Term 3A/Geospatial/Take Home Exercises/IS415_Take-Home_Ex03/data/geospatial' using driver `ESRI Shapefile'
## Simple feature collection with 3320 features and 29 fields
## geometry type: POINT
## dimension: XY
## bbox: xmin: 103.6256 ymin: 1.24392 xmax: 103.9998 ymax: 1.46247
## CRS: 4326
upmarket_residential_area <- st_read(dsn="data/geospatial",layer="Private residential")
## Reading layer `Private residential' from data source `/Users/danstongoh/Desktop/SMU/Term 3A/Geospatial/Take Home Exercises/IS415_Take-Home_Ex03/data/geospatial' using driver `ESRI Shapefile'
## Simple feature collection with 3604 features and 5 fields
## geometry type: POINT
## dimension: XY
## bbox: xmin: 103.6295 ymin: 1.23943 xmax: 103.9749 ymax: 1.45379
## CRS: 4326
Extracting the industry data from business data:
industry <- business %>%
filter(FAC_TYPE == 9991)
business <- business %>%
filter(FAC_TYPE == 5000)
Before joining the industry urban functions with mpsz, check the CRS of mpsz first:
st_crs(mpsz)
## Coordinate Reference System:
## No user input
## wkt:
## PROJCS["SVY21",
## GEOGCS["SVY21[WGS84]",
## DATUM["WGS_1984",
## SPHEROID["WGS_84",6378137.0,298.257223563]],
## PRIMEM["Greenwich",0.0],
## UNIT["Degree",0.0174532925199433]],
## PROJECTION["Transverse_Mercator"],
## PARAMETER["False_Easting",28001.642],
## PARAMETER["False_Northing",38744.572],
## PARAMETER["Central_Meridian",103.8333333333333],
## PARAMETER["Scale_Factor",1.0],
## PARAMETER["Latitude_Of_Origin",1.366666666666667],
## UNIT["Meter",1.0]]
Since the crs of mpsz is in SVY21, it is necessary to transform it to EPSG 4326 for data join:
mpsz_4326 <- st_transform(mpsz, 4326)
After transforming, check again to see if it is successfully transformed:
st_crs(mpsz_4326)
## Coordinate Reference System:
## User input: EPSG:4326
## wkt:
## GEOGCS["WGS 84",
## DATUM["WGS_1984",
## SPHEROID["WGS 84",6378137,298.257223563,
## AUTHORITY["EPSG","7030"]],
## AUTHORITY["EPSG","6326"]],
## PRIMEM["Greenwich",0,
## AUTHORITY["EPSG","8901"]],
## UNIT["degree",0.0174532925199433,
## AUTHORITY["EPSG","9122"]],
## AUTHORITY["EPSG","4326"]]
Filter the unique POI_ID from each urban function to ensure data accuracy since there may be duplicates:
govtembassy <- govtembassy %>%
filter(SEQ_NUM==1) %>%
count(POI_ID)
business <- business %>%
filter(SEQ_NUM==1) %>%
count(POI_ID)
shopping <- shopping %>%
filter(SEQ_NUM==1) %>%
count(POI_ID)
financial <- financial %>%
filter(SEQ_NUM==1) %>%
count(POI_ID)
upmarket_residential_area <- upmarket_residential_area %>%
filter(SEQ_NUM==1) %>%
count(POI_ID)
industry <- industry %>%
filter(SEQ_NUM==1) %>%
count(POI_ID)
Combine the urban functions to the mpsz data:
mpsz_govt <- st_join(mpsz_4326, govtembassy)
mpsz_business <- st_join(mpsz_4326, business)
mpsz_industry <- st_join(mpsz_4326, industry)
mpsz_shopping <- st_join(mpsz_4326, shopping)
mpsz_financial <- st_join(mpsz_4326, financial)
mpsz_URA <- st_join(mpsz_4326, upmarket_residential_area)
Determining the number of each urban development type by subzone level by getting the sum of the number of each urban development in a subzone:
govt_count <- mpsz_govt %>%
group_by(SUBZONE_N) %>%
summarise(total_govt = sum(!is.na(n)))
govt_count <- filter(govt_count, total_govt>0)
business_count <- mpsz_business %>%
group_by(SUBZONE_N) %>%
summarise(total_business = sum(!is.na(n)))
business_count <- filter(business_count, total_business>0)
industry_count <- mpsz_industry %>%
group_by(SUBZONE_N) %>%
summarise(total_industry = sum(!is.na(n)))
industry_count <- filter(industry_count, total_industry>0)
shopping_count <- mpsz_shopping %>%
group_by(SUBZONE_N) %>%
summarise(total_shopping = sum(!is.na(n)))
shopping_count <- filter(shopping_count, total_shopping>0)
financial_count <- mpsz_financial %>%
group_by(SUBZONE_N) %>%
summarise(total_financial = sum(!is.na(n)))
financial_count <- filter(financial_count, total_financial>0)
URA_count <- mpsz_URA %>%
group_by(SUBZONE_N) %>%
summarise(total_URA = sum(!is.na(n)))
URA_count <- filter(URA_count, total_URA>0)
economy_active <- ggplot(data=residential_mpsz,
aes(x= `ECONOMY ACTIVE`)) +
geom_histogram(bins=20,
color="black",
fill="light blue")
young <- ggplot(data=residential_mpsz,
aes(x= `YOUNG`)) +
geom_histogram(bins=20,
color="black",
fill="light blue")
aged <- ggplot(data=residential_mpsz,
aes(x= `AGED`)) +
geom_histogram(bins=20,
color="black",
fill="light blue")
hdb1_2 <- ggplot(data=residential_mpsz,
aes(x= `HDB 1- and 2-Room Flats`)) +
geom_histogram(bins=20,
color="black",
fill="light blue")
hdb3_4 <- ggplot(data=residential_mpsz,
aes(x= `HDB 3- and 4-Room Flats`)) +
geom_histogram(bins=20,
color="black",
fill="light blue")
hdb5 <- ggplot(data=residential_mpsz,
aes(x= `HDB 5-Room and Executive Flats`)) +
geom_histogram(bins=20,
color="black",
fill="light blue")
condo <- ggplot(data=residential_mpsz,
aes(x= `Condominiums and Other Apartments`)) +
geom_histogram(bins=20,
color="black",
fill="light blue")
landed <- ggplot(data=residential_mpsz,
aes(x= `Landed Properties`)) +
geom_histogram(bins=20,
color="black",
fill="light blue")
Grouping these histograms together visually:
ggarrange(economy_active, young, aged, hdb1_2, hdb3_4, hdb5, condo, landed,
ncol = 3,
nrow = 2)
## $`1`
##
## $`2`
##
## attr(,"class")
## [1] "list" "ggarrange"
Analysis: In the figure above, multiple histograms are plottted to reveal the distribution of the selected variables in the residential_mpsz data frame. As observed, the distribution of the graphs are mostly right skewed. Thus, standardization will be necessary. However, the z-score method should not be used as the requirement of this method is that the initial distribution should be normally distributed first.
Initial:
cluster_vars.cor = cor(residential_mpsz[,c(3:10)])
corrplot.mixed(cluster_vars.cor,
lower = "ellipse",
upper = "number",
tl.pos = "lt",
diag = "l",
tl.col = "black")
Given the correlation plot above, it shows that:
Analysis: These variables are highly correlated (>0.80) as seen from the correlation score indicated above. Therefore, it is necessary to remove some of the variables for a more accurate depiction. As “YOUNG” and “ECONOMY ACTIVE” both have 4 occurrences each, one will be eliminated instead, which in this case will be “YOUNG”. As for “HDB 3- and 4- Room Flats”, the occurrence is equally high as “AGED”. However, it will be more accurate to remove “HDB 3- and 4- Room Flats” since it causes more variables to have higher correlation.
Eliminating the highly correlated variables:
cluster_vars.cor = cor(residential_mpsz[,c(5,6, 8:10)])
corrplot.mixed(cluster_vars.cor,
lower = "ellipse",
upper = "number",
tl.pos = "lt",
diag = "l",
tl.col = "black")
Given the correlation plot above, it shows that:
Analysis: The highly correlated variables are eliminated, making the correlation score for the variables shown to be less than 0.80, which is a benchmark to indicate that the variables are highly correlated. Thus, we will extract the clustering variables for further analysis later.
cluster_vars <- residential_mpsz %>%
select("SZ", "AGED", "Pop_density", "HDB 1- and 2-Room Flats","HDB 5-Room and Executive Flats","Condominiums and Other Apartments","Landed Properties")
head(cluster_vars,10)
## # A tibble: 10 x 7
## SZ AGED Pop_density `HDB 1- and 2-R… `HDB 5-Room and… `Condominiums a…
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 ADMI… 1360 0.0112 1140 6220 0
## 2 ALEX… 3310 0.0134 3910 3120 0
## 3 ALEX… 120 0.00722 0 0 2120
## 4 ALJU… 7510 0.0136 2120 6400 11930
## 5 ANAK… 3850 0.00804 160 3170 9020
## 6 ANCH… 3620 0.0311 1680 22650 5000
## 7 ANG … 740 0.0154 0 1830 1930
## 8 BALE… 6090 0.0170 1790 4660 9610
## 9 BANG… 3550 0.0296 0 5370 2290
## 10 BAYS… 930 0.00289 0 0 6800
## # … with 1 more variable: `Landed Properties` <dbl>
Notice that the final clustering variables list does not include variables ‘YOUNG’, ‘ECONOMY ACTIVE’ and ‘HDB 3- and 4- Room Flats’ because they are highly correlated with other variables.
Next, we will have to change the rows by subzone names instead.
row.names(cluster_vars) <- cluster_vars$"SZ"
head(cluster_vars,10)
## # A tibble: 10 x 7
## SZ AGED Pop_density `HDB 1- and 2-R… `HDB 5-Room and… `Condominiums a…
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 ADMI… 1360 0.0112 1140 6220 0
## 2 ALEX… 3310 0.0134 3910 3120 0
## 3 ALEX… 120 0.00722 0 0 2120
## 4 ALJU… 7510 0.0136 2120 6400 11930
## 5 ANAK… 3850 0.00804 160 3170 9020
## 6 ANCH… 3620 0.0311 1680 22650 5000
## 7 ANG … 740 0.0154 0 1830 1930
## 8 BALE… 6090 0.0170 1790 4660 9610
## 9 BANG… 3550 0.0296 0 5370 2290
## 10 BAYS… 930 0.00289 0 0 6800
## # … with 1 more variable: `Landed Properties` <dbl>
Removal of SZ column from the table above:
resident_2019_ict <- select(cluster_vars, c(2:7))
head(resident_2019_ict,10)
## # A tibble: 10 x 6
## AGED Pop_density `HDB 1- and 2-R… `HDB 5-Room and… `Condominiums a…
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 1360 0.0112 1140 6220 0
## 2 3310 0.0134 3910 3120 0
## 3 120 0.00722 0 0 2120
## 4 7510 0.0136 2120 6400 11930
## 5 3850 0.00804 160 3170 9020
## 6 3620 0.0311 1680 22650 5000
## 7 740 0.0154 0 1830 1930
## 8 6090 0.0170 1790 4660 9610
## 9 3550 0.0296 0 5370 2290
## 10 930 0.00289 0 0 6800
## # … with 1 more variable: `Landed Properties` <dbl>
Min-Max Standardisation
resident_2019_ict.std <- normalize(resident_2019_ict)
summary(resident_2019_ict.std)
## AGED Pop_density HDB 1- and 2-Room Flats
## Min. :0.00000 Min. :0.0000 Min. :0.0000
## 1st Qu.:0.02505 1st Qu.:0.0881 1st Qu.:0.0000
## Median :0.10101 Median :0.2603 Median :0.0000
## Mean :0.13217 Mean :0.3217 Mean :0.1592
## 3rd Qu.:0.18810 3rd Qu.:0.5299 3rd Qu.:0.2745
## Max. :1.00000 Max. :1.0000 Max. :1.0000
## HDB 5-Room and Executive Flats Condominiums and Other Apartments
## Min. :0.00000 Min. :0.000000
## 1st Qu.:0.00000 1st Qu.:0.003131
## Median :0.03857 Median :0.076625
## Mean :0.09490 Mean :0.150378
## 3rd Qu.:0.11864 3rd Qu.:0.240161
## Max. :1.00000 Max. :1.000000
## Landed Properties
## Min. :0.00000
## 1st Qu.:0.00000
## Median :0.00000
## Mean :0.05676
## 3rd Qu.:0.04716
## Max. :1.00000
residential_proxmat <- dist(resident_2019_ict.std, method = 'euclidean')
m <- c( "average", "single", "complete", "ward")
names(m) <- c( "average", "single", "complete", "ward")
ac <- function(x) {
agnes(resident_2019_ict, method = x)$ac
}
map_dbl(m, ac)
## average single complete ward
## 0.9442788 0.8870851 0.9686369 0.9863490
hclust_ward <- hclust(residential_proxmat, method = 'ward.D')
Determining the optimal cluster
fviz_nbclust(resident_2019_ict.std, FUN=hcut, method="silhouette")
As seen from the graph above, the optimal number of clusters has been computer as k=5. This allows us to determine the figure k=5 for subsequent analysis, which means that we will analyse accordingly to 5 clusters for the choropleth map.
Interpreting the dendrograms
plot(hclust_ward, cex = 0.6)
rect.hclust(hclust_ward, k = 5, border = 2:6)
Transfrom the data frame in to a matrix to illustrate through the heatmap:
resident_2019_ict_mat <- data.matrix(resident_2019_ict)
Plotting interactive cluster heatmap using heatmaply():
heatmaply(resident_2019_ict_mat,
Colv=NA,
dist_method = "euclidean",
hclust_method = "ward.D",
seriate = "OLO",
colors = Blues,
k_row = 5,
margins = c(NA,200,60,NA),
fontsize_row = 4,
fontsize_col = 5,
main="Geographic Segmentation of Subzones by indicators",
xlab = "Indicators",
ylab = "Planning Subzones"
)
Plotting the cluster maps:
groups <- as.factor(cutree(hclust_ward, k=5))
Conversion to SF object:
sum_geo_residential_mpsz_sf <- st_as_sf(sum_geo_residential_mpsz)
Check for Projection:
st_crs (sum_geo_residential_mpsz_sf)
## Coordinate Reference System: NA
Set Projection:
sum_geo_residential_mpsz_sf <- st_set_crs(sum_geo_residential_mpsz_sf, 3414)
Next, check for the projection:
st_crs(sum_geo_residential_mpsz_sf)
## Coordinate Reference System:
## User input: EPSG:3414
## wkt:
## PROJCS["SVY21 / Singapore TM",
## GEOGCS["SVY21",
## DATUM["SVY21",
## SPHEROID["WGS 84",6378137,298.257223563,
## AUTHORITY["EPSG","7030"]],
## AUTHORITY["EPSG","6757"]],
## PRIMEM["Greenwich",0,
## AUTHORITY["EPSG","8901"]],
## UNIT["degree",0.0174532925199433,
## AUTHORITY["EPSG","9122"]],
## AUTHORITY["EPSG","4757"]],
## PROJECTION["Transverse_Mercator"],
## PARAMETER["latitude_of_origin",1.366666666666667],
## PARAMETER["central_meridian",103.8333333333333],
## PARAMETER["scale_factor",1],
## PARAMETER["false_easting",28001.642],
## PARAMETER["false_northing",38744.572],
## UNIT["metre",1,
## AUTHORITY["EPSG","9001"]],
## AUTHORITY["EPSG","3414"]]
resident_2019_sf_cluster <- cbind(sum_geo_residential_mpsz_sf, as.matrix(groups)) %>%
rename(`CLUSTER`=`as.matrix.groups.`)
qtm(resident_2019_sf_cluster, "CLUSTER")
resident_sp <- as_Spatial(sum_geo_residential_mpsz_sf)
resident.nb <- poly2nb(resident_sp)
summary(resident.nb)
## Neighbour list object:
## Number of regions: 234
## Number of nonzero links: 1198
## Percentage nonzero weights: 2.187888
## Average number of links: 5.119658
## Link number distribution:
##
## 1 2 3 4 5 6 7 8 9
## 4 10 25 36 69 41 33 11 5
## 4 least connected regions:
## 34 105 134 174 with 1 link
## 5 most connected regions:
## 16 21 36 103 117 with 9 links
plot(resident_sp, border=grey(.5))
plot(resident.nb, coordinates(resident_sp), col="blue", add=TRUE)
lcosts <- nbcosts(resident.nb, resident_2019_ict)
resident.w <- nb2listw(resident.nb, lcosts, style="B")
summary(resident.w)
## Characteristics of weights list object:
## Neighbour list object:
## Number of regions: 234
## Number of nonzero links: 1198
## Percentage nonzero weights: 2.187888
## Average number of links: 5.119658
## Link number distribution:
##
## 1 2 3 4 5 6 7 8 9
## 4 10 25 36 69 41 33 11 5
## 4 least connected regions:
## 34 105 134 174 with 1 link
## 5 most connected regions:
## 16 21 36 103 117 with 9 links
##
## Weights style: B
## Weights constants summary:
## n nn S0 S1 S2
## B 234 54756 9043408 262731206400 2.560782e+12
resident.mst <- mstree(resident.w)
class(resident.mst)
## [1] "mst" "matrix"
plot(resident_sp, border=gray(.5))
plot.mst(resident.mst, coordinates(resident_sp),
col="blue", cex.lab=0.7, cex.circles=0.005, add=TRUE)
clust5 <- skater(resident.mst[,1:2], resident_2019_ict, 4)
str(clust5)
## List of 8
## $ groups : num [1:234] 1 3 3 1 3 2 1 3 4 1 ...
## $ edges.groups:List of 5
## ..$ :List of 3
## .. ..$ node: num [1:86] 143 1 145 166 67 168 228 112 97 180 ...
## .. ..$ edge: num [1:85, 1:3] 1 166 67 168 228 97 98 128 180 165 ...
## .. ..$ ssw : num 678039
## ..$ :List of 3
## .. ..$ node: num [1:4] 6 171 154 159
## .. ..$ edge: num [1:3, 1:3] 6 154 171 171 159 ...
## .. ..$ ssw : num 14097
## ..$ :List of 3
## .. ..$ node: num [1:109] 185 181 68 75 194 137 39 200 57 156 ...
## .. ..$ edge: num [1:108, 1:3] 158 210 193 50 21 76 5 90 54 21 ...
## .. ..$ ssw : num 336728
## ..$ :List of 3
## .. ..$ node: num [1:33] 27 69 78 23 28 19 172 198 234 95 ...
## .. ..$ edge: num [1:32, 1:3] 19 234 150 95 69 198 216 41 172 19 ...
## .. ..$ ssw : num 219752
## ..$ :List of 3
## .. ..$ node: num [1:2] 144 190
## .. ..$ edge: num [1, 1:3] 144 190 21956
## .. ..$ ssw : num 21956
## $ not.prune : NULL
## $ candidates : int [1:5] 1 2 3 4 5
## $ ssto : num 1623978
## $ ssw : num [1:5] 1623978 1514554 1428910 1329531 1270571
## $ crit : num [1:2] 1 Inf
## $ vec.crit : num [1:234] 1 1 1 1 1 1 1 1 1 1 ...
## - attr(*, "class")= chr "skater"
ccs5 <- clust5$groups
ccs5
## [1] 1 3 3 1 3 2 1 3 4 1 1 1 1 3 3 1 3 3 4 3 3 3 4 3 4 4 4 4 3 3 3 3 3 1 1 3 1
## [38] 3 3 4 4 1 3 3 3 3 3 3 1 3 3 3 3 3 3 3 3 3 4 3 3 1 1 3 1 3 1 3 4 3 4 3 3 3
## [75] 3 3 4 4 1 1 1 3 4 1 4 4 1 3 3 3 3 1 1 1 4 1 1 1 3 1 4 3 3 3 4 3 3 1 1 1 1
## [112] 1 3 1 3 1 3 1 3 1 1 3 1 3 3 3 3 1 3 3 3 1 3 1 1 1 3 3 3 3 3 3 1 5 1 1 3 3
## [149] 3 4 3 3 3 2 1 3 3 3 2 3 4 3 1 1 1 1 1 1 1 1 2 4 3 3 1 1 1 1 1 1 3 3 1 3 3
## [186] 3 1 1 4 5 1 1 3 3 3 1 4 4 3 3 3 3 3 3 3 4 1 1 1 3 3 1 1 3 1 4 3 4 1 1 1 1
## [223] 3 1 4 1 1 1 1 1 1 4 4 4
table(ccs5)
## ccs5
## 1 2 3 4 5
## 86 4 109 33 2
plot(resident_sp, border=gray(.5))
plot(clust5, coordinates(resident_sp), cex.lab=.7,
groups.colors=c("red","green","blue", "brown", "pink"), cex.circles=0.005, add=TRUE)
groups_mat <- as.matrix(clust5$groups)
resident_2019_sf_spatialcluster <- cbind(resident_2019_sf_cluster, as.factor(groups_mat)) %>%
rename(`SP_CLUSTER`=`as.factor.groups_mat.`)
qtm(resident_2019_sf_spatialcluster, "SP_CLUSTER")
In order to join both the industry_count and the resident_2019_sf_spatialcluster together, it is necessary to ensure that they have the same CRS. Thus, we have to convert the CRS of resident_2019_sf_spatialcluster.
resident_2019_sf_spatialcluster <- st_transform(resident_2019_sf_spatialcluster, 4326)
industry_residents <- st_join(resident_2019_sf_spatialcluster, industry_count, left = TRUE)
SP_Cluster 1:
industry_cluster1 <- industry_residents %>%
filter(SP_CLUSTER == 1)
summary(industry_cluster1)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:170 Length:170 Min. : 0 Min. : 10
## Class :character Class :character 1st Qu.: 2030 1st Qu.: 4630
## Mode :character Mode :character Median : 5910 Median :14540
## Mean : 6181 Mean :14409
## 3rd Qu.: 8380 3rd Qu.:20910
## Max. :31690 Max. :59340
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 20 Min. : 0 Min. : 0
## 1st Qu.: 1180 1st Qu.: 0 1st Qu.: 0
## Median : 3175 Median : 110 Median :11360
## Mean : 3754 Mean :1029 Mean :12106
## 3rd Qu.: 5720 3rd Qu.:1688 3rd Qu.:17380
## Max. :16050 Max. :4700 Max. :56850
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 0 1st Qu.: 0
## Median : 3210 Median : 1850
## Mean : 5391 Mean : 3517
## 3rd Qu.: 8680 3rd Qu.: 6108
## Max. :41850 Max. :14960
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0 Min. : 190 Min. :6.639e-05 Min. : 143138
## 1st Qu.: 0 1st Qu.: 8040 1st Qu.:5.281e-03 1st Qu.:1262089
## Median : 490 Median :24945 Median :1.340e-02 Median :1878092
## Mean : 2053 Mean :24344 Mean :1.366e-02 Mean :2197114
## 3rd Qu.: 3185 3rd Qu.:35520 3rd Qu.:2.154e-02 3rd Qu.:2809788
## Max. :18820 Max. :98620 Max. :3.944e-02 Max. :8453312
##
## CLUSTER SP_CLUSTER SUBZONE_N total_industry geometry
## 1:43 1:170 GEYLANG EAST: 9 Min. :1.000 MULTIPOLYGON :170
## 2: 8 2: 0 CHONG BOON : 8 1st Qu.:1.000 epsg:4326 : 0
## 3:52 3: 0 KAMPONG UBI : 8 Median :1.000 +proj=long...: 0
## 4:36 4: 0 KEMBANGAN : 7 Mean :1.914
## 5:31 5: 0 ALJUNIED : 6 3rd Qu.:2.000
## (Other) :113 Max. :5.000
## NA's : 19 NA's :19
SP_Cluster 2:
industry_cluster2 <- industry_residents %>%
filter(SP_CLUSTER == 2)
summary(industry_cluster2)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:4 Length:4 Min. :15250 Min. :27740
## Class :character Class :character 1st Qu.:15768 1st Qu.:28235
## Mode :character Mode :character Median :16870 Median :32185
## Mean :16838 Mean :32382
## 3rd Qu.:17940 3rd Qu.:36332
## Max. :18360 Max. :37420
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. :3620 Min. : 450 Min. :13810
## 1st Qu.:4265 1st Qu.: 855 1st Qu.:16412
## Median :5180 Median :1330 Median :19635
## Mean :5102 Mean :1198 Mean :19468
## 3rd Qu.:6018 3rd Qu.:1672 3rd Qu.:22690
## Max. :6430 Max. :1680 Max. :24790
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :22650 Min. :3710
## 1st Qu.:26820 1st Qu.:4678
## Median :28295 Median :5205
## Mean :27865 Mean :5550
## 3rd Qu.:29340 3rd Qu.:6078
## Max. :32220 Max. :8080
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. : 0 Min. :46610 Min. :0.03109 Min. :1378710 1:0
## 1st Qu.: 0 1st Qu.:48268 1st Qu.:0.03433 1st Qu.:1436308 2:0
## Median :125 Median :54510 Median :0.03689 Median :1477308 3:0
## Mean :125 Mean :54322 Mean :0.03681 Mean :1475590 4:4
## 3rd Qu.:250 3rd Qu.:60565 3rd Qu.:0.03937 3rd Qu.:1516590 5:0
## Max. :250 Max. :61660 Max. :0.04236 Max. :1569035
##
## SP_CLUSTER SUBZONE_N total_industry geometry
## 1:0 PASIR RIS WAFER FAB PARK:2 Min. :3 MULTIPOLYGON :4
## 2:4 ADMIRALTY :0 1st Qu.:3 epsg:4326 :0
## 3:0 AIRPORT ROAD :0 Median :3 +proj=long...:0
## 4:0 ALEXANDRA HILL :0 Mean :3
## 5:0 ALEXANDRA NORTH :0 3rd Qu.:3
## (Other) :0 Max. :3
## NA's :2 NA's :2
SP_Cluster 3:
industry_cluster3 <- industry_residents %>%
filter(SP_CLUSTER == 3)
summary(industry_cluster3)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:129 Length:129 Min. : 0 Min. : 40
## Class :character Class :character 1st Qu.: 310 1st Qu.: 830
## Mode :character Mode :character Median :1510 Median : 3450
## Mean :1709 Mean : 4275
## 3rd Qu.:2420 3rd Qu.: 6750
## Max. :7930 Max. :21950
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 0 Min. : 0.0 Min. : 0
## 1st Qu.: 260 1st Qu.: 0.0 1st Qu.: 0
## Median :1020 Median : 0.0 Median : 610
## Mean :1472 Mean : 629.8 Mean : 3475
## 3rd Qu.:2550 3rd Qu.:1010.0 3rd Qu.: 7180
## Max. :7210 Max. :4520.0 Max. :23090
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 0 1st Qu.: 30
## Median : 0 Median : 690
## Mean :1048 Mean : 1645
## 3rd Qu.:2030 3rd Qu.: 2260
## Max. :7810 Max. :16770
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 50 Min. :6.580e-06 Min. : 49626
## 1st Qu.: 0.0 1st Qu.: 1450 1st Qu.:2.975e-03 1st Qu.: 368483
## Median : 0.0 Median : 6420 Median :8.037e-03 Median : 595429
## Mean : 574.5 Mean : 7456 Mean :1.128e-02 Mean : 943009
## 3rd Qu.: 550.0 3rd Qu.:11720 3rd Qu.:1.827e-02 3rd Qu.:1053494
## Max. :7600.0 Max. :37090 Max. :4.399e-02 Max. :7601894
##
## CLUSTER SP_CLUSTER SUBZONE_N total_industry geometry
## 1:43 1: 0 ALEXANDRA HILL: 8 Min. :1.000 MULTIPOLYGON :129
## 2: 7 2: 0 BUKIT MERAH : 8 1st Qu.:1.000 epsg:4326 : 0
## 3:66 3:129 ONE NORTH : 8 Median :2.000 +proj=long...: 0
## 4: 2 4: 0 HOLLAND DRIVE : 7 Mean :1.985
## 5:11 5: 0 CITY TERMINALS: 6 3rd Qu.:2.500
## (Other) :30 Max. :5.000
## NA's :62 NA's :62
SP_Cluster 4:
industry_cluster4 <- industry_residents %>%
filter(SP_CLUSTER == 4)
summary(industry_cluster4)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:40 Length:40 Min. : 20 Min. : 40
## Class :character Class :character 1st Qu.: 3218 1st Qu.: 7950
## Mode :character Mode :character Median : 5005 Median :11690
## Mean : 6169 Mean :13368
## 3rd Qu.: 8482 3rd Qu.:17830
## Max. :19400 Max. :41080
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 10 Min. : 0.0 Min. : 0
## 1st Qu.:1460 1st Qu.: 0.0 1st Qu.: 5862
## Median :2325 Median : 0.0 Median :10540
## Mean :2656 Mean : 561.5 Mean :11215
## 3rd Qu.:3650 3rd Qu.: 880.0 3rd Qu.:15722
## Max. :8740 Max. :3700.0 Max. :35950
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 3515 1st Qu.: 0
## Median : 6300 Median : 985
## Mean : 8207 Mean :1786
## 3rd Qu.:11390 3rd Qu.:2748
## Max. :38700 Max. :8670
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 70 Min. :0.000004 Min. : 380202
## 1st Qu.: 0.0 1st Qu.:13028 1st Qu.:0.007734 1st Qu.: 772903
## Median : 0.0 Median :19955 Median :0.025999 Median : 1043336
## Mean : 295.2 Mean :22193 Mean :0.021867 Mean : 8467049
## 3rd Qu.: 0.0 3rd Qu.:30160 3rd Qu.:0.032726 3rd Qu.: 1848651
## Max. :3590.0 Max. :68200 Max. :0.046058 Max. :69748299
##
## CLUSTER SP_CLUSTER SUBZONE_N total_industry
## 1:20 1: 0 GALI BATU : 6 Min. :1.000
## 2: 1 2: 0 BUKIT BATOK SOUTH : 5 1st Qu.:1.000
## 3:13 3: 0 INTERNATIONAL BUSINESS PARK: 4 Median :1.000
## 4: 5 4:40 KIAN TECK : 3 Mean :1.731
## 5: 1 5: 0 PANG SUA : 2 3rd Qu.:2.000
## (Other) : 6 Max. :4.000
## NA's :14 NA's :14
## geometry
## MULTIPOLYGON :40
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 5:
industry_cluster5 <- industry_residents %>%
filter(SP_CLUSTER == 5)
summary(industry_cluster5)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:7 Length:7 Min. :15720 Min. :33080
## Class :character Class :character 1st Qu.:24990 1st Qu.:56430
## Mode :character Mode :character Median :34260 Median :79780
## Mean :28963 Mean :66437
## 3rd Qu.:34260 3rd Qu.:79780
## Max. :34260 Max. :79780
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 6480 Min. : 830 Min. :22180
## 1st Qu.:12670 1st Qu.:2565 1st Qu.:48590
## Median :18860 Median :4300 Median :75000
## Mean :15323 Mean :3309 Mean :59909
## 3rd Qu.:18860 3rd Qu.:4300 3rd Qu.:75000
## Max. :18860 Max. :4300 Max. :75000
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :30500 Min. :1770
## 1st Qu.:39230 1st Qu.:3495
## Median :47960 Median :5220
## Mean :42971 Mean :4234
## 3rd Qu.:47960 3rd Qu.:5220
## Max. :47960 Max. :5220
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. :0 Min. : 55280 Min. :0.03062 Min. :1639669 1:0
## 1st Qu.:0 1st Qu.: 94090 1st Qu.:0.03062 1st Qu.:2989747 2:0
## Median :0 Median :132900 Median :0.03062 Median :4339824 3:0
## Mean :0 Mean :110723 Mean :0.03151 Mean :3568351 4:7
## 3rd Qu.:0 3rd Qu.:132900 3rd Qu.:0.03217 3rd Qu.:4339824 5:0
## Max. :0 Max. :132900 Max. :0.03371 Max. :4339824
##
## SP_CLUSTER SUBZONE_N total_industry geometry
## 1:0 FLORA DRIVE :2 Min. :1.000 MULTIPOLYGON :7
## 2:0 CHANGI WEST :1 1st Qu.:1.000 epsg:4326 :0
## 3:0 LOYANG WEST :1 Median :1.000 +proj=long...:0
## 4:0 SIMEI :1 Mean :1.571
## 5:7 TAMPINES WEST:1 3rd Qu.:1.500
## XILIN :1 Max. :4.000
## (Other) :0
tmap_mode("view")
Plotting the tmap for the total industry count on the SP clusters derived earlier.
tm_shape(industry_residents) +
tm_fill(col = "SP_CLUSTER") +
tm_borders(lwd=1,lty="solid") +
tm_bubbles(size = "total_industry", col= "total_industry", alpha=0.9, border.lwd = 0, border.alpha = 0, palette="Reds", id="SUBZONE_N")
Analysis of the map above:
As seen from the plotted map, we can tell that which clusters have more industry counts:
Highest Industry Count to Lowest Industry Count
Key Highlights:
Highest: Cluster 1
Based on the industry count, Cluster 1 has the highest number of industries found, which stretches from the East of Singapore to the North side of Singapore. We can tell that there are more industries in the East side than the North, given that there is a stronger tone of red as depicted on the plot. Despite Cluster 1 having about 30% higher in space area than what Cluster 2 has, Cluster 2 has a population density (mean) of almost 3 times of that of Cluster 1, which makes Cluster 1 less dense in population, thus, making it more possible to hold more industries in the subzones included.
Lowest: Cluster 2
As for Cluster 2, it is located in the North-East area of Singapore at the Sengkang Area. It has a higher population density as compared to cluster 1, having a high amount of subzone population over a smaller area space. Given that the residents count is pretty high as compared to cluster 1, there is little space left for industries to be built, as the spaces are used to build residential buildings, making the industry count much lesser than Cluster 1.
tmap_mode("plot")
business_residents <- st_join(resident_2019_sf_spatialcluster, business_count, left = TRUE)
SP_Cluster 1:
business_cluster1 <- business_residents %>%
filter(SP_CLUSTER == 1)
summary(business_cluster1)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:411 Length:411 Min. : 0 Min. : 10
## Class :character Class :character 1st Qu.: 2410 1st Qu.: 5245
## Mode :character Mode :character Median : 6130 Median :14530
## Mean : 6350 Mean :14587
## 3rd Qu.: 8350 3rd Qu.:20600
## Max. :31690 Max. :59340
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 20 Min. : 0 Min. : 0
## 1st Qu.: 1310 1st Qu.: 0 1st Qu.: 370
## Median : 3230 Median : 250 Median :11330
## Mean : 3707 Mean : 963 Mean :11863
## 3rd Qu.: 5720 3rd Qu.:1525 3rd Qu.:16520
## Max. :16050 Max. :4700 Max. :56850
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 0 1st Qu.: 0
## Median : 3870 Median : 3050
## Mean : 5557 Mean : 3675
## 3rd Qu.: 8900 3rd Qu.: 6140
## Max. :41850 Max. :14960
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0 Min. : 190 Min. :6.639e-05 Min. : 143138
## 1st Qu.: 0 1st Qu.: 8955 1st Qu.:6.448e-03 1st Qu.:1086103
## Median : 460 Median :24950 Median :1.358e-02 Median :1713623
## Mean : 2348 Mean :24645 Mean :1.508e-02 Mean :2041761
## 3rd Qu.: 3820 3rd Qu.:34240 3rd Qu.:2.296e-02 3rd Qu.:2553464
## Max. :18820 Max. :98620 Max. :3.944e-02 Max. :8453312
##
## CLUSTER SP_CLUSTER SUBZONE_N total_business
## 1:131 1:411 BEDOK NORTH : 9 Min. : 1.00
## 2: 12 2: 0 FRANKEL : 9 1st Qu.: 2.00
## 3: 94 3: 0 GEYLANG EAST : 9 Median : 6.00
## 4: 84 4: 0 SERANGOON GARDEN : 9 Mean : 28.71
## 5: 90 5: 0 ANG MO KIO TOWN CENTRE: 8 3rd Qu.: 28.00
## CHONG BOON : 8 Max. :224.00
## (Other) :359
## geometry
## MULTIPOLYGON :411
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 2:
business_cluster2 <- business_residents %>%
filter(SP_CLUSTER == 2)
summary(business_cluster2)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:14 Length:14 Min. :15250 Min. :27740
## Class :character Class :character 1st Qu.:15940 1st Qu.:28400
## Mode :character Mode :character Median :17800 Median :35970
## Mean :17024 Mean :32942
## 3rd Qu.:17800 3rd Qu.:35970
## Max. :18360 Max. :37420
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. :3620 Min. : 450 Min. :13810
## 1st Qu.:4480 1st Qu.: 990 1st Qu.:14678
## Median :5880 Median :1330 Median :21990
## Mean :5354 Mean :1216 Mean :19580
## 3rd Qu.:6430 3rd Qu.:1670 3rd Qu.:21990
## Max. :6430 Max. :1680 Max. :24790
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :22650 Min. :3710
## 1st Qu.:28210 1st Qu.:5000
## Median :28295 Median :5410
## Mean :28324 Mean :5941
## 3rd Qu.:28380 3rd Qu.:8080
## Max. :32220 Max. :8080
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. : 0.0 Min. :46610 Min. :0.03109 Min. :1378710 1: 0
## 1st Qu.: 0.0 1st Qu.:48820 1st Qu.:0.03541 1st Qu.:1397910 2: 0
## Median :250.0 Median :60200 Median :0.03837 Median :1477308 3: 0
## Mean :142.9 Mean :55320 Mean :0.03734 Mean :1480340 4:14
## 3rd Qu.:250.0 3rd Qu.:60200 3rd Qu.:0.03837 3rd Qu.:1569035 5: 0
## Max. :250.0 Max. :61660 Max. :0.04236 Max. :1569035
##
## SP_CLUSTER SUBZONE_N total_business geometry
## 1: 0 COMPASSVALE :3 Min. : 1.000 MULTIPOLYGON :14
## 2:14 PUNGGOL FIELD :3 1st Qu.: 1.000 epsg:4326 : 0
## 3: 0 RIVERVALE :3 Median : 1.000 +proj=long...: 0
## 4: 0 PASIR RIS WAFER FAB PARK:2 Mean : 3.214
## 5: 0 FERNVALE :1 3rd Qu.: 5.000
## KANGKAR :1 Max. :10.000
## (Other) :1
SP_Cluster 3:
business_cluster3 <- business_residents %>%
filter(SP_CLUSTER == 3)
summary(business_cluster3)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:616 Length:616 Min. : 0 Min. : 40
## Class :character Class :character 1st Qu.: 250 1st Qu.: 730
## Mode :character Mode :character Median :1270 Median : 3070
## Mean :1607 Mean : 4032
## 3rd Qu.:2330 3rd Qu.: 6240
## Max. :7930 Max. :21950
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 0 Min. : 0.0 Min. : 0
## 1st Qu.: 210 1st Qu.: 0.0 1st Qu.: 0
## Median : 870 Median : 0.0 Median : 170
## Mean :1368 Mean : 631.2 Mean : 3094
## 3rd Qu.:2300 3rd Qu.: 660.0 3rd Qu.: 5790
## Max. :7210 Max. :4520.0 Max. :23090
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0.0 Min. : 0
## 1st Qu.: 0.0 1st Qu.: 140
## Median : 0.0 Median : 690
## Mean : 933.8 Mean : 1668
## 3rd Qu.:1580.0 3rd Qu.: 2310
## Max. :7810.0 Max. :16770
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 50 Min. :6.580e-06 Min. : 49626
## 1st Qu.: 0.0 1st Qu.: 1200 1st Qu.:2.672e-03 1st Qu.: 329438
## Median : 0.0 Median : 5480 Median :7.413e-03 Median : 587223
## Mean : 590.9 Mean : 7006 Mean :1.023e-02 Mean : 933765
## 3rd Qu.: 550.0 3rd Qu.:10760 3rd Qu.:1.530e-02 3rd Qu.:1074241
## Max. :7600.0 Max. :37090 Max. :4.399e-02 Max. :7601894
##
## CLUSTER SP_CLUSTER SUBZONE_N total_business geometry
## 1:170 1: 0 BOULEVARD : 10 Min. : 1.00 MULTIPOLYGON :616
## 2: 42 2: 0 CHATSWORTH : 10 1st Qu.: 2.00 epsg:4326 : 0
## 3:344 3:616 LEEDON PARK : 10 Median : 5.00 +proj=long...: 0
## 4: 13 4: 0 MARGARET DRIVE: 10 Mean : 12.03
## 5: 47 5: 0 LEONIE HILL : 9 3rd Qu.: 13.00
## NASSIM : 9 Max. :191.00
## (Other) :558
SP_Cluster 4:
business_cluster4 <- business_residents %>%
filter(SP_CLUSTER == 4)
summary(business_cluster4)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:115 Length:115 Min. : 20 Min. : 40
## Class :character Class :character 1st Qu.: 2760 1st Qu.: 7920
## Mode :character Mode :character Median : 5320 Median :11980
## Mean : 6229 Mean :13566
## 3rd Qu.: 8610 3rd Qu.:18260
## Max. :19400 Max. :41080
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 10 Min. : 0.0 Min. : 0
## 1st Qu.:1460 1st Qu.: 0.0 1st Qu.: 5570
## Median :2490 Median : 0.0 Median :11150
## Mean :2842 Mean : 611.7 Mean :11852
## 3rd Qu.:3710 3rd Qu.: 950.0 3rd Qu.:16065
## Max. :8740 Max. :3700.0 Max. :35950
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 2570 1st Qu.: 0
## Median : 6130 Median : 790
## Mean : 7920 Mean :1807
## 3rd Qu.:11720 3rd Qu.:2630
## Max. :38700 Max. :8670
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 70 Min. :0.000004 Min. : 380202
## 1st Qu.: 0.0 1st Qu.:12870 1st Qu.:0.005910 1st Qu.: 788221
## Median : 0.0 Median :20450 Median :0.026926 Median : 1097299
## Mean : 338.7 Mean :22637 Mean :0.020911 Mean : 6563137
## 3rd Qu.: 0.0 3rd Qu.:30660 3rd Qu.:0.032313 3rd Qu.: 2206305
## Max. :3590.0 Max. :68200 Max. :0.046058 Max. :69748299
##
## CLUSTER SP_CLUSTER SUBZONE_N total_business
## 1:50 1: 0 WESTERN WATER CATCHMENT: 8 Min. : 1.00
## 2: 4 2: 0 JELEBU : 7 1st Qu.: 2.00
## 3:42 3: 0 LAKESIDE : 7 Median : 8.00
## 4:17 4:115 CHOA CHU KANG CENTRAL : 6 Mean : 33.22
## 5: 2 5: 0 GALI BATU : 6 3rd Qu.: 35.00
## GUILIN : 6 Max. :217.00
## (Other) :75
## geometry
## MULTIPOLYGON :115
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 5:
business_cluster5 <- business_residents %>%
filter(SP_CLUSTER == 5)
summary(business_cluster5)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:9 Length:9 Min. :15720 Min. :33080
## Class :character Class :character 1st Qu.:15720 1st Qu.:33080
## Mode :character Mode :character Median :34260 Median :79780
## Mean :28080 Mean :64213
## 3rd Qu.:34260 3rd Qu.:79780
## Max. :34260 Max. :79780
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 6480 Min. : 830 Min. :22180
## 1st Qu.: 6480 1st Qu.: 830 1st Qu.:22180
## Median :18860 Median :4300 Median :75000
## Mean :14733 Mean :3143 Mean :57393
## 3rd Qu.:18860 3rd Qu.:4300 3rd Qu.:75000
## Max. :18860 Max. :4300 Max. :75000
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :30500 Min. :1770
## 1st Qu.:30500 1st Qu.:1770
## Median :47960 Median :5220
## Mean :42140 Mean :4070
## 3rd Qu.:47960 3rd Qu.:5220
## Max. :47960 Max. :5220
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. :0 Min. : 55280 Min. :0.03062 Min. :1639669 1:0
## 1st Qu.:0 1st Qu.: 55280 1st Qu.:0.03062 1st Qu.:1639669 2:0
## Median :0 Median :132900 Median :0.03062 Median :4339824 3:0
## Mean :0 Mean :107027 Mean :0.03165 Mean :3439772 4:9
## 3rd Qu.:0 3rd Qu.:132900 3rd Qu.:0.03371 3rd Qu.:4339824 5:0
## Max. :0 Max. :132900 Max. :0.03371 Max. :4339824
##
## SP_CLUSTER SUBZONE_N total_business geometry
## 1:0 TAMPINES EAST :2 Min. : 12.00 MULTIPOLYGON :9
## 2:0 TAMPINES NORTH:2 1st Qu.: 15.00 epsg:4326 :0
## 3:0 CHANGI WEST :1 Median : 18.00 +proj=long...:0
## 4:0 LOYANG WEST :1 Mean : 56.56
## 5:9 SIMEI :1 3rd Qu.: 69.00
## TAMPINES WEST :1 Max. :224.00
## (Other) :1
tmap_mode("view")
Plotting the tmap for the total business count on the SP clusters derived earlier.
tm_shape(business_residents) +
tm_fill(col = "SP_CLUSTER") +
tm_borders(lwd=1,lty="solid") +
tm_bubbles(size = "total_business", col= "total_business", alpha=0.9, border.lwd = 0, border.alpha = 0, palette="Reds", id="SUBZONE_N")
Analysis of the map above:
As seen from the plotted map, we can tell that which clusters have more business counts:
Highest Business Count to Lowest Business Count
Key Highlights:
Highest: Cluster 3
Cluster 3 has the highest in business counts as the subzones are less densely populated given that the mean (0.015) for the population density is 2 times lesser than that of Cluster 5 (0.03165), which has the lowest in business counts. Given that the subzones are less densly populated, more businesses can be set up in the neighbouring areas as the areas are not used up for residential purposes. Hence, this attributes to a higher count in business units set up in the subzones of Cluster 3.
Lowest: Cluster 5
With a higher mean in population density as compared to Cluster 3 above, it shows that the subzones in Cluster 5 are very populated with residents. This results in Cluster 5 having a higher mean in the HDB counts as compared to Cluster 3, which took up the space in the subzones for residential stay rather than business needs, thereby having lesser business count.
tmap_mode("plot")
govtembassy_residents <- st_join(resident_2019_sf_spatialcluster, govt_count, left = TRUE)
SP_Cluster 1:
govt_cluster1 <- govtembassy_residents %>%
filter(SP_CLUSTER == 1)
summary(govt_cluster1)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:282 Length:282 Min. : 0 Min. : 10
## Class :character Class :character 1st Qu.: 2620 1st Qu.: 5870
## Mode :character Mode :character Median : 6340 Median :15300
## Mean : 6479 Mean :15212
## 3rd Qu.: 8380 3rd Qu.:20600
## Max. :31690 Max. :59340
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 20 Min. : 0 Min. : 0.0
## 1st Qu.: 1448 1st Qu.: 0 1st Qu.: 827.5
## Median : 3480 Median : 250 Median :11805.0
## Mean : 4008 Mean : 987 Mean :12692.0
## 3rd Qu.: 5778 3rd Qu.:1610 3rd Qu.:17635.0
## Max. :16050 Max. :4700 Max. :56850.0
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 565 1st Qu.: 0
## Median : 3920 Median : 2920
## Mean : 5621 Mean : 3809
## 3rd Qu.: 8900 3rd Qu.: 6430
## Max. :41850 Max. :14960
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0 Min. : 190 Min. :6.639e-05 Min. : 143138
## 1st Qu.: 0 1st Qu.:10210 1st Qu.:7.187e-03 1st Qu.:1078622
## Median : 440 Median :25630 Median :1.445e-02 Median :1713623
## Mean : 2355 Mean :25699 Mean :1.577e-02 Mean :2039076
## 3rd Qu.: 3820 3rd Qu.:35520 3rd Qu.:2.336e-02 3rd Qu.:2553464
## Max. :18820 Max. :98620 Max. :3.944e-02 Max. :8453312
##
## CLUSTER SP_CLUSTER SUBZONE_N total_govt
## 1:90 1:282 BEDOK NORTH : 9 Min. :1.000
## 2: 8 2: 0 GEYLANG EAST : 9 1st Qu.:1.000
## 3:61 3: 0 SERANGOON GARDEN : 9 Median :1.000
## 4:57 4: 0 ANG MO KIO TOWN CENTRE: 8 Mean :1.647
## 5:66 5: 0 HOUGANG WEST : 8 3rd Qu.:2.000
## (Other) :235 Max. :5.000
## NA's : 4 NA's :4
## geometry
## MULTIPOLYGON :282
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 2:
govt_cluster2 <- govtembassy_residents %>%
filter(SP_CLUSTER == 2)
summary(govt_cluster2)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:4 Length:4 Min. :15250 Min. :27740
## Class :character Class :character 1st Qu.:15768 1st Qu.:28235
## Mode :character Mode :character Median :16870 Median :32185
## Mean :16838 Mean :32382
## 3rd Qu.:17940 3rd Qu.:36332
## Max. :18360 Max. :37420
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. :3620 Min. : 450 Min. :13810
## 1st Qu.:4265 1st Qu.: 855 1st Qu.:16412
## Median :5180 Median :1330 Median :19635
## Mean :5102 Mean :1198 Mean :19468
## 3rd Qu.:6018 3rd Qu.:1672 3rd Qu.:22690
## Max. :6430 Max. :1680 Max. :24790
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :22650 Min. :3710
## 1st Qu.:26820 1st Qu.:4678
## Median :28295 Median :5205
## Mean :27865 Mean :5550
## 3rd Qu.:29340 3rd Qu.:6078
## Max. :32220 Max. :8080
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. : 0 Min. :46610 Min. :0.03109 Min. :1378710 1:0
## 1st Qu.: 0 1st Qu.:48268 1st Qu.:0.03433 1st Qu.:1436308 2:0
## Median :125 Median :54510 Median :0.03689 Median :1477308 3:0
## Mean :125 Mean :54322 Mean :0.03681 Mean :1475590 4:4
## 3rd Qu.:250 3rd Qu.:60565 3rd Qu.:0.03937 3rd Qu.:1516590 5:0
## Max. :250 Max. :61660 Max. :0.04236 Max. :1569035
##
## SP_CLUSTER SUBZONE_N total_govt geometry
## 1:0 RIVERVALE :3 Min. :1.0 MULTIPOLYGON :4
## 2:4 FERNVALE :1 1st Qu.:2.5 epsg:4326 :0
## 3:0 ADMIRALTY :0 Median :3.0 +proj=long...:0
## 4:0 AIRPORT ROAD :0 Mean :2.5
## 5:0 ALEXANDRA HILL :0 3rd Qu.:3.0
## ALEXANDRA NORTH:0 Max. :3.0
## (Other) :0
SP_Cluster 3:
govt_cluster3 <- govtembassy_residents %>%
filter(SP_CLUSTER == 3)
summary(govt_cluster3)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:442 Length:442 Min. : 0 Min. : 40
## Class :character Class :character 1st Qu.: 200 1st Qu.: 590
## Mode :character Mode :character Median :1100 Median : 2750
## Mean :1587 Mean : 3923
## 3rd Qu.:2350 3rd Qu.: 6200
## Max. :7930 Max. :21950
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 0 Min. : 0.0 Min. : 0
## 1st Qu.: 120 1st Qu.: 0.0 1st Qu.: 0
## Median : 650 Median : 0.0 Median : 0
## Mean :1315 Mean : 567.6 Mean : 2921
## 3rd Qu.:2110 3rd Qu.: 537.5 3rd Qu.: 5330
## Max. :7210 Max. :4520.0 Max. :23090
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0.0 Min. : 0
## 1st Qu.: 0.0 1st Qu.: 190
## Median : 0.0 Median : 770
## Mean : 864.3 Mean : 1779
## 3rd Qu.:1540.0 3rd Qu.: 2810
## Max. :7810.0 Max. :16770
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 50.0 Min. :6.580e-06 Min. : 49626
## 1st Qu.: 0.0 1st Qu.: 957.5 1st Qu.:1.533e-03 1st Qu.: 350788
## Median : 0.0 Median : 4430.0 Median :6.324e-03 Median : 587223
## Mean : 609.5 Mean : 6825.5 Mean :9.328e-03 Mean : 968307
## 3rd Qu.: 585.0 3rd Qu.:10760.0 3rd Qu.:1.405e-02 3rd Qu.:1234400
## Max. :7600.0 Max. :37090.0 Max. :4.399e-02 Max. :7601894
##
## CLUSTER SP_CLUSTER SUBZONE_N total_govt geometry
## 1:110 1: 0 BOULEVARD : 10 Min. : 1.000 MULTIPOLYGON :442
## 2: 26 2: 0 CHATSWORTH : 10 1st Qu.: 1.000 epsg:4326 : 0
## 3:256 3:442 LEEDON PARK : 10 Median : 3.000 +proj=long...: 0
## 4: 9 4: 0 LEONIE HILL : 9 Mean : 4.122
## 5: 41 5: 0 NASSIM : 9 3rd Qu.: 5.000
## PEARL'S HILL: 9 Max. :17.000
## (Other) :385
SP_Cluster 4:
govt_cluster4 <- govtembassy_residents %>%
filter(SP_CLUSTER == 4)
summary(govt_cluster4)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:83 Length:83 Min. : 20 Min. : 40
## Class :character Class :character 1st Qu.: 2760 1st Qu.: 7920
## Mode :character Mode :character Median : 5320 Median :13640
## Mean : 6279 Mean :13734
## 3rd Qu.: 8610 3rd Qu.:19120
## Max. :19400 Max. :41080
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 10 Min. : 0.0 Min. : 0
## 1st Qu.:1460 1st Qu.: 0.0 1st Qu.: 5570
## Median :3030 Median : 0.0 Median :11150
## Mean :2890 Mean : 725.4 Mean :12071
## 3rd Qu.:3720 3rd Qu.:1355.0 3rd Qu.:18650
## Max. :8740 Max. :3700.0 Max. :35950
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 2570 1st Qu.: 0
## Median : 6130 Median :1180
## Mean : 7664 Mean :2045
## 3rd Qu.:11500 3rd Qu.:3545
## Max. :38700 Max. :8670
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 70 Min. :0.000004 Min. : 380202
## 1st Qu.: 0.0 1st Qu.:12870 1st Qu.:0.005910 1st Qu.: 800299
## Median : 0.0 Median :22590 Median :0.026926 Median : 1088638
## Mean : 301.9 Mean :22903 Mean :0.021143 Mean : 4200728
## 3rd Qu.: 0.0 3rd Qu.:31660 3rd Qu.:0.031612 3rd Qu.: 1806553
## Max. :3590.0 Max. :68200 Max. :0.046058 Max. :69748299
##
## CLUSTER SP_CLUSTER SUBZONE_N total_govt
## 1:36 1: 0 WESTERN WATER CATCHMENT: 8 Min. :1.000
## 2: 4 2: 0 GOMBAK : 7 1st Qu.:1.000
## 3:28 3: 0 LAKESIDE : 7 Median :1.000
## 4:13 4:83 BUKIT BATOK CENTRAL : 6 Mean :1.354
## 5: 2 5: 0 CHOA CHU KANG CENTRAL : 6 3rd Qu.:1.750
## (Other) :48 Max. :6.000
## NA's : 1 NA's :1
## geometry
## MULTIPOLYGON :83
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 5:
govt_cluster5 <- govtembassy_residents %>%
filter(SP_CLUSTER == 5)
summary(govt_cluster5)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:9 Length:9 Min. :15720 Min. :33080
## Class :character Class :character 1st Qu.:15720 1st Qu.:33080
## Mode :character Mode :character Median :34260 Median :79780
## Mean :28080 Mean :64213
## 3rd Qu.:34260 3rd Qu.:79780
## Max. :34260 Max. :79780
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 6480 Min. : 830 Min. :22180
## 1st Qu.: 6480 1st Qu.: 830 1st Qu.:22180
## Median :18860 Median :4300 Median :75000
## Mean :14733 Mean :3143 Mean :57393
## 3rd Qu.:18860 3rd Qu.:4300 3rd Qu.:75000
## Max. :18860 Max. :4300 Max. :75000
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :30500 Min. :1770
## 1st Qu.:30500 1st Qu.:1770
## Median :47960 Median :5220
## Mean :42140 Mean :4070
## 3rd Qu.:47960 3rd Qu.:5220
## Max. :47960 Max. :5220
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. :0 Min. : 55280 Min. :0.03062 Min. :1639669 1:0
## 1st Qu.:0 1st Qu.: 55280 1st Qu.:0.03062 1st Qu.:1639669 2:0
## Median :0 Median :132900 Median :0.03062 Median :4339824 3:0
## Mean :0 Mean :107027 Mean :0.03165 Mean :3439772 4:9
## 3rd Qu.:0 3rd Qu.:132900 3rd Qu.:0.03371 3rd Qu.:4339824 5:0
## Max. :0 Max. :132900 Max. :0.03371 Max. :4339824
##
## SP_CLUSTER SUBZONE_N total_govt geometry
## 1:0 PASIR RIS CENTRAL:2 Min. :1.000 MULTIPOLYGON :9
## 2:0 PASIR RIS DRIVE :2 1st Qu.:1.000 epsg:4326 :0
## 3:0 TAMPINES EAST :2 Median :1.000 +proj=long...:0
## 4:0 CHANGI WEST :1 Mean :1.778
## 5:9 SIMEI :1 3rd Qu.:2.000
## TAMPINES WEST :1 Max. :4.000
## (Other) :0
tmap_mode("view")
Plotting the tmap for the total government embassy count on the SP clusters derived earlier.
tm_shape(govtembassy_residents) +
tm_fill(col = "SP_CLUSTER") +
tm_borders(lwd=1,lty="solid") +
tm_bubbles(size = "total_govt", col= "total_govt", alpha=0.9, border.lwd = 0, border.alpha = 0, palette="Reds", id="SUBZONE_N")
Analysis of the map above:
As seen from the plotted map, we can tell that which clusters have more government embassy counts:
Highest Government Embassy Count to Lowest Government Embassy Count
Key Highlights:
Highest: Cluster 3
Cluster 3 has the highest in government embassy count as the location for the subzones is mainly central area of Singapore, which makes it convenient for Singaporeans to travel to the embassy. The subzones in cluster 3 also have lesser residential properties as compared to cluster 2, except for the landed properties. The population density of the Cluster 2 is also 4 times more than that of Cluster 3, making cluster 3 a lot less densly populated. This allows the area to become more commercialized rather than making it more of an area for residential spaces. Thus, this explains why Cluster 3 will be a spot for more government embassies to built at.
Lowest: Cluster 2
Cluster 2 is a rather densely populated area, with the mean subzone population of about 9 times of that of Cluster 3. This led to the assumption that more residential spaces will be build for the subzones in Cluster 2 to accommodate the higher number of residents staying, which made it less possible for government embassies to be built, thus having a lesser count in government embassies as compared to Cluster 3.
tmap_mode("plot")
financial_residents <- st_join(resident_2019_sf_spatialcluster, financial_count, left = TRUE)
SP_Cluster 1:
fin_cluster1 <- financial_residents %>%
filter(SP_CLUSTER == 1)
summary(fin_cluster1)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:511 Length:511 Min. : 0 Min. : 10
## Class :character Class :character 1st Qu.: 2490 1st Qu.: 5450
## Mode :character Mode :character Median : 6340 Median :15070
## Mean : 6655 Mean :15172
## 3rd Qu.: 8900 3rd Qu.:20730
## Max. :31690 Max. :59340
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 20 Min. : 0 Min. : 0
## 1st Qu.: 1420 1st Qu.: 0 1st Qu.: 925
## Median : 3320 Median : 360 Median :11720
## Mean : 3803 Mean :1010 Mean :12459
## 3rd Qu.: 5720 3rd Qu.:1610 3rd Qu.:17380
## Max. :16050 Max. :4700 Max. :56850
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 580 1st Qu.: 120
## Median : 3920 Median : 2920
## Mean : 5811 Mean : 3760
## 3rd Qu.: 9485 3rd Qu.: 6160
## Max. :41850 Max. :14960
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0 Min. : 190 Min. :6.639e-05 Min. : 143138
## 1st Qu.: 0 1st Qu.: 9390 1st Qu.:7.293e-03 1st Qu.:1078622
## Median : 460 Median :25170 Median :1.543e-02 Median :1583440
## Mean : 2353 Mean :25629 Mean :1.621e-02 Mean :1953678
## 3rd Qu.: 3555 3rd Qu.:35520 3rd Qu.:2.343e-02 3rd Qu.:2496945
## Max. :18820 Max. :98620 Max. :3.944e-02 Max. :8453312
##
## CLUSTER SP_CLUSTER SUBZONE_N total_financial
## 1:174 1:511 BEDOK NORTH : 9 Min. : 1.00
## 2: 15 2: 0 FRANKEL : 9 1st Qu.: 5.00
## 3:106 3: 0 GEYLANG EAST : 9 Median :11.00
## 4:105 4: 0 SERANGOON GARDEN : 9 Mean :14.87
## 5:111 5: 0 ANG MO KIO TOWN CENTRE: 8 3rd Qu.:18.00
## CHONG BOON : 8 Max. :79.00
## (Other) :459
## geometry
## MULTIPOLYGON :511
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 2:
fin_cluster2 <- financial_residents %>%
filter(SP_CLUSTER == 2)
summary(fin_cluster2)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:23 Length:23 Min. :15250 Min. :27740
## Class :character Class :character 1st Qu.:15940 1st Qu.:28400
## Mode :character Mode :character Median :17800 Median :35970
## Mean :16907 Mean :32584
## 3rd Qu.:18080 3rd Qu.:36695
## Max. :18360 Max. :37420
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. :3620 Min. : 450 Min. :13810
## 1st Qu.:4480 1st Qu.: 720 1st Qu.:15545
## Median :5880 Median : 990 Median :21990
## Mean :5167 Mean :1177 Mean :19563
## 3rd Qu.:6155 3rd Qu.:1670 3rd Qu.:23390
## Max. :6430 Max. :1680 Max. :24790
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :22650 Min. :3710
## 1st Qu.:28210 1st Qu.:4355
## Median :28380 Median :5410
## Mean :28092 Mean :5574
## 3rd Qu.:30300 3rd Qu.:6745
## Max. :32220 Max. :8080
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. : 0.0 Min. :46610 Min. :0.03109 Min. :1378710 1: 0
## 1st Qu.: 0.0 1st Qu.:48820 1st Qu.:0.03541 1st Qu.:1417109 2: 0
## Median :250.0 Median :60200 Median :0.03837 Median :1455508 3: 0
## Mean :130.4 Mean :54658 Mean :0.03706 Mean :1474568 4:23
## 3rd Qu.:250.0 3rd Qu.:60930 3rd Qu.:0.04037 3rd Qu.:1534072 5: 0
## Max. :250.0 Max. :61660 Max. :0.04236 Max. :1569035
##
## SP_CLUSTER SUBZONE_N total_financial geometry
## 1: 0 MATILDA :4 Min. : 1.000 MULTIPOLYGON :23
## 2:23 SENGKANG TOWN CENTRE:4 1st Qu.: 4.000 epsg:4326 : 0
## 3: 0 COMPASSVALE :3 Median : 8.000 +proj=long...: 0
## 4: 0 PUNGGOL FIELD :3 Mean : 9.783
## 5: 0 RIVERVALE :3 3rd Qu.:12.000
## ANCHORVALE :2 Max. :24.000
## (Other) :4
SP_Cluster 3:
fin_cluster3 <- financial_residents %>%
filter(SP_CLUSTER == 3)
summary(fin_cluster3)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:716 Length:716 Min. : 0 Min. : 40
## Class :character Class :character 1st Qu.: 300 1st Qu.: 770
## Mode :character Mode :character Median :1450 Median : 3450
## Mean :1768 Mean : 4383
## 3rd Qu.:2658 3rd Qu.: 6360
## Max. :7930 Max. :21950
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 0 Min. : 0.0 Min. : 0
## 1st Qu.: 260 1st Qu.: 0.0 1st Qu.: 0
## Median : 995 Median : 0.0 Median : 180
## Mean :1490 Mean : 640.5 Mean : 3436
## 3rd Qu.:2450 3rd Qu.:1010.0 3rd Qu.: 6080
## Max. :7210 Max. :4520.0 Max. :23090
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 0 1st Qu.: 110
## Median : 0 Median : 770
## Mean :1029 Mean : 1787
## 3rd Qu.:1970 3rd Qu.: 2520
## Max. :7810 Max. :16770
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 50 Min. :6.580e-06 Min. : 49626
## 1st Qu.: 0.0 1st Qu.: 1350 1st Qu.:2.975e-03 1st Qu.: 368483
## Median : 0.0 Median : 6420 Median :8.036e-03 Median : 639144
## Mean : 654.9 Mean : 7641 Mean :1.072e-02 Mean : 992140
## 3rd Qu.: 690.0 3rd Qu.:11140 3rd Qu.:1.700e-02 3rd Qu.:1229894
## Max. :7600.0 Max. :37090 Max. :4.399e-02 Max. :7601894
##
## CLUSTER SP_CLUSTER SUBZONE_N total_financial geometry
## 1:214 1: 0 BOULEVARD : 10 Min. : 1.00 MULTIPOLYGON :716
## 2: 45 2: 0 CHATSWORTH : 10 1st Qu.: 4.00 epsg:4326 : 0
## 3:375 3:716 LEEDON PARK : 10 Median : 8.00 +proj=long...: 0
## 4: 16 4: 0 MARGARET DRIVE: 10 Mean : 15.12
## 5: 66 5: 0 LEONIE HILL : 9 3rd Qu.: 18.25
## NASSIM : 9 Max. :132.00
## (Other) :658
SP_Cluster 4:
fin_cluster4 <- financial_residents %>%
filter(SP_CLUSTER == 4)
summary(fin_cluster4)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:200 Length:200 Min. : 20 Min. : 40
## Class :character Class :character 1st Qu.: 3572 1st Qu.: 8710
## Mode :character Mode :character Median : 6100 Median :13660
## Mean : 6627 Mean :14357
## 3rd Qu.: 8610 3rd Qu.:19120
## Max. :19400 Max. :41080
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 10 Min. : 0.0 Min. : 0
## 1st Qu.:1500 1st Qu.: 0.0 1st Qu.: 5960
## Median :2490 Median : 15.0 Median :11150
## Mean :2918 Mean : 691.6 Mean :12302
## 3rd Qu.:3720 3rd Qu.:1342.5 3rd Qu.:16220
## Max. :8740 Max. :3700.0 Max. :35950
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 3830 1st Qu.: 0
## Median : 6300 Median :1200
## Mean : 8408 Mean :1992
## 3rd Qu.:11720 3rd Qu.:3100
## Max. :38700 Max. :8670
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 70 Min. :0.000004 Min. : 380202
## 1st Qu.: 0.0 1st Qu.:14325 1st Qu.:0.008342 1st Qu.: 794260
## Median : 0.0 Median :22610 Median :0.026982 Median : 1085080
## Mean : 406.4 Mean :23902 Mean :0.022933 Mean : 4444446
## 3rd Qu.: 60.0 3rd Qu.:31660 3rd Qu.:0.032726 3rd Qu.: 1806553
## Max. :3590.0 Max. :68200 Max. :0.046058 Max. :69748299
##
## CLUSTER SP_CLUSTER SUBZONE_N total_financial
## 1:97 1: 0 WESTERN WATER CATCHMENT: 8 Min. : 1.000
## 2: 7 2: 0 BUKIT BATOK WEST : 7 1st Qu.: 4.000
## 3:59 3: 0 GOMBAK : 7 Median : 6.000
## 4:31 4:200 JELEBU : 7 Mean : 9.295
## 5: 6 5: 0 LAKESIDE : 7 3rd Qu.:14.000
## TECK WHYE : 7 Max. :55.000
## (Other) :157
## geometry
## MULTIPOLYGON :200
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 5:
fin_cluster5 <- financial_residents %>%
filter(SP_CLUSTER == 5)
summary(fin_cluster5)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:15 Length:15 Min. :15720 Min. :33080
## Class :character Class :character 1st Qu.:15720 1st Qu.:33080
## Mode :character Mode :character Median :34260 Median :79780
## Mean :25608 Mean :57987
## 3rd Qu.:34260 3rd Qu.:79780
## Max. :34260 Max. :79780
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 6480 Min. : 830 Min. :22180
## 1st Qu.: 6480 1st Qu.: 830 1st Qu.:22180
## Median :18860 Median :4300 Median :75000
## Mean :13083 Mean :2681 Mean :50351
## 3rd Qu.:18860 3rd Qu.:4300 3rd Qu.:75000
## Max. :18860 Max. :4300 Max. :75000
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :30500 Min. :1770
## 1st Qu.:30500 1st Qu.:1770
## Median :47960 Median :5220
## Mean :39812 Mean :3610
## 3rd Qu.:47960 3rd Qu.:5220
## Max. :47960 Max. :5220
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. :0 Min. : 55280 Min. :0.03062 Min. :1639669 1: 0
## 1st Qu.:0 1st Qu.: 55280 1st Qu.:0.03062 1st Qu.:1639669 2: 0
## Median :0 Median :132900 Median :0.03062 Median :4339824 3: 0
## Mean :0 Mean : 96677 Mean :0.03207 Mean :3079752 4:15
## 3rd Qu.:0 3rd Qu.:132900 3rd Qu.:0.03371 3rd Qu.:4339824 5: 0
## Max. :0 Max. :132900 Max. :0.03371 Max. :4339824
##
## SP_CLUSTER SUBZONE_N total_financial geometry
## 1: 0 FLORA DRIVE :2 Min. : 1.00 MULTIPOLYGON :15
## 2: 0 PASIR RIS CENTRAL:2 1st Qu.: 4.00 epsg:4326 : 0
## 3: 0 PASIR RIS DRIVE :2 Median :11.00 +proj=long...: 0
## 4: 0 TAMPINES EAST :2 Mean :18.73
## 5:15 TAMPINES NORTH :2 3rd Qu.:18.50
## LOYANG WEST :1 Max. :79.00
## (Other) :4
tmap_mode("view")
Plotting the tmap for the total financial count on the SP clusters derived earlier.
tm_shape(financial_residents) +
tm_fill(col = "SP_CLUSTER") +
tm_borders(lwd=1,lty="solid") +
tm_bubbles(size = "total_financial", col= "total_financial", alpha=0.9, border.lwd = 0, border.alpha = 0, palette="Reds", id="SUBZONE_N")
Analysis of the map above:
As seen from the plotted map, we can tell that which clusters have more financial counts:
Highest Financial Count to Lowest Financial Count
Key Highlights:
Highest: Cluster 3
As Cluster 3 has high in business and government embassy counts, this can be attributable to the high in financial needs around these areas as well, making the financial count for Cluster 3 the highest among all other clusters. The needs for ATM and other financial needs for businesses and government embassies can be more prevalent than that of other clusters where daily withdrawal for purchases is the main financial need. As Cluster 3 is very less densely populated, it has more subzones that are commercialized which made financial needs more essential in these areas, thus having more financial count.
Lowest: Cluster 5
For Cluster 5, it has lesser financial count because the subzones are densely populated and thus have more residential buildings to meet the population in the subzones. With more buildings built for stay, and lesser business flows happening, there is a lesser need for financial services or lesser urgent financial needs, thereby making the subzones have a lesser financial count as compared to Cluster 3, which is densely populated with businesses.
tmap_mode("plot")
shopping_residents <- st_join(resident_2019_sf_spatialcluster, shopping_count, left = TRUE)
SP_Cluster 1:
shopping_cluster1 <- shopping_residents %>%
filter(SP_CLUSTER == 1)
summary(shopping_cluster1)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:302 Length:302 Min. : 0 Min. : 10
## Class :character Class :character 1st Qu.: 2852 1st Qu.: 7480
## Mode :character Mode :character Median : 6590 Median :15470
## Mean : 7421 Mean :16616
## 3rd Qu.: 9680 3rd Qu.:21600
## Max. :31690 Max. :59340
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 20 Min. : 0 Min. : 0
## 1st Qu.: 1640 1st Qu.: 0 1st Qu.: 1700
## Median : 3400 Median : 495 Median :11890
## Mean : 4053 Mean :1088 Mean :13350
## 3rd Qu.: 5720 3rd Qu.:1700 3rd Qu.:17380
## Max. :16050 Max. :4700 Max. :56850
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 905 1st Qu.: 235
## Median : 4290 Median : 3995
## Mean : 6715 Mean : 4186
## 3rd Qu.:11250 3rd Qu.: 6950
## Max. :41850 Max. :14960
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0 Min. : 190 Min. :6.639e-05 Min. : 143138
## 1st Qu.: 0 1st Qu.:12110 1st Qu.:7.823e-03 1st Qu.:1082547
## Median : 440 Median :26930 Median :1.595e-02 Median :1616035
## Mean : 2520 Mean :28089 Mean :1.725e-02 Mean :1940477
## 3rd Qu.: 4038 3rd Qu.:36480 3rd Qu.:2.359e-02 3rd Qu.:2543107
## Max. :18820 Max. :98620 Max. :3.944e-02 Max. :8453312
##
## CLUSTER SP_CLUSTER SUBZONE_N total_shopping
## 1:97 1:302 BEDOK NORTH : 9 Min. : 1.000
## 2: 8 2: 0 FRANKEL : 9 1st Qu.: 1.000
## 3:48 3: 0 GEYLANG EAST : 9 Median : 2.000
## 4:71 4: 0 SERANGOON GARDEN : 9 Mean : 2.557
## 5:78 5: 0 ANG MO KIO TOWN CENTRE: 8 3rd Qu.: 3.000
## (Other) :252 Max. :10.000
## NA's : 6 NA's :6
## geometry
## MULTIPOLYGON :302
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 2:
shopping_cluster2 <- shopping_residents %>%
filter(SP_CLUSTER == 2)
summary(shopping_cluster2)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:13 Length:13 Min. :15250 Min. :27740
## Class :character Class :character 1st Qu.:15940 1st Qu.:28400
## Mode :character Mode :character Median :15940 Median :28400
## Mean :16822 Mean :32127
## 3rd Qu.:17800 3rd Qu.:35970
## Max. :18360 Max. :37420
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. :3620 Min. : 450 Min. :13810
## 1st Qu.:4480 1st Qu.: 990 1st Qu.:13810
## Median :4480 Median : 990 Median :17280
## Mean :5121 Mean :1128 Mean :18765
## 3rd Qu.:5880 3rd Qu.:1670 3rd Qu.:21990
## Max. :6430 Max. :1680 Max. :24790
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :22650 Min. :3710
## 1st Qu.:28210 1st Qu.:5000
## Median :28380 Median :5410
## Mean :28345 Mean :5571
## 3rd Qu.:28380 3rd Qu.:5410
## Max. :32220 Max. :8080
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. : 0.0 Min. :46610 Min. :0.03109 Min. :1378710 1: 0
## 1st Qu.: 0.0 1st Qu.:48820 1st Qu.:0.03541 1st Qu.:1378710 2: 0
## Median : 0.0 Median :48820 Median :0.03541 Median :1455508 3: 0
## Mean :115.4 Mean :54069 Mean :0.03703 Mean :1458877 4:13
## 3rd Qu.:250.0 3rd Qu.:60200 3rd Qu.:0.03837 3rd Qu.:1499109 5: 0
## Max. :250.0 Max. :61660 Max. :0.04236 Max. :1569035
##
## SP_CLUSTER SUBZONE_N total_shopping geometry
## 1: 0 SENGKANG TOWN CENTRE:4 Min. :1.000 MULTIPOLYGON :13
## 2:13 PUNGGOL FIELD :3 1st Qu.:1.000 epsg:4326 : 0
## 3: 0 RIVERVALE :3 Median :2.000 +proj=long...: 0
## 4: 0 FERNVALE :1 Mean :1.846
## 5: 0 PUNGGOL TOWN CENTRE :1 3rd Qu.:2.000
## WATERWAY EAST :1 Max. :3.000
## (Other) :0
SP_Cluster 3:
shopping_cluster3 <- shopping_residents %>%
filter(SP_CLUSTER == 3)
summary(shopping_cluster3)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:444 Length:444 Min. : 0 Min. : 40
## Class :character Class :character 1st Qu.: 200 1st Qu.: 690
## Mode :character Mode :character Median :1100 Median : 2795
## Mean :1619 Mean : 3970
## 3rd Qu.:2420 3rd Qu.: 6200
## Max. :7930 Max. :21950
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 0 Min. : 0.0 Min. : 0
## 1st Qu.: 170 1st Qu.: 0.0 1st Qu.: 0
## Median : 810 Median : 0.0 Median : 0
## Mean :1329 Mean : 579.1 Mean : 2917
## 3rd Qu.:2130 3rd Qu.: 530.0 3rd Qu.: 5180
## Max. :7210 Max. :4520.0 Max. :23090
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0.0 Min. : 0
## 1st Qu.: 0.0 1st Qu.: 190
## Median : 0.0 Median : 730
## Mean : 849.4 Mean : 1800
## 3rd Qu.:1360.0 3rd Qu.: 2810
## Max. :7810.0 Max. :16770
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 50 Min. :6.580e-06 Min. : 49626
## 1st Qu.: 0.0 1st Qu.: 1190 1st Qu.:2.149e-03 1st Qu.: 324707
## Median : 0.0 Median : 4825 Median :6.687e-03 Median : 639144
## Mean : 678.7 Mean : 6919 Mean :9.216e-03 Mean : 997216
## 3rd Qu.: 730.0 3rd Qu.:10760 3rd Qu.:1.337e-02 3rd Qu.:1231396
## Max. :7600.0 Max. :37090 Max. :4.399e-02 Max. :7601894
##
## CLUSTER SP_CLUSTER SUBZONE_N total_shopping geometry
## 1:104 1: 0 BOULEVARD : 10 Min. : 1.000 MULTIPOLYGON :444
## 2: 30 2: 0 CHATSWORTH : 10 1st Qu.: 1.000 epsg:4326 : 0
## 3:257 3:444 LEEDON PARK : 10 Median : 2.000 +proj=long...: 0
## 4: 9 4: 0 MARGARET DRIVE: 10 Mean : 4.296
## 5: 44 5: 0 NASSIM : 9 3rd Qu.: 6.000
## (Other) :394 Max. :27.000
## NA's : 1 NA's :1
SP_Cluster 4:
shopping_cluster4 <- shopping_residents %>%
filter(SP_CLUSTER == 4)
summary(shopping_cluster4)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:112 Length:112 Min. : 20 Min. : 40
## Class :character Class :character 1st Qu.: 3640 1st Qu.: 8960
## Mode :character Mode :character Median : 6420 Median :14650
## Mean : 6958 Mean :14771
## 3rd Qu.: 9570 3rd Qu.:19250
## Max. :19400 Max. :41080
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 10 Min. : 0.0 Min. : 0
## 1st Qu.:1500 1st Qu.: 0.0 1st Qu.: 6870
## Median :2490 Median : 0.0 Median :11150
## Mean :2848 Mean : 673.8 Mean :12089
## 3rd Qu.:3712 3rd Qu.:1342.5 3rd Qu.:15988
## Max. :8740 Max. :3700.0 Max. :35950
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 4602 1st Qu.: 0
## Median : 8100 Median :1200
## Mean : 9092 Mean :2134
## 3rd Qu.:12200 3rd Qu.:3990
## Max. :38700 Max. :8670
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 70 Min. :0.000004 Min. : 380202
## 1st Qu.: 0.0 1st Qu.:14740 1st Qu.:0.008342 1st Qu.: 862737
## Median : 0.0 Median :24720 Median :0.028496 Median : 1088638
## Mean : 475.4 Mean :24577 Mean :0.023643 Mean : 5664065
## 3rd Qu.: 680.0 3rd Qu.:32440 3rd Qu.:0.032726 3rd Qu.: 1806553
## Max. :3590.0 Max. :68200 Max. :0.046058 Max. :69748299
##
## CLUSTER SP_CLUSTER SUBZONE_N total_shopping
## 1:51 1: 0 WESTERN WATER CATCHMENT: 8 Min. :1.000
## 2: 4 2: 0 BUKIT BATOK WEST : 7 1st Qu.:1.000
## 3:31 3: 0 JELEBU : 7 Median :1.000
## 4:20 4:112 TECK WHYE : 7 Mean :1.616
## 5: 6 5: 0 BOON LAY PLACE : 6 3rd Qu.:2.000
## BUKIT BATOK CENTRAL : 6 Max. :5.000
## (Other) :71
## geometry
## MULTIPOLYGON :112
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 5:
shopping_cluster5 <- shopping_residents %>%
filter(SP_CLUSTER == 5)
summary(shopping_cluster5)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:12 Length:12 Min. :15720 Min. :33080
## Class :character Class :character 1st Qu.:15720 1st Qu.:33080
## Mode :character Mode :character Median :34260 Median :79780
## Mean :26535 Mean :60322
## 3rd Qu.:34260 3rd Qu.:79780
## Max. :34260 Max. :79780
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 6480 Min. : 830 Min. :22180
## 1st Qu.: 6480 1st Qu.: 830 1st Qu.:22180
## Median :18860 Median :4300 Median :75000
## Mean :13702 Mean :2854 Mean :52992
## 3rd Qu.:18860 3rd Qu.:4300 3rd Qu.:75000
## Max. :18860 Max. :4300 Max. :75000
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :30500 Min. :1770
## 1st Qu.:30500 1st Qu.:1770
## Median :47960 Median :5220
## Mean :40685 Mean :3782
## 3rd Qu.:47960 3rd Qu.:5220
## Max. :47960 Max. :5220
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. :0 Min. : 55280 Min. :0.03062 Min. :1639669 1: 0
## 1st Qu.:0 1st Qu.: 55280 1st Qu.:0.03062 1st Qu.:1639669 2: 0
## Median :0 Median :132900 Median :0.03062 Median :4339824 3: 0
## Mean :0 Mean :100558 Mean :0.03191 Mean :3214760 4:12
## 3rd Qu.:0 3rd Qu.:132900 3rd Qu.:0.03371 3rd Qu.:4339824 5: 0
## Max. :0 Max. :132900 Max. :0.03371 Max. :4339824
##
## SP_CLUSTER SUBZONE_N total_shopping geometry
## 1: 0 PASIR RIS CENTRAL:2 Min. : 1.000 MULTIPOLYGON :12
## 2: 0 PASIR RIS DRIVE :2 1st Qu.: 1.000 epsg:4326 : 0
## 3: 0 TAMPINES EAST :2 Median : 2.000 +proj=long...: 0
## 4: 0 TAMPINES NORTH :2 Mean : 3.583
## 5:12 PASIR RIS PARK :1 3rd Qu.: 4.500
## SIMEI :1 Max. :10.000
## (Other) :2
tmap_mode("view")
Plotting the tmap for the total shopping count on the SP clusters derived earlier.
tm_shape(shopping_residents) +
tm_fill(col = "SP_CLUSTER") +
tm_borders(lwd=1,lty="solid") +
tm_bubbles(size = "total_shopping", col= "total_shopping", alpha=0.9, border.lwd = 0, border.alpha = 0, palette="Reds", id="SUBZONE_N")
Analysis of the map above:
As seen from the plotted map, we can tell that which clusters have more shopping counts:
Highest Shopping Count to Lowest Shopping Count
Key Highlights:
Highest: Cluster 3
As explained in the previous indicators, Cluster 3 is less densely populated than Cluster 5, making it an area for commercialism to happen. This results in Cluster 3 having more financial, business and government embassy units. With the results above, it also shows that Cluster 3 has more shopping units as well due to the result of it being a more commercialized area. However, as seen from the above results, despite Cluster 3 having lesser HDB counts, the landed properties’ count is much higher than that of Cluster 5, which shows that the residents would probably have a higher purchasing power in general. This could be the driving factor for more shopping units to grow in Cluster 3 as businesses can thrive as the purchasing power of the residents in the subzones are higher.
Lowest: Cluster 5
For Cluster 5, there are more residents staying in HDB apartments than that of Cluster 3. Hence, purchasing power of these residents are lower than that of Cluster 3, making Cluster 5 less attractive for shopping units to be set up at. Moreover, commercialism can drive human traffic which can lead to greater sales, an area like Cluster 5 that is less commercialized will not be an ideal spot for shopping units to prosper, therefore it has a lesser shopping count as compared to Cluster 3.
tmap_mode("plot")
ura_residents <- st_join(resident_2019_sf_spatialcluster, URA_count, left = TRUE)
SP_Cluster 1:
ura_cluster1 <- ura_residents %>%
filter(SP_CLUSTER == 1)
summary(ura_cluster1)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:507 Length:507 Min. : 0 Min. : 10
## Class :character Class :character 1st Qu.: 2490 1st Qu.: 5450
## Mode :character Mode :character Median : 6130 Median :14550
## Mean : 6652 Mean :15145
## 3rd Qu.: 8850 3rd Qu.:20730
## Max. :31690 Max. :59340
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 20 Min. : 0 Min. : 0
## 1st Qu.: 1360 1st Qu.: 0 1st Qu.: 730
## Median : 3280 Median : 360 Median :11720
## Mean : 3756 Mean :1009 Mean :12538
## 3rd Qu.: 5680 3rd Qu.:1610 3rd Qu.:17380
## Max. :16050 Max. :4700 Max. :56850
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 550 1st Qu.: 175
## Median : 3920 Median : 3050
## Mean : 5741 Mean : 3798
## 3rd Qu.: 9105 3rd Qu.: 6160
## Max. :41850 Max. :14960
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0 Min. : 190 Min. :6.639e-05 Min. : 143138
## 1st Qu.: 0 1st Qu.: 9390 1st Qu.:7.293e-03 1st Qu.:1078622
## Median : 440 Median :24950 Median :1.543e-02 Median :1517767
## Mean : 2237 Mean :25553 Mean :1.632e-02 Mean :1932365
## 3rd Qu.: 3290 3rd Qu.:35520 3rd Qu.:2.343e-02 3rd Qu.:2434594
## Max. :18820 Max. :98620 Max. :3.944e-02 Max. :8453312
##
## CLUSTER SP_CLUSTER SUBZONE_N total_URA
## 1:173 1:507 BEDOK NORTH : 9 Min. : 1.00
## 2: 13 2: 0 FRANKEL : 9 1st Qu.: 5.00
## 3:105 3: 0 GEYLANG EAST : 9 Median : 10.00
## 4:108 4: 0 SERANGOON GARDEN : 9 Mean : 22.09
## 5:108 5: 0 ANG MO KIO TOWN CENTRE: 8 3rd Qu.: 21.50
## CHONG BOON : 8 Max. :215.00
## (Other) :455
## geometry
## MULTIPOLYGON :507
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 2:
ura_cluster2 <- ura_residents %>%
filter(SP_CLUSTER == 2)
summary(ura_cluster2)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:24 Length:24 Min. :15250 Min. :27740
## Class :character Class :character 1st Qu.:15940 1st Qu.:28400
## Mode :character Mode :character Median :17800 Median :35970
## Mean :16944 Mean :32725
## 3rd Qu.:17940 3rd Qu.:36332
## Max. :18360 Max. :37420
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. :3620 Min. : 450 Min. :13810
## 1st Qu.:4480 1st Qu.: 855 1st Qu.:16412
## Median :5880 Median :1330 Median :21990
## Mean :5220 Mean :1197 Mean :19664
## 3rd Qu.:6430 3rd Qu.:1670 3rd Qu.:22690
## Max. :6430 Max. :1680 Max. :24790
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :22650 Min. :3710
## 1st Qu.:28210 1st Qu.:4678
## Median :28295 Median :5410
## Mean :28097 Mean :5678
## 3rd Qu.:29340 3rd Qu.:8080
## Max. :32220 Max. :8080
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. : 0.0 Min. :46610 Min. :0.03109 Min. :1378710 1: 0
## 1st Qu.: 0.0 1st Qu.:48820 1st Qu.:0.03541 1st Qu.:1436308 2: 0
## Median :250.0 Median :60200 Median :0.03837 Median :1477308 3: 0
## Mean :135.4 Mean :54889 Mean :0.03711 Mean :1478504 4:24
## 3rd Qu.:250.0 3rd Qu.:60565 3rd Qu.:0.03937 3rd Qu.:1569035 5: 0
## Max. :250.0 Max. :61660 Max. :0.04236 Max. :1569035
##
## SP_CLUSTER SUBZONE_N total_URA geometry
## 1: 0 MATILDA :4 Min. : 5.00 MULTIPOLYGON :24
## 2:24 SENGKANG TOWN CENTRE:4 1st Qu.: 9.00 epsg:4326 : 0
## 3: 0 COMPASSVALE :3 Median :12.00 +proj=long...: 0
## 4: 0 PUNGGOL FIELD :3 Mean :12.29
## 5: 0 RIVERVALE :3 3rd Qu.:12.50
## ANCHORVALE :2 Max. :24.00
## (Other) :5
SP_Cluster 3:
ura_cluster3 <- ura_residents %>%
filter(SP_CLUSTER == 3)
summary(ura_cluster3)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:728 Length:728 Min. : 0 Min. : 40
## Class :character Class :character 1st Qu.: 300 1st Qu.: 770
## Mode :character Mode :character Median :1440 Median : 3420
## Mean :1744 Mean : 4313
## 3rd Qu.:2620 3rd Qu.: 6360
## Max. :7930 Max. :21950
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 0 Min. : 0.0 Min. : 0
## 1st Qu.: 220 1st Qu.: 0.0 1st Qu.: 0
## Median : 960 Median : 0.0 Median : 165
## Mean :1452 Mean : 619.9 Mean : 3330
## 3rd Qu.:2320 3rd Qu.: 790.0 3rd Qu.: 5990
## Max. :7210 Max. :4520.0 Max. :23090
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0.0 Min. : 0
## 1st Qu.: 0.0 1st Qu.: 150
## Median : 0.0 Median : 770
## Mean : 998.9 Mean : 1828
## 3rd Qu.:1900.0 3rd Qu.: 2520
## Max. :7810.0 Max. :16770
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 50 Min. :6.580e-06 Min. : 49626
## 1st Qu.: 0.0 1st Qu.: 1350 1st Qu.:2.899e-03 1st Qu.: 365333
## Median : 0.0 Median : 6420 Median :7.413e-03 Median : 631644
## Mean : 640.1 Mean : 7509 Mean :1.057e-02 Mean : 952340
## 3rd Qu.: 690.0 3rd Qu.:11140 3rd Qu.:1.690e-02 3rd Qu.:1228488
## Max. :7600.0 Max. :37090 Max. :4.399e-02 Max. :7601894
##
## CLUSTER SP_CLUSTER SUBZONE_N total_URA geometry
## 1:208 1: 0 BOULEVARD : 10 Min. : 1.00 MULTIPOLYGON :728
## 2: 46 2: 0 CHATSWORTH : 10 1st Qu.: 3.00 epsg:4326 : 0
## 3:388 3:728 LEEDON PARK : 10 Median : 7.00 +proj=long...: 0
## 4: 16 4: 0 MARGARET DRIVE: 10 Mean : 17.11
## 5: 70 5: 0 LEONIE HILL : 9 3rd Qu.: 21.00
## NASSIM : 9 Max. :140.00
## (Other) :670
SP_Cluster 4:
ura_cluster4 <- ura_residents %>%
filter(SP_CLUSTER == 4)
summary(ura_cluster4)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:180 Length:180 Min. : 20 Min. : 40
## Class :character Class :character 1st Qu.: 3370 1st Qu.: 7960
## Mode :character Mode :character Median : 5360 Median :13640
## Mean : 6259 Mean :13650
## 3rd Qu.: 8440 3rd Qu.:17830
## Max. :19400 Max. :41080
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 10 Min. : 0.0 Min. : 0
## 1st Qu.:1500 1st Qu.: 0.0 1st Qu.: 5960
## Median :2490 Median : 0.0 Median :11150
## Mean :2811 Mean : 651.6 Mean :11781
## 3rd Qu.:3710 3rd Qu.:1330.0 3rd Qu.:15910
## Max. :8740 Max. :3700.0 Max. :35950
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. : 0 Min. : 0
## 1st Qu.: 3830 1st Qu.: 0
## Median : 6300 Median :1200
## Mean : 7745 Mean :2044
## 3rd Qu.:10882 3rd Qu.:3100
## Max. :38700 Max. :8670
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area
## Min. : 0.0 Min. : 70 Min. :0.000004 Min. : 380202
## 1st Qu.: 0.0 1st Qu.:13080 1st Qu.:0.008342 1st Qu.: 800299
## Median : 0.0 Median :22590 Median :0.026954 Median : 1085080
## Mean : 395.9 Mean :22720 Mean :0.022401 Mean : 4404281
## 3rd Qu.: 240.0 3rd Qu.:30160 3rd Qu.:0.032726 3rd Qu.: 1806553
## Max. :3590.0 Max. :68200 Max. :0.046058 Max. :69748299
##
## CLUSTER SP_CLUSTER SUBZONE_N total_URA
## 1:90 1: 0 WESTERN WATER CATCHMENT: 8 Min. : 1.000
## 2: 5 2: 0 BUKIT BATOK WEST : 7 1st Qu.: 3.000
## 3:55 3: 0 GOMBAK : 7 Median : 4.000
## 4:24 4:180 JELEBU : 7 Mean : 5.344
## 5: 6 5: 0 LAKESIDE : 7 3rd Qu.: 6.000
## TECK WHYE : 7 Max. :49.000
## (Other) :137
## geometry
## MULTIPOLYGON :180
## epsg:4326 : 0
## +proj=long...: 0
##
##
##
##
SP_Cluster 5:
ura_cluster5 <- ura_residents %>%
filter(SP_CLUSTER == 5)
summary(ura_cluster5)
## SZ PA YOUNG ECONOMY.ACTIVE
## Length:14 Length:14 Min. :15720 Min. :33080
## Class :character Class :character 1st Qu.:15720 1st Qu.:33080
## Mode :character Mode :character Median :34260 Median :79780
## Mean :26314 Mean :59766
## 3rd Qu.:34260 3rd Qu.:79780
## Max. :34260 Max. :79780
##
## AGED HDB.1..and.2.Room.Flats HDB.3..and.4.Room.Flats
## Min. : 6480 Min. : 830 Min. :22180
## 1st Qu.: 6480 1st Qu.: 830 1st Qu.:22180
## Median :18860 Median :4300 Median :75000
## Mean :13554 Mean :2813 Mean :52363
## 3rd Qu.:18860 3rd Qu.:4300 3rd Qu.:75000
## Max. :18860 Max. :4300 Max. :75000
##
## HDB.5.Room.and.Executive.Flats Condominiums.and.Other.Apartments
## Min. :30500 Min. :1770
## 1st Qu.:30500 1st Qu.:1770
## Median :47960 Median :5220
## Mean :40477 Mean :3741
## 3rd Qu.:47960 3rd Qu.:5220
## Max. :47960 Max. :5220
##
## Landed.Properties Subzone_pop Pop_density SHAPE_Area CLUSTER
## Min. :0 Min. : 55280 Min. :0.03062 Min. :1639669 1: 0
## 1st Qu.:0 1st Qu.: 55280 1st Qu.:0.03062 1st Qu.:1639669 2: 0
## Median :0 Median :132900 Median :0.03062 Median :4339824 3: 0
## Mean :0 Mean : 99634 Mean :0.03195 Mean :3182615 4:14
## 3rd Qu.:0 3rd Qu.:132900 3rd Qu.:0.03371 3rd Qu.:4339824 5: 0
## Max. :0 Max. :132900 Max. :0.03371 Max. :4339824
##
## SP_CLUSTER SUBZONE_N total_URA geometry
## 1: 0 FLORA DRIVE :2 Min. : 1.00 MULTIPOLYGON :14
## 2: 0 PASIR RIS CENTRAL:2 1st Qu.: 3.00 epsg:4326 : 0
## 3: 0 PASIR RIS DRIVE :2 Median :13.50 +proj=long...: 0
## 4: 0 TAMPINES EAST :2 Mean :13.29
## 5:14 CHANGI WEST :1 3rd Qu.:21.00
## LOYANG WEST :1 Max. :27.00
## (Other) :4
tmap_mode("view")
Plotting the tmap for the total URA count on the SP clusters derived earlier.
tm_shape(ura_residents) +
tm_fill(col = "SP_CLUSTER") +
tm_borders(lwd=1,lty="solid") +
tm_bubbles(size = "total_URA", col= "total_URA", alpha=0.9, border.lwd = 0, border.alpha = 0, palette="Reds", id="SUBZONE_N")
Analysis of the map above:
As seen from the plotted map, we can tell that which clusters have more shopping counts:
Highest Shopping Count to Lowest Shopping Count
Key Highlights:
Highest: Cluster 3
Given that Cluster 3 has higher in business, financial, government embassies and shopping counts, the subzones in this cluster are more susceptible to having costlier residences. This is due to the fact that there are little residential units built due to other buildings occupying the spaces, and there are also many amenities nearby which mark up the price greatly. The costly residences are mainly due to the convenience that residents can obtain if they purchase these residential units such as the private properties in Singapore, especially when the location is near to the central and that there are many available services nearby for them to seek for. Thus, this results in Cluster 3 having a higher upmarket residential area count since the subzones are centrally located as well.
Lowest: Cluster 5
As for Cluster 5, given that there are many residential buildings for residents to purchase, and that it is densely populated with little commercialized buildings, it has the lowest upmarket residential area count. The subzones in this cluster have more HDB buildings, which make the income levels of the residents staying in this cluster more or less the same. Thus, this will not boost the need for a upmarket residential area to a large extent since purchasing power is limited. Furthermore, it is not as accessible as compared to the subzones in Cluster 3.
tmap_mode("plot")