1 Setting up my environment

packages <- c('rgdal', 'maptools', 'raster', 'spatstat', 'tmap', 'tidyverse', 'dplyr', 'sf', 'leaflet', 'OpenStreetMap')

for(p in packages){
  if(!require(p, character.only=T)){
    install.packages(p)
  }
  
  library(p,character.only=T)
}

2 Preparing the necessary data for analysis

2.1 Import listings as tibble dataframe and 2 geospatial data as SpatialPolygonsDataframe for sg and mpsz

listings <- read_csv("data/aspatial/listings.csv")
## Parsed with column specification:
## cols(
##   id = col_double(),
##   name = col_character(),
##   host_id = col_double(),
##   host_name = col_character(),
##   neighbourhood_group = col_character(),
##   neighbourhood = col_character(),
##   latitude = col_double(),
##   longitude = col_double(),
##   room_type = col_character(),
##   price = col_double(),
##   minimum_nights = col_double(),
##   number_of_reviews = col_double(),
##   last_review = col_date(format = ""),
##   reviews_per_month = col_double(),
##   calculated_host_listings_count = col_double(),
##   availability_365 = col_double()
## )
sg <- readOGR(dsn="data/geospatial", layer="CostalOutline")
## OGR data source with driver: ESRI Shapefile 
## Source: "D:\download\SMU\[IS415] Geospatial Analytics and Applications\Take-home_Ex02\data\geospatial", layer: "CostalOutline"
## with 60 features
## It has 4 fields
mpsz <- readOGR(dsn="data/geospatial", layer="MP14_SUBZONE_WEB_PL")
## OGR data source with driver: ESRI Shapefile 
## Source: "D:\download\SMU\[IS415] Geospatial Analytics and Applications\Take-home_Ex02\data\geospatial", layer: "MP14_SUBZONE_WEB_PL"
## with 323 features
## It has 15 fields

3 Exploring on the listings data

3.1 View the summary of listings data frame

summary(listings)
##        id               name              host_id           host_name        
##  Min.   :   49091   Length:7713        Min.   :    23666   Length:7713       
##  1st Qu.:16654474   Class :character   1st Qu.: 23722617   Class :character  
##  Median :27914769   Mode  :character   Median : 66406177   Mode  :character  
##  Mean   :26183287                      Mean   :102117711                     
##  3rd Qu.:36819445                      3rd Qu.:163258181                     
##  Max.   :42972584                      Max.   :341869568                     
##                                                                              
##  neighbourhood_group neighbourhood         latitude       longitude    
##  Length:7713         Length:7713        Min.   :1.244   Min.   :103.6  
##  Class :character    Class :character   1st Qu.:1.296   1st Qu.:103.8  
##  Mode  :character    Mode  :character   Median :1.311   Median :103.8  
##                                         Mean   :1.314   Mean   :103.8  
##                                         3rd Qu.:1.322   3rd Qu.:103.9  
##                                         Max.   :1.455   Max.   :104.0  
##                                                                        
##   room_type             price        minimum_nights    number_of_reviews
##  Length:7713        Min.   :  14.0   Min.   :   1.00   Min.   :  0.0    
##  Class :character   1st Qu.:  65.0   1st Qu.:   2.00   1st Qu.:  0.0    
##  Mode  :character   Median : 125.0   Median :   3.00   Median :  1.0    
##                     Mean   : 169.4   Mean   :  19.09   Mean   : 13.8    
##                     3rd Qu.: 199.0   3rd Qu.:  14.00   3rd Qu.: 10.0    
##                     Max.   :9999.0   Max.   :1000.00   Max.   :367.0    
##                                                                         
##   last_review         reviews_per_month calculated_host_listings_count
##  Min.   :2013-10-21   Min.   : 0.0100   Min.   :  1.00                
##  1st Qu.:2019-03-06   1st Qu.: 0.1500   1st Qu.:  2.00                
##  Median :2019-12-17   Median : 0.4300   Median : 10.00                
##  Mean   :2019-06-05   Mean   : 0.9379   Mean   : 45.64                
##  3rd Qu.:2020-02-12   3rd Qu.: 1.1400   3rd Qu.: 52.00                
##  Max.   :2020-03-20   Max.   :29.1700   Max.   :342.00                
##  NA's   :2812         NA's   :2812                                    
##  availability_365
##  Min.   :  0     
##  1st Qu.: 77     
##  Median :297     
##  Mean   :220     
##  3rd Qu.:358     
##  Max.   :365     
## 

In listings data frame, there is 2812 NA values in both last review and reviews per month columns. Before dropping the NA values, I would like to look into the data in greater detail before deciding.

But id and host id column should be a character data type instead of numeric.

3.2 Convert id and host id column to character data type

listings$id <- as.character(listings$id)
listings$host_id <- as.character(listings$host_id)
summary(listings)
##       id                name             host_id           host_name        
##  Length:7713        Length:7713        Length:7713        Length:7713       
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##                                                                             
##  neighbourhood_group neighbourhood         latitude       longitude    
##  Length:7713         Length:7713        Min.   :1.244   Min.   :103.6  
##  Class :character    Class :character   1st Qu.:1.296   1st Qu.:103.8  
##  Mode  :character    Mode  :character   Median :1.311   Median :103.8  
##                                         Mean   :1.314   Mean   :103.8  
##                                         3rd Qu.:1.322   3rd Qu.:103.9  
##                                         Max.   :1.455   Max.   :104.0  
##                                                                        
##   room_type             price        minimum_nights    number_of_reviews
##  Length:7713        Min.   :  14.0   Min.   :   1.00   Min.   :  0.0    
##  Class :character   1st Qu.:  65.0   1st Qu.:   2.00   1st Qu.:  0.0    
##  Mode  :character   Median : 125.0   Median :   3.00   Median :  1.0    
##                     Mean   : 169.4   Mean   :  19.09   Mean   : 13.8    
##                     3rd Qu.: 199.0   3rd Qu.:  14.00   3rd Qu.: 10.0    
##                     Max.   :9999.0   Max.   :1000.00   Max.   :367.0    
##                                                                         
##   last_review         reviews_per_month calculated_host_listings_count
##  Min.   :2013-10-21   Min.   : 0.0100   Min.   :  1.00                
##  1st Qu.:2019-03-06   1st Qu.: 0.1500   1st Qu.:  2.00                
##  Median :2019-12-17   Median : 0.4300   Median : 10.00                
##  Mean   :2019-06-05   Mean   : 0.9379   Mean   : 45.64                
##  3rd Qu.:2020-02-12   3rd Qu.: 1.1400   3rd Qu.: 52.00                
##  Max.   :2020-03-20   Max.   :29.1700   Max.   :342.00                
##  NA's   :2812         NA's   :2812                                    
##  availability_365
##  Min.   :  0     
##  1st Qu.: 77     
##  Median :297     
##  Mean   :220     
##  3rd Qu.:358     
##  Max.   :365     
## 

3.3 Explore the data in the listings data frame

3.3.1 How many unique host are there in this listings data?

n_distinct(listings$id)
## [1] 7713

Everyone room in the listings data are unique. ### How many room names are there in this listings data?

n_distinct(listings$name)
## [1] 7116

It seems that there are 597 room name that are not unique in this listings data. Let’s find out the reason.

listings[duplicated(listings$name), ]
## # A tibble: 597 x 16
##    id    name  host_id host_name neighbourhood_g~ neighbourhood latitude
##    <chr> <chr> <chr>   <chr>     <chr>            <chr>            <dbl>
##  1 7478~ Fant~ 3926646 John      Central Region   Downtown Core     1.28
##  2 1941~ Fant~ 3926646 John      Central Region   Downtown Core     1.28
##  3 2009~ Mode~ 7644641 Jin       East Region      Bedok             1.32
##  4 3651~ DORM~ 175266~ Royal     Central Region   Outram            1.28
##  5 3980~ 1-pe~ 8773916 Superb H~ Central Region   Rochor            1.30
##  6 3990~ 1-pe~ 8773916 Superb H~ Central Region   Rochor            1.30
##  7 4041~ Furn~ 145217~ Shirley   Central Region   Geylang           1.31
##  8 4054~ DORM~ 175266~ Royal     Central Region   Outram            1.28
##  9 4069~ DORM~ 175266~ Royal     Central Region   Outram            1.28
## 10 4450~ 2BR ~ 6609641 Catherine Central Region   Tanglin           1.32
## # ... with 587 more rows, and 9 more variables: longitude <dbl>,
## #   room_type <chr>, price <dbl>, minimum_nights <dbl>,
## #   number_of_reviews <dbl>, last_review <date>, reviews_per_month <dbl>,
## #   calculated_host_listings_count <dbl>, availability_365 <dbl>

From my analysis, the reason of why there is 597 room with the same name is due to various reason: -same room name in multiple location in the same or different neighbourhood -same room name in the same location with the same or different room type (e.g Single Capsule For 1 (Free Breakfast))

listings[duplicated(cbind(listings$latitude, listings$longitude)), ] %>%
  arrange(latitude) %>%
  select(name, neighbourhood, latitude, longitude, room_type, price)
## # A tibble: 201 x 6
##    name                        neighbourhood latitude longitude room_type  price
##    <chr>                       <chr>            <dbl>     <dbl> <chr>      <dbl>
##  1 Hmlet Cantonment - The Med~ Bukit Merah       1.27      104. Hotel room   122
##  2 Hmlet Cantonment - The Sma~ Bukit Merah       1.27      104. Hotel room   104
##  3 Loft Room [Hotel Soloha @ ~ Outram            1.28      104. Private r~   330
##  4 Draper Startup House - 2 B~ Downtown Core     1.28      104. Hotel room    90
##  5 Luxury hostel with in-cabi~ Outram            1.28      104. Hotel room    35
##  6 4pax family dormitory       Outram            1.28      104. Hotel room   125
##  7 1-bed in 6-Bed female dorm~ Outram            1.28      104. Hotel room    32
##  8 6pax family dormitory -Sha~ Outram            1.28      104. Hotel room   158
##  9 @1-bed in 10-Bed Mix Dormi~ Outram            1.28      104. Hotel room    29
## 10 Single Cabin,shared bathro~ Outram            1.28      104. Private r~    70
## # ... with 191 more rows

Also, there are some room with the same neighbourhood, longlat, room type and even price. I inferred that such occurence is due to multiple rooms are available for listings in that area such as in a different floor or a unit has multiple rooms. Therefore, there it’s any duplicate of rooms since each room has a unique listing id.

listings %>%
  filter(name == "Queen Capsule for 2 (Free Breakfast)")
## # A tibble: 5 x 16
##   id    name  host_id host_name neighbourhood_g~ neighbourhood latitude
##   <chr> <chr> <chr>   <chr>     <chr>            <chr>            <dbl>
## 1 1221~ Quee~ 656791~ Seven     Central Region   Kallang           1.31
## 2 1236~ Quee~ 656791~ Seven     Central Region   Kallang           1.31
## 3 1236~ Quee~ 656791~ Seven     Central Region   Kallang           1.31
## 4 1236~ Quee~ 656791~ Seven     Central Region   Kallang           1.31
## 5 1236~ Quee~ 656791~ Seven     Central Region   Kallang           1.31
## # ... with 9 more variables: longitude <dbl>, room_type <chr>, price <dbl>,
## #   minimum_nights <dbl>, number_of_reviews <dbl>, last_review <date>,
## #   reviews_per_month <dbl>, calculated_host_listings_count <dbl>,
## #   availability_365 <dbl>

Further analysis, room name “Queen Capsule for 2 (Free Breakfast)” 4 out of 5 entry has the same neighbourhood, longlat, room type, and price. But out of those 4 entries, 3 entries have NA values on the last review and reviews per month which I was found in the summary of listings data. I inferred that this is because no one has rent that room before compared to other rooms.

Therefore, the NA values will not be affecting the later analysis on the distribution of Airbnb room listing.

3.3.2 How many unique host id are there in this listings data?

n_distinct(listings$host_id)
## [1] 2530

3.3.3 How many unique host are there in this listings data?

n_distinct(listings$host_name)
## [1] 1768

It seems that there is more host id than host name. This could be multiple host id having the same host name.

listings %>%
  group_by(host_name) %>%
  arrange(host_name, host_id) %>%
  select(host_name, host_id)
## # A tibble: 7,713 x 2
## # Groups:   host_name [1,768]
##    host_name host_id  
##    <chr>     <chr>    
##  1 ~<U+5C0F><U+79E6>     303400407
##  2 <U+4E00><U+7F15><U+9633><U+5149>  136322177
##  3 <U+4E03><U+4E03>      91593516 
##  4 <U+4E91><U+9F99>      147045113
##  5 <U+4F73><U+4F73>      159798586
##  6 <U+4F73><U+4F73>      336486579
##  7 <U+4F73><U+57CE>      130145298
##  8 <U+4FCA><U+4F1F>      328063878
##  9 <U+5029><U+5F71>      335185788
## 10 <U+5029><U+5F71>      335185788
## # ... with 7,703 more rows

After looking into host name for example Jay, there are multiple host id such as 29420853, 36250439, 4461879, 49139350 associated to Aaron.

listings %>%
  filter(host_name == "Jay")
## # A tibble: 349 x 16
##    id    name  host_id host_name neighbourhood_g~ neighbourhood latitude
##    <chr> <chr> <chr>   <chr>     <chr>            <chr>            <dbl>
##  1 6079~ Mast~ 315575~ Jay       East Region      Pasir Ris         1.36
##  2 1387~ Brig~ 655494~ Jay       East Region      Tampines          1.34
##  3 1421~ Room~ 315575~ Jay       East Region      Pasir Ris         1.36
##  4 1434~ Bran~ 7609000 Jay       North-East Regi~ Hougang           1.36
##  5 1617~ Humb~ 664061~ Jay       Central Region   Marine Parade     1.31
##  6 1670~ Leis~ 664061~ Jay       Central Region   Downtown Core     1.27
##  7 1848~ Humb~ 664061~ Jay       Central Region   Marine Parade     1.31
##  8 1848~ BRAN~ 664061~ Jay       West Region      Clementi          1.32
##  9 1848~ Supe~ 664061~ Jay       Central Region   Downtown Core     1.28
## 10 1892~ Reso~ 5593961 Jay       East Region      Bedok             1.33
## # ... with 339 more rows, and 9 more variables: longitude <dbl>,
## #   room_type <chr>, price <dbl>, minimum_nights <dbl>,
## #   number_of_reviews <dbl>, last_review <date>, reviews_per_month <dbl>,
## #   calculated_host_listings_count <dbl>, availability_365 <dbl>

Another host name for example Jay, there are multiple host id such as 31557595, 65549406, 7609000, 66406177, 5593961 associated to Jay. Therefore, just by looking at host id or host name independently is not sufficient. How about looking at both columns as one instead?

n_distinct(cbind(listings$host_id, listings$host_name))
## [1] 2530

After combining host id and host name, there are 2530 unique hosts.

3.3.4 How many rooms does each host owns in this listings data?

listings %>%
  group_by(host_id, host_name) %>%
  tally(sort=TRUE)
## # A tibble: 2,530 x 3
## # Groups:   host_id [2,530]
##    host_id   host_name     n
##    <chr>     <chr>     <int>
##  1 66406177  Jay         342
##  2 8492007   Logan       151
##  3 209913841 Richards    149
##  4 29420853  Aaron       133
##  5 2413412   Kaurus      127
##  6 108773366 RedDoorz    116
##  7 219550151 Ray         102
##  8 8948251   Joey         97
##  9 23722617  Alex         95
## 10 31464513  Darcy        95
## # ... with 2,520 more rows

The top 3 host are Jay, Logan, and Richards.

Some interesting findings is some host name are named in such as way <U+56FD><U+52C7>, after viewing it through the tibble data frame those are Chinese characters.

3.3.5 How many room type are there in this listings data?

listings %>%
  group_by(room_type) %>%
  tally(sort=TRUE)
## # A tibble: 4 x 2
##   room_type           n
##   <chr>           <int>
## 1 Entire home/apt  3728
## 2 Private room     3206
## 3 Hotel room        507
## 4 Shared room       272

3.3.6 How many neighbourhood group are there in this listings data?

unique(listings$neighbourhood_group)
## [1] "North Region"      "Central Region"    "East Region"      
## [4] "North-East Region" "West Region"

3.3.7 How many room type in each neighbourhood group are there in this listings data?

listings %>%
  group_by(listings$neighbourhood_group) %>%
  tally(sort=TRUE)
## # A tibble: 5 x 2
##   `listings$neighbourhood_group`     n
##   <chr>                          <int>
## 1 Central Region                  6252
## 2 West Region                      505
## 3 East Region                      447
## 4 North-East Region                309
## 5 North Region                     200

Central Region seems to have the most room listings of various room types compared to other neighbourhood in Singapore.

listings %>%
  group_by(neighbourhood_group, neighbourhood, room_type) %>%
  select(neighbourhood_group, neighbourhood, room_type) %>%
  tally(sort=TRUE)
## # A tibble: 129 x 4
## # Groups:   neighbourhood_group, neighbourhood [43]
##    neighbourhood_group neighbourhood room_type           n
##    <chr>               <chr>         <chr>           <int>
##  1 Central Region      Geylang       Entire home/apt   615
##  2 Central Region      Kallang       Entire home/apt   493
##  3 Central Region      Kallang       Private room      474
##  4 Central Region      Novena        Entire home/apt   431
##  5 Central Region      Downtown Core Entire home/apt   348
##  6 Central Region      Geylang       Private room      259
##  7 Central Region      Rochor        Entire home/apt   233
##  8 East Region         Bedok         Private room      226
##  9 Central Region      River Valley  Entire home/apt   223
## 10 Central Region      Rochor        Private room      204
## # ... with 119 more rows

After looking into central region in detail, Geylang, Kallang, Novena, Downtown Core, and Rochor are the top 5 neighbourhood to have the Entire home/apt listings compared to the other neighbourhood.

While Kallang, Geylang, Bedok, Rochor, Outram are the top 5 neighbourhood to have the Private room listings compared to the other neighbourhood.

For Hotel room, the top 5 neighbourhood are in Outram, Kallang, Singapore River, Novena, and Downtown Core all Central Region.

Finally, shared room top 5 neighbourhood are in Kallang, Rochor, Outram, Queenstown, and Singapore River all also in the Central Region.

4 Filtering and transformation

4.1 Filter the listings SpatialPoint data frame by room type before converting into generic objects

listings_apt <- listings %>%
  filter(listings$room_type == "Entire home/apt")
listings_hotel <- listings %>%
  filter(listings$room_type == "Hotel room")
listings_private <- listings %>%
  filter(listings$room_type == "Private room")
listings_shared <- listings %>%
  filter(listings$room_type == "Shared room")

4.2 Convert listings aspatial DataFrame to simple feature DataFrame

listings <- st_as_sf(listings, coords=c("longitude","latitude"), crs="+proj=longlat +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0", remove=FALSE)
listings <- st_transform(listings, 3414)
st_crs(listings)
## 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"]]
listings_reduced <- subset(listings, select=-c(id, name, host_id, host_name, neighbourhood_group, neighbourhood, price, minimum_nights, number_of_reviews, longitude, latitude, last_review, reviews_per_month, calculated_host_listings_count, availability_365))
listings_reduced$room_type <- factor(listings_reduced$room_type)
listings_sf <- as_Spatial(listings_reduced, cast=TRUE)

4.3 Convert the room type listings aspatial DataFrame to simple feature DataFrame

listings_apt <- st_as_sf(listings_apt, coords=c("longitude","latitude"), crs="+proj=longlat +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0", remove=FALSE)
listings_apt <- st_transform(listings_apt, 3414)
st_crs(listings_apt)
## 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"]]
listings_hotel <- st_as_sf(listings_hotel, coords=c("longitude","latitude"), crs="+proj=longlat +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0", remove=FALSE)
listings_hotel <- st_transform(listings_hotel, 3414)
st_crs(listings_hotel)
## 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"]]
listings_private <- st_as_sf(listings_private, coords=c("longitude","latitude"), crs="+proj=longlat +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0", remove=FALSE)
listings_private <- st_transform(listings_private, 3414)
st_crs(listings_private)
## 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"]]
listings_shared <- st_as_sf(listings_shared, coords=c("longitude","latitude"), crs="+proj=longlat +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0", remove=FALSE)
listings_shared <- st_transform(listings_shared, 3414)
st_crs(listings_shared)
## 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"]]
listings_apt_sf <- as_Spatial(listings_apt, cast=TRUE)
listings_hotel_sf <- as_Spatial(listings_hotel, cast=TRUE)
listings_private_sf <- as_Spatial(listings_private, cast=TRUE)
listings_shared_sf <- as_Spatial(listings_shared, cast=TRUE)

4.4 Checking the projection system of the geospatial data

projection(mpsz) <- CRS("+init=EPSG:3414")
## Warning in `proj4string<-`(`*tmp*`, value = crs): A new CRS was assigned to an object with an existing CRS:
## +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 +ellps=WGS84 +towgs84=0,0,0
## without reprojecting.
## For reprojection, use function spTransform
st_crs(mpsz)
## Coordinate Reference System:
##   User input: +init=EPSG:3414 +proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs 
##   wkt:
## PROJCS["unnamed",
##     GEOGCS["WGS 84",
##         DATUM["unknown",
##             SPHEROID["WGS84",6378137,298.257223563]],
##         PRIMEM["Greenwich",0],
##         UNIT["degree",0.0174532925199433]],
##     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["Meter",1],
##     AUTHORITY["EPSG","3414"]]
projection(sg) <- CRS("+init=EPSG:3414")
## Warning in `proj4string<-`(`*tmp*`, value = crs): A new CRS was assigned to an object with an existing CRS:
## +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 +ellps=WGS84 +towgs84=0,0,0
## without reprojecting.
## For reprojection, use function spTransform
st_crs(sg)
## Coordinate Reference System:
##   User input: +init=EPSG:3414 +proj=tmerc +lat_0=1.366666666666667 +lon_0=103.8333333333333 +k=1 +x_0=28001.642 +y_0=38744.572 +ellps=WGS84 +units=m +no_defs 
##   wkt:
## PROJCS["unnamed",
##     GEOGCS["WGS 84",
##         DATUM["unknown",
##             SPHEROID["WGS84",6378137,298.257223563]],
##         PRIMEM["Greenwich",0],
##         UNIT["degree",0.0174532925199433]],
##     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["Meter",1],
##     AUTHORITY["EPSG","3414"]]

4.5 Examine the imported geospatial data

par(mfrow=c(2,2), mai=c(0,0,0,0))
plot(listings_sf)
plot(mpsz)
plot(sg)

4.5.1 Plotting the geospatial data by room type to view the various room type distribution

par(mfrow=c(2,2), mai=c(0.1,0.1,0.1,0.1))
plot(sg, border="lightgrey", main="Entire home/apt")
plot(sg, add=TRUE)
plot(listings_apt_sf, add=TRUE)

plot(sg, border="lightgrey", main="Hotel Room")
plot(sg, add=TRUE)
plot(listings_hotel_sf, add=TRUE)

plot(sg, border="lightgrey", main="Private Room")
plot(sg, add=TRUE)
plot(listings_private_sf, add=TRUE)

plot(sg, border="lightgrey", main="Shared Room")
plot(sg, add=TRUE)
plot(listings_shared_sf, add=TRUE)

From the plot shows that Entire home/apt, Private Room, and Shared Room is much more distributed around Singapore compared to Hotel Room that mostly is in the Central Region. This make sense as only in the Central Neighbourhood has most of hotel being operated. Also, all the listings are much more clustered in the Central Neighbourhood of Singapore which matches to the previous data exploratory analysis.

4.5.2 Plotting the interactive map

tmap_mode('view')
## tmap mode set to interactive viewing
tm_shape(listings)+
  tm_basemap(server="OpenStreetMap.Mapnik")+
  tm_bubbles(col="room_type", size="number_of_reviews", border.col="black", border.lwd=0.1)+
  tm_facets(by="room_type", nrow=2, ncol=2, sync=TRUE)
## Legend for symbol sizes not available in view mode.
tmap_mode('plot')
## tmap mode set to plotting

From this interactive plot shows that Entire home/apt, Private Room, and Shared Room separately instead of the previous plot where it’s possible to see in much much detail.

5 Object conversion and transformation

5.1 Convert SpatialPoint and SpatialPolygon data frame into generic objects

sg_sp <- as(sg, "SpatialPolygons")
listings_apt_sp <- as(listings_apt_sf, "SpatialPoints")
listings_hotel_sp <- as(listings_hotel_sf, "SpatialPoints")
listings_private_sp <- as(listings_private_sf, "SpatialPoints")
listings_shared_sp <- as(listings_shared_sf, "SpatialPoints")

5.2 Convert the listings spatialpoints data into listings spatstat’s ppp object format and plot

listings_ppp <- as(listings_sf, "ppp")
plot(listings_ppp)

## Convert the room type listings spatialpoints data into spatstat’s ppp object format

listings_apt_ppp <- as(listings_apt_sp, "ppp")
listings_apt_ppp
## Planar point pattern: 3728 points
## window: rectangle = [7215.57, 42932.86] x [25166.35, 48181.41] units
listings_hotel_ppp <- as(listings_hotel_sp, "ppp")
listings_hotel_ppp
## Planar point pattern: 507 points
## window: rectangle = [20126.35, 36915.62] x [28442.68, 39865.12] units
listings_private_ppp <- as(listings_private_sp, "ppp")
listings_private_ppp
## Planar point pattern: 3206 points
## window: rectangle = [10737.87, 43386.87] x [26334.02, 48466.72] units
listings_shared_ppp <- as(listings_shared_sp, "ppp")
listings_shared_ppp
## Planar point pattern: 272 points
## window: rectangle = [13607.1, 43401.32] x [28185.04, 48252.18] units

5.2.1 Plot the room type listings spatstat’s ppp object

par(mfrow=c(2,2), mai=c(0.1,0.1,0.1,0.1))
plot(listings_apt_ppp, main="Entire home/apt")
plot(listings_hotel_ppp, main="Hotel Room")
plot(listings_private_ppp, main="Private Room")
plot(listings_shared_ppp, main="Shared Room")

5.2.1.1 View the summary statistics of listings spatstat’s ppp object

summary(listings_ppp)
## Marked planar point pattern:  7713 points
## Average intensity 9.147931e-06 points per square unit
## 
## *Pattern contains duplicated points*
## 
## Coordinates are given to 3 decimal places
## i.e. rounded to the nearest multiple of 0.001 units
## 
## Multitype:
##                 frequency proportion    intensity
## Entire home/apt      3728 0.48333980 4.421559e-06
## Hotel room            507 0.06573318 6.013226e-07
## Private room         3206 0.41566190 3.802446e-06
## Shared room           272 0.03526514 3.226030e-07
## 
## Window: rectangle = [7215.57, 43401.32] x [25166.35, 48466.72] units
##                     (36190 x 23300 units)
## Window area = 843141000 square units

5.2.1.2 View the summary statistics of room type listings spatstat’s ppp object

summary(listings_apt_ppp)
## Planar point pattern:  3728 points
## Average intensity 4.535082e-06 points per square unit
## 
## *Pattern contains duplicated points*
## 
## Coordinates are given to 3 decimal places
## i.e. rounded to the nearest multiple of 0.001 units
## 
## Window: rectangle = [7215.57, 42932.86] x [25166.35, 48181.41] units
##                     (35720 x 23020 units)
## Window area = 822036000 square units
summary(listings_hotel_ppp)
## Planar point pattern:  507 points
## Average intensity 2.643733e-06 points per square unit
## 
## *Pattern contains duplicated points*
## 
## Coordinates are given to 3 decimal places
## i.e. rounded to the nearest multiple of 0.001 units
## 
## Window: rectangle = [20126.35, 36915.62] x [28442.68, 39865.12] units
##                     (16790 x 11420 units)
## Window area = 191774000 square units
summary(listings_private_ppp)
## Planar point pattern:  3206 points
## Average intensity 4.436692e-06 points per square unit
## 
## *Pattern contains duplicated points*
## 
## Coordinates are given to 3 decimal places
## i.e. rounded to the nearest multiple of 0.001 units
## 
## Window: rectangle = [10737.87, 43386.87] x [26334.02, 48466.72] units
##                     (32650 x 22130 units)
## Window area = 722610000 square units
summary(listings_shared_ppp)
## Planar point pattern:  272 points
## Average intensity 4.549374e-07 points per square unit
## 
## *Pattern contains duplicated points*
## 
## Coordinates are given to 3 decimal places
## i.e. rounded to the nearest multiple of 0.001 units
## 
## Window: rectangle = [13607.1, 43401.32] x [28185.04, 48252.18] units
##                     (29790 x 20070 units)
## Window area = 597885000 square units

5.3 Check for duplication in listings spatstat’s ppp object

any(duplicated(listings_ppp))
## [1] TRUE

5.3.1 Check for duplication in room type listings spatstat’s ppp object

any(duplicated(listings_apt_ppp))
## [1] TRUE
any(duplicated(listings_hotel_ppp))
## [1] TRUE
any(duplicated(listings_private_ppp))
## [1] TRUE
any(duplicated(listings_shared_ppp))
## [1] TRUE

5.3.2 Count the number of coindicence point using multiplicity for listing

multi_listings_ppp <- multiplicity(listings_ppp)
multi_listings_ppp[which(multi_listings_ppp > 1)]
##    9   10   11   35   55   63   77   84   85   88  116  127  130  131  132  133 
##    3    3    3   17    2    3   17    2    2   17    9   11   11   11   11   11 
##  134  135  142  161  162  163  259  457  466  559  862  866  890  899  900  904 
##   11   11    4    9    9    9    2    3   17    4   11    3    9    9    9    9 
## 1060 1272 1274 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1294 1402 1430 
##    3   10   10   10   10   10   10    2    2   10   10   10   10    2    2   17 
## 1524 1587 1639 1760 1765 1785 1786 1822 1873 1874 1875 1978 1992 2012 2021 2025 
##   17   17    3    2    2    3    3    9   11   11   11    3    3    3    3    3 
## 2092 2093 2096 2097 2098 2100 2132 2133 2134 2135 2136 2137 2138 2171 2273 2274 
##    8    8    8    8    8    8    7    7    7    7    7    7    7    5    3    3 
## 2275 2286 2299 2300 2350 2389 2390 2432 2435 2436 2438 2574 2656 2685 2686 2687 
##    3    6    6    6    6    8    8    4    4    4    4   16    6    6    6    6 
## 2688 2689 2698 2706 2713 2720 2724 2793 2844 2868 2873 2883 2884 2885 2886 2887 
##    6    6    3    3    5    5    6    3   16   16   16   16   16   16   16   16 
## 2888 2889 2890 2891 2892 2893 2904 2931 2943 2976 2983 3010 3014 3018 3029 3030 
##   16   16   16   16   16   16   11   11   11   11   16   16   16   16   11    5 
## 3045 3057 3103 3104 3110 3127 3134 3136 3337 3382 3448 3459 3475 3564 3573 3646 
##   11   11    6   11   11   11   16   11   14   16    5   14   14   14   16    2 
## 3674 3749 3783 3784 3785 3786 3852 3885 3886 3887 3951 4052 4053 4054 4055 4074 
##   16    2    4    4    4    4    4    3    3    3   14    6    6    6    6    6 
## 4075 4122 4126 4277 4280 4352 4393 4394 4397 4404 4407 4411 4418 4439 4453 4467 
##    6    4   16   14    4    4    3    3    3   14    3   14   16   14   14    4 
## 4480 4509 4533 4706 4707 4709 4742 4794 4847 4851 4859 4863 4874 4901 5109 5128 
##   16    5   14    5    5    5    5    4    4   14    4    3    4   14   17   17 
## 5155 5223 5224 5278 5395 5406 5407 5434 5463 5501 5629 5651 5749 5780 5783 5784 
##   17    4   16   16    3   16   16   16   17   17   17   17    4    7    7    7 
## 5785 5786 5788 5790 5829 5846 5847 5849 5886 5918 5960 5968 5989 5993 6003 6019 
##    7    7    7    7   17    3    3    3   17    4    3   14    3   16    4    3 
## 6179 6229 6805 6837 6883 6885 
##    4   17    2    2    2    2
sum(multiplicity(listings_ppp) > 1)
## [1] 230

5.4 Using jittering way to overcome duplication

listings_ppp_jit <- rjitter(listings_ppp, retry=TRUE, nsim=1, drop=TRUE)
plot(listings_ppp_jit)

listings_apt_ppp_jit <- rjitter(listings_apt_ppp, retry=TRUE, nsim=1, drop=TRUE)
listings_hotel_ppp_jit <- rjitter(listings_hotel_ppp, retry=TRUE, nsim=1, drop=TRUE)
listings_private_ppp_jit <- rjitter(listings_private_ppp, retry=TRUE, nsim=1, drop=TRUE)
listings_shared_ppp_jit <- rjitter(listings_shared_ppp, retry=TRUE, nsim=1, drop=TRUE)
par(mfrow=c(2,2), mai=c(0.1,0.1,0.1,0.1))
plot(listings_apt_ppp_jit, main="Entire home/apt")
plot(listings_hotel_ppp_jit, main="Hotel Room")
plot(listings_private_ppp_jit, main="Private Room")
plot(listings_shared_ppp_jit, main="Shared Room")

5.4.1 Ensure that all duplicated point events have been jittered

sum(multiplicity(listings_ppp_jit) > 1)
## [1] 0
sum(multiplicity(listings_apt_ppp_jit) > 1)
## [1] 0
sum(multiplicity(listings_hotel_ppp_jit) > 1)
## [1] 0
sum(multiplicity(listings_private_ppp_jit) > 1)
## [1] 0
sum(multiplicity(listings_shared_ppp_jit) > 1)
## [1] 0

5.5 Convert sg SpatialPolygon object into owin object of spatstat

sg_owin <- as(sg_sp, "owin")

5.5.1 Plot the sg owin object

plot(sg_owin)

5.5.2 Viewing the content of sg owin object

summary(sg_owin)
## Window: polygonal boundary
## 60 separate polygons (no holes)
##             vertices        area relative.area
## polygon 1         38 1.56140e+04      2.09e-05
## polygon 2        735 4.69093e+06      6.27e-03
## polygon 3         49 1.66986e+04      2.23e-05
## polygon 4         76 3.12332e+05      4.17e-04
## polygon 5       5141 6.36179e+08      8.50e-01
## polygon 6         42 5.58317e+04      7.46e-05
## polygon 7         67 1.31354e+06      1.75e-03
## polygon 8         15 4.46420e+03      5.96e-06
## polygon 9         14 5.46674e+03      7.30e-06
## polygon 10        37 5.26194e+03      7.03e-06
## polygon 11        53 3.44003e+04      4.59e-05
## polygon 12        74 5.82234e+04      7.78e-05
## polygon 13        69 5.63134e+04      7.52e-05
## polygon 14       143 1.45139e+05      1.94e-04
## polygon 15       165 3.38736e+05      4.52e-04
## polygon 16       130 9.40465e+04      1.26e-04
## polygon 17        19 1.80977e+03      2.42e-06
## polygon 18        16 2.01046e+03      2.69e-06
## polygon 19        93 4.30642e+05      5.75e-04
## polygon 20        90 4.15092e+05      5.54e-04
## polygon 21       721 1.92795e+06      2.57e-03
## polygon 22       330 1.11896e+06      1.49e-03
## polygon 23       115 9.28394e+05      1.24e-03
## polygon 24        37 1.01705e+04      1.36e-05
## polygon 25        25 1.66227e+04      2.22e-05
## polygon 26        10 2.14507e+03      2.86e-06
## polygon 27       190 2.02489e+05      2.70e-04
## polygon 28       175 9.25904e+05      1.24e-03
## polygon 29      1993 9.99217e+06      1.33e-02
## polygon 30        38 2.42492e+04      3.24e-05
## polygon 31        24 6.35239e+03      8.48e-06
## polygon 32        53 6.35791e+05      8.49e-04
## polygon 33        41 1.60161e+04      2.14e-05
## polygon 34        22 2.54368e+03      3.40e-06
## polygon 35        30 1.08382e+04      1.45e-05
## polygon 36       327 2.16921e+06      2.90e-03
## polygon 37       111 6.62927e+05      8.85e-04
## polygon 38        90 1.15991e+05      1.55e-04
## polygon 39        98 6.26829e+04      8.37e-05
## polygon 40       415 3.25384e+06      4.35e-03
## polygon 41       222 1.51142e+06      2.02e-03
## polygon 42       107 6.33039e+05      8.45e-04
## polygon 43         7 2.48299e+03      3.32e-06
## polygon 44        17 3.28303e+04      4.38e-05
## polygon 45        26 8.34758e+03      1.11e-05
## polygon 46       177 4.67446e+05      6.24e-04
## polygon 47        16 3.19460e+03      4.27e-06
## polygon 48        15 4.87296e+03      6.51e-06
## polygon 49        66 1.61841e+04      2.16e-05
## polygon 50       149 5.63430e+06      7.53e-03
## polygon 51       609 2.62570e+07      3.51e-02
## polygon 52         8 7.82256e+03      1.04e-05
## polygon 53       976 2.33447e+07      3.12e-02
## polygon 54        55 8.25379e+04      1.10e-04
## polygon 55       976 2.33447e+07      3.12e-02
## polygon 56        61 3.33449e+05      4.45e-04
## polygon 57         6 1.68410e+04      2.25e-05
## polygon 58         4 9.45963e+03      1.26e-05
## polygon 59        46 6.99702e+05      9.35e-04
## polygon 60        13 7.00873e+04      9.36e-05
## enclosing rectangle: [2663.93, 56047.79] x [16357.98, 50244.03] units
##                      (53380 x 33890 units)
## Window area = 748741000 square units
## Fraction of frame area: 0.414

5.6 Extract listing locations within the specific region to do the analysis

listings_owin <- listings_ppp_jit[sg_owin]
listings_apt_owin <- listings_apt_ppp_jit[sg_owin]
listings_hotel_owin <- listings_hotel_ppp_jit[sg_owin]
listings_private_owin <- listings_private_ppp_jit[sg_owin]
listings_shared_owin <- listings_shared_ppp_jit[sg_owin]

5.6.1 Plot the combined listing locations with Singapore map

plot(listings_owin)

par(mfrow=c(2,2), mai=c(0.1,0.1,0.1,0.1))
plot(listings_apt_owin, main="Entire home/apt")
plot(listings_hotel_owin, main="Hotel Room")
plot(listings_private_owin, main="Private Room")
plot(listings_shared_owin, main="Shared Room")

6 Section A: Nation-wide analysis

6.1 Testing spatial point patterns using quadrat analysis

qt <- quadrat.test(listings_owin, nx=20, ny=15)
qt
## 
##  Chi-squared test of CSR using quadrat counts
## 
## data:  listings_owin
## X2 = 72638, df = 184, p-value < 2.2e-16
## alternative hypothesis: two.sided
## 
## Quadrats: 185 tiles (irregular windows)

6.1.1 Plot the quadrat analysis on the listings_ppp

plot(listings_owin)
plot(qt, add=TRUE, cex=.1)

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed.
The 95% confident interval will be used.

6.2 Performs Chi-squared test of CSR using quadrat counts

quadrat.test(listings_owin, nx=20, ny=15, method="M", nsim=999)
## 
##  Conditional Monte Carlo test of CSR using quadrat counts
##  Test statistic: Pearson X2 statistic
## 
## data:  listings_owin
## X2 = 72638, p-value = 0.002
## alternative hypothesis: two.sided
## 
## Quadrats: 185 tiles (irregular windows)

The Chi-squared statistics is large and p-value is smaller than alpha value of 0.05. Therefore, I will reject the null hypothesis that the points patterns are randomly distributed. I can infer that there is sign of clustering of Airbnb listing locations in Singapore.


Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed.
The 95% confident interval will be used.

6.3 Testing spatial point patterns using Nearest Neighbour Index

6.3.1 For all Airbnb listing locations in Singapore

clarkevans.test(listings_owin, correction="none", alternative=c("two.sided"), nsim=999)
## 
##  Clark-Evans test
##  No edge correction
##  Monte Carlo test based on 999 simulations of CSR with fixed n
## 
## data:  listings_owin
## R = 0.34201, p-value = 0.002
## alternative hypothesis: two-sided

Since p-value is smaller than alpha value of 0.05. Therefore, I will reject the null hypothesis that the spatial points patterns are randomly distributed. Also, since R value is less than 1 shows statistically significant and signs of Airbnb listing locations clustering in Singapore.

6.3.2 For Entire Home/Apartment Airbnb listing locations in Singapore

clarkevans.test(listings_apt_owin, correction="none", alternative=c("two.sided"), nsim=999)
## 
##  Clark-Evans test
##  No edge correction
##  Monte Carlo test based on 999 simulations of CSR with fixed n
## 
## data:  listings_apt_owin
## R = 0.26436, p-value = 0.002
## alternative hypothesis: two-sided

Since p-value is smaller than alpha value of 0.05. Therefore, I will reject the null hypothesis that the spatial points patterns are randomly distributed. Also, since R value is less than 1 shows statistically significant and signs of Entire Home/Apartment room Airbnb listing locations clustering in Singapore.

6.3.3 For Hotel Room Airbnb listing locations in Singapore

clarkevans.test(listings_hotel_owin, correction="none", alternative=c("two.sided"), nsim=999)
## 
##  Clark-Evans test
##  No edge correction
##  Monte Carlo test based on 999 simulations of CSR with fixed n
## 
## data:  listings_hotel_owin
## R = 0.098005, p-value = 0.002
## alternative hypothesis: two-sided

Since p-value is smaller than alpha value of 0.05. Therefore, I will reject the null hypothesis that the spatial points patterns are randomly distributed. Also, since R value is much lesser than 1 shows statistically significant and clearer signs of hotel room Airbnb listing locations clustering in Singapore than other room types.

6.3.4 For Private Room Airbnb listing locations in Singapore

clarkevans.test(listings_private_owin, correction="none", alternative=c("two.sided"), nsim=999)
## 
##  Clark-Evans test
##  No edge correction
##  Monte Carlo test based on 999 simulations of CSR with fixed n
## 
## data:  listings_private_owin
## R = 0.37818, p-value = 0.002
## alternative hypothesis: two-sided

Since p-value is smaller than alpha value of 0.05. Therefore, I will reject the null hypothesis that the spatial points patterns are randomly distributed. Also, since R value is less than 1 shows statistically significant and signs of private Room Airbnb listing locations clustering in Singapore.

6.3.5 For Shared Room Airbnb listing locations in Singapore

clarkevans.test(listings_shared_owin, correction="none", alternative=c("two.sided"), nsim=999)
## 
##  Clark-Evans test
##  No edge correction
##  Monte Carlo test based on 999 simulations of CSR with fixed n
## 
## data:  listings_shared_owin
## R = 0.34875, p-value = 0.002
## alternative hypothesis: two-sided

Since p-value is smaller than alpha value of 0.05. Therefore, I will reject the null hypothesis that the spatial points patterns are randomly distributed. Also, since R value is less than 1 shows statistically significant and signs of clustering shared Room Airbnb listing locations in Singapore.

6.4 Derive kernel density maps of Airbnb listing by room type

6.4.1 Convert the unit of measurement from meter to kilometer

listings_owin.km <- rescale(listings_owin, 1000, "km")
listings_apt_owin.km <- rescale(listings_apt_owin, 1000, "km")
listings_hotel_owin.km <- rescale(listings_hotel_owin, 1000, "km")
listings_private_owin.km <- rescale(listings_private_owin, 1000, "km")
listings_shared_owin.km <- rescale(listings_shared_owin, 1000, "km")

6.4.2 Compute the kernel smoothed intensity function of Airbnb listing locations in Singapore

kde_listings.bw <- density(listings_owin.km, sigma=bw.diggle, edge=TRUE, kernel="gaussian")
kde_listings_apt.bw <- density(listings_apt_owin.km, sigma=bw.diggle, edge=TRUE, kernel="gaussian")
kde_listings_hotel.bw <- density(listings_hotel_owin.km, sigma=bw.diggle, edge=TRUE, kernel="gaussian")
kde_listings_private.bw <- density(listings_private_owin.km, sigma=bw.diggle, edge=TRUE, kernel="gaussian")
kde_listings_shared.bw <- density(listings_shared_owin.km, sigma=bw.diggle, edge=TRUE, kernel="gaussian")

6.5 Plot the derived kernel density map

6.5.1 All Airbnb listing locations in Singapore

plot(kde_listings.bw)

6.5.2 Entire Home/Apartment and Hotel Room Airbnb listing locations in Singapore

plot(kde_listings_apt.bw)

plot(kde_listings_hotel.bw)

6.5.3 Private Room and Shared Room Airbnb listing locations in Singapore

plot(kde_listings_private.bw)

plot(kde_listings_shared.bw)

Comparing the KDE maps, generally the central neighbourhood has the most brightest color surfaced where it’s mostly clustered. In particular, hotel has the less brightest color than the other room types. This was result is also shown in computing the Nearest Neighbour Index.

The advantage of kernel density map over point map, is calculates the density of the quanity around each output cell for a neighborhood, whereas point density divide the quantity by the area of the identified neighbourhood area. Therefore, KDE distributes a measured quantity of a point layer throughout an area to produce a surface that is continuous.

7 Section B: By planning subzones

7.1 Extract the target subzones

aj <- mpsz[mpsz@data$SUBZONE_N == "ALJUNIED",]
bs <- mpsz[mpsz@data$SUBZONE_N == "BALESTIER",]
la <- mpsz[mpsz@data$SUBZONE_N == "LAVENDER",]
tj <- mpsz[mpsz@data$SUBZONE_N == "TANJONG PAGAR",]

7.2 Plotting all the target subzones

par(mfrow=c(2,2), mai=c(0.3,0.3,0.3,0.3))
plot(aj, main="ALJUNIED")
plot(bs, main="BALESTIER")
plot(la, main="LAVENDER")
plot(tj, main="TANJONG PAGAR")

7.3 Overlay the target subzones on OpenStreetMap

aj_t <- spTransform(aj, CRS("+init=epsg:4326"))
bs_t <- spTransform(bs, CRS("+init=epsg:4326"))
la_t <- spTransform(la, CRS("+init=epsg:4326"))
tj_t <- spTransform(tj, CRS("+init=epsg:4326"))
leaflet() %>%
  addProviderTiles("OpenStreetMap.Mapnik", options=providerTileOptions(opacity=0.99)) %>%
  addPolygons(data=aj_t, label="Aljunied", stroke=FALSE, fillOpacity=0.5, smoothFactor=0.5) %>%
  addPolygons(data=bs_t, label="Balestier", stroke=FALSE, fillOpacity=0.5, smoothFactor=0.5) %>%
  addPolygons(data=la_t, label="Lavender", stroke=FALSE, fillOpacity=0.5, smoothFactor=0.5) %>%
  addPolygons(data=tj_t, label="Tanjong Pagar", stroke=FALSE, fillOpacity=0.5, smoothFactor=0.5)

### Finding out the subzone area for later Kernel Density Estimation Unit of measurement is in meters square

area(aj)
## [1] 2959368
area(bs)
## [1] 1926622
area(la)
## [1] 757907.6
area(tj)
## [1] 145518.7

7.4 Convert these SpatialPolygons objects into owin objects

aj_owin <- as(aj, "owin")
bs_owin <- as(bs, "owin")
la_owin <- as(la, "owin")
tj_owin <- as(tj, "owin")

7.5 Extract listings that is within the specific region and combining with the target subzones

listings_aj_owin <- listings_ppp_jit[aj_owin]
listings_bs_owin <- listings_ppp_jit[bs_owin]
listings_la_owin <- listings_ppp_jit[la_owin]
listings_tj_owin <- listings_ppp_jit[tj_owin]
listings_apt_aj_owin <- listings_apt_ppp_jit[aj_owin]
listings_hotel_aj_owin <- listings_hotel_ppp_jit[aj_owin]
listings_private_aj_owin <- listings_private_ppp_jit[aj_owin]
listings_shared_aj_owin <- listings_shared_ppp_jit[aj_owin]

listings_apt_bs_owin <- listings_apt_ppp_jit[bs_owin]
listings_hotel_bs_owin <- listings_hotel_ppp_jit[bs_owin]
listings_private_bs_owin <- listings_private_ppp_jit[bs_owin]
listings_shared_bs_owin <- listings_shared_ppp_jit[bs_owin]

listings_apt_la_owin <- listings_apt_ppp_jit[la_owin]
listings_hotel_la_owin <- listings_hotel_ppp_jit[la_owin]
listings_private_la_owin <- listings_private_ppp_jit[la_owin]
listings_shared_la_owin <- listings_shared_ppp_jit[la_owin]

listings_apt_tj_owin <- listings_apt_ppp_jit[tj_owin]
listings_hotel_tj_owin <- listings_hotel_ppp_jit[tj_owin]
listings_private_tj_owin <- listings_private_ppp_jit[tj_owin]
listings_shared_tj_owin <- listings_shared_ppp_jit[tj_owin]

7.6 Analyse spatial point process using G-function

7.6.1 Aljunied subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_aj = Gest(listings_aj_owin, correction="best")
plot(G_aj)

7.6.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with G-fucntion

G_aj.csr <- envelope(listings_aj_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.6.1.2 Plot the Complete Spatial Randomness graph

plot(G_aj.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.6.2 Aljunied subzone area for each room type

7.6.2.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire home/apt listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire home/apt listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_apt_aj = Gest(listings_apt_aj_owin, correction="best")
plot(G_aj)

7.6.2.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with G-fucntion

G_apt_aj.csr <- envelope(listings_apt_aj_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.2.1.2 Plot the Complete Spatial Randomness graph
plot(G_apt_aj.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.6.2.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_hotel_aj = Gest(listings_hotel_aj_owin, correction="best")
plot(G_hotel_aj)

7.6.2.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with G-fucntion

G_hotel_aj.csr <- envelope(listings_hotel_aj_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.2.2.2 Plot the Complete Spatial Randomness graph
plot(G_hotel_aj.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at roughly 5m to about 170m which is which is statistically significant. However, beyond 170m the black line is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb Hotel room listing locations in Aljunied subzone area are randomly distributed.

7.6.2.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_private_aj = Gest(listings_private_aj_owin, correction="best")
plot(G_private_aj)

7.6.2.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with G-fucntion

G_private_aj.csr <- envelope(listings_private_aj_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.2.3.2 Plot the Complete Spatial Randomness graph
plot(G_private_aj.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.6.2.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_shared_aj = Gest(listings_shared_aj_owin, correction="best")
plot(G_shared_aj)

7.6.2.4.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with G-fucntion

G_shared_aj.csr <- envelope(listings_shared_aj_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.2.4.2 Plot the Complete Spatial Randomness graph
plot(G_shared_aj.csr)

Based on the CSR graph, the black line is close to the theoretical value at roughly 110m but is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Aljunied subzone area are randomly distributed.

7.6.3 Balestier subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_bs = Gest(listings_bs_owin, correction="best")
plot(G_bs)

7.6.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

G_bs.csr <- envelope(listings_bs_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.6.3.2 Plot the Complete Spatial Randomness graph

plot(G_bs.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.6.4 Balestier subzone area for each room type

7.6.4.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_apt_bs = Gest(listings_apt_bs_owin, correction="best")
plot(G_apt_bs)

7.6.4.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_apt_bs.csr <- envelope(listings_apt_bs_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.4.1.2 Plot the Complete Spatial Randomness graph
plot(G_apt_bs.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.6.4.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_hotel_bs = Gest(listings_hotel_bs_owin, correction="best")
plot(G_hotel_bs)

7.6.4.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_hotel_bs.csr <- envelope(listings_hotel_bs_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.4.2.2 Plot the Complete Spatial Randomness graph
plot(G_hotel_bs.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at roughly 60m to about 85m which is which is statistically significant. However, beyond 130m the black line is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb Hotel room listing locations in Balestier subzone area are randomly distributed.

7.6.4.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_private_bs = Gest(listings_private_bs_owin, correction="best")
plot(G_private_bs)

7.6.4.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_private_bs.csr <- envelope(listings_private_bs_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.4.3.2 Plot the Complete Spatial Randomness graph
plot(G_private_bs.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at roughly 25m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.6.4.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_shared_bs = Gest(listings_shared_bs_owin, correction="best")
plot(G_shared_bs)

Based on the graph, the G value line is flat at 0 which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Balestier subzone area are randomly distributed.

7.6.5 Lavender subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_la = Gest(listings_la_owin, correction="best")
plot(G_la)

7.6.5.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

G_la.csr <- envelope(listings_la_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.6.5.2 Plot the Complete Spatial Randomness graph

plot(G_la.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at roughly 6m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Lavender subzone area roughly beyond 6m.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.6.6 Lavender subzone area for each room type

7.6.6.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_apt_la = Gest(listings_apt_la_owin, correction="best")
plot(G_apt_la)

7.6.6.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_apt_la.csr <- envelope(listings_apt_la_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.6.1.2 Plot the Complete Spatial Randomness graph
plot(G_apt_la.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at roughly 22m to about 42m which is which is statistically significant. However, beyond 42m the black line is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb Entire home/apt listing locations in Lavender subzone area are randomly distributed.

7.6.6.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_hotel_la = Gest(listings_hotel_la_owin, correction="best")
plot(G_hotel_la)

7.6.6.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_hotel_la.csr <- envelope(listings_hotel_la_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.6.2.2 Plot the Complete Spatial Randomness graph
plot(G_hotel_la.csr)

Based on the CSR graph, the black line is above the randomization envelope at roughly 21m to about 52m which is which is statistically significant. However, beyond 52m the black line is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb hotel room listing locations in Lavender subzone area are randomly distributed.

7.6.6.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_private_la = Gest(listings_private_la_owin, correction="best")
plot(G_private_la)

7.6.6.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_private_la.csr <- envelope(listings_private_la_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.6.3.2 Plot the Complete Spatial Randomness graph
plot(G_private_la.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.6.6.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_shared_la = Gest(listings_shared_la_owin, correction="best")
plot(G_shared_la)

7.6.6.4.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_shared_la.csr <- envelope(listings_shared_la_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.6.4.2 Plot the Complete Spatial Randomness graph
plot(G_shared_la.csr)

Based on the CSR graph, the black line is above the theoretical value and close to the randomization envelope at roughly 22m to about 41m. However, beyond 41m the black line is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Lavender subzone area are randomly distributed.

7.6.7 Tanjong Pagar subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Tangjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_tj = Gest(listings_tj_owin, correction="best")
plot(G_tj)

7.6.7.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

G_tj.csr <- envelope(listings_tj_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.6.7.2 Plot the Complete Spatial Randomness graph

plot(G_tj.csr)

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at roughly 5m to about 18m which is which is statistically significant. However, beyond 18m the black line is under the theoretical value and within the randomization envelope it is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb listing locations in Tanjong Pagar subzone area are randomly distributed.

7.6.8 Tanjong Pagar subzone area for each room type

7.6.8.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_apt_tj = Gest(listings_apt_tj_owin, correction="best")
plot(G_apt_tj)

7.6.8.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_apt_tj.csr <- envelope(listings_apt_tj_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.8.1.2 Plot the Complete Spatial Randomness graph
plot(G_apt_tj.csr)

Based on the CSR graph, the black line is above the randomization envelope at roughly 7m to about 18m which is which is statistically significant. However, beyond 18m the black line is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb listing locations in Tanjong Pagar subzone area are randomly distributed.

7.6.8.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_hotel_tj = Gest(listings_hotel_tj_owin, correction="best")
plot(G_hotel_tj)

Based on the graph, the G value line is flat at 0 which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb hotel room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.6.8.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_private_tj = Gest(listings_private_tj_owin, correction="best")
plot(G_private_tj)

7.6.8.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
G_private_tj.csr <- envelope(listings_private_tj_owin, Gest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.6.8.3.2 Plot the Complete Spatial Randomness graph
plot(G_private_tj.csr)

Based on the CSR graph, the black line is close to the theoretical value and is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb private room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.6.8.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

G_shared_tj = Gest(listings_shared_tj_owin, correction="best")
plot(G_shared_tj)

Based on the graph, the G value line is flat at 0 which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.7 Analyse spatial point process using F-function

7.7.1 Aljunied subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_aj = Fest(listings_aj_owin, correction="best")
plot(F_aj)

7.7.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_aj.csr <- envelope(listings_aj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.1.2 Plot the Complete Spatial Randomness graph

plot(F_aj.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.2 Aljunied subzone area for each room type

7.7.2.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_apt_aj = Fest(listings_apt_aj_owin, correction="best")
plot(F_apt_aj)

7.7.2.2 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with F-fucntion

F_apt_aj.csr <- envelope(listings_apt_aj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.2.3 Plot the Complete Spatial Randomness graph

plot(F_apt_aj.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 15m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire home/apt room listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.2.4 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_hotel_aj = Fest(listings_hotel_aj_owin, correction="best")
plot(F_hotel_aj)

7.7.2.5 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_hotel_aj.csr <- envelope(listings_hotel_aj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.2.6 Plot the Complete Spatial Randomness graph

plot(F_hotel_aj.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at roughly 180m to about 450m which is which is statistically significant. However, beyond 450m the black line is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb hotel room listing locations in Aljunied subzone area are randomly distributed.

7.7.2.7 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_private_aj = Fest(listings_private_aj_owin, correction="best")
plot(F_private_aj)

7.7.2.8 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_private_aj.csr <- envelope(listings_private_aj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.2.9 Plot the Complete Spatial Randomness graph

plot(F_private_aj.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 40m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.2.10 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_shared_aj = Fest(listings_shared_aj_owin, correction="best")
plot(F_shared_aj)

7.7.2.11 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_shared_aj.csr <- envelope(listings_shared_aj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.2.12 Plot the Complete Spatial Randomness graph

plot(F_shared_aj.csr)

Based on the CSR graph, the black line is close to the theoretical value and within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Aljunied subzone area are randomly distributed.

7.7.3 Balestier subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_bs = Fest(listings_bs_owin, correction="best")
plot(F_bs)

7.7.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_bs.csr <- envelope(listings_bs_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.3.2 Plot the Complete Spatial Randomness graph

plot(F_bs.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.4 Balestier subzone area for each room type

7.7.4.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_apt_bs = Fest(listings_apt_bs_owin, correction="best")
plot(F_apt_bs)

7.7.4.2 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_apt_bs.csr <- envelope(listings_apt_bs_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.4.3 Plot the Complete Spatial Randomness graph

plot(F_apt_aj.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 18m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire home/apt room listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.4.4 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_hotel_bs = Fest(listings_hotel_bs_owin, correction="best")
plot(F_hotel_bs)

7.7.4.5 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_hotel_bs.csr <- envelope(listings_hotel_bs_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.4.6 Plot the Complete Spatial Randomness graph

plot(F_hotel_bs.csr)

Based on the CSR graph, the black line is below the theoretical value and within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb hotel room listing locations in Balestier subzone area are randomly distributed.

7.7.4.7 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_private_bs = Fest(listings_private_bs_owin, correction="best")
plot(F_private_bs)

7.7.4.8 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_private_bs.csr <- envelope(listings_private_bs_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.4.9 Plot the Complete Spatial Randomness graph

plot(F_private_bs.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 70m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.4.10 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_shared_bs = Fest(listings_shared_bs_owin, correction="best")
plot(F_shared_bs)

7.7.4.11 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_shared_bs.csr <- envelope(listings_shared_bs_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.4.12 Plot the Complete Spatial Randomness graph

plot(F_shared_bs.csr)

Based on the CSR graph, the black line is above the theoretical value and within the randomization envelope which is not statistically significant. Although, beyond 920m the black line is under the theoretical value but still within the randomization envelope. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Balestier subzone area are randomly distributed.

7.7.5 Lavender subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_la = Fest(listings_la_owin, correction="best")
plot(F_la)

7.7.5.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_la.csr <- envelope(listings_la_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.5.2 Plot the Complete Spatial Randomness graph

plot(F_la.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.6 Lavender subzone area for each room type

7.7.6.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_apt_la = Fest(listings_apt_la_owin, correction="best")
plot(F_apt_la)

7.7.6.2 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_apt_la.csr <- envelope(listings_apt_la_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.6.3 Plot the Complete Spatial Randomness graph

plot(F_apt_la.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 30m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.6.4 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_hotel_la = Fest(listings_hotel_la_owin, correction="best")
plot(F_hotel_la)

7.7.6.5 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_hotel_la.csr <- envelope(listings_hotel_la_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.6.6 Plot the Complete Spatial Randomness graph

plot(F_hotel_la.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 60m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb hotel room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.6.7 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_private_la = Fest(listings_private_la_owin, correction="best")
plot(F_private_la)

7.7.6.8 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_private_la.csr <- envelope(listings_private_la_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.6.9 Plot the Complete Spatial Randomness graph

plot(F_private_la.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 20m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.6.10 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_shared_la = Fest(listings_shared_la_owin, correction="best")
plot(F_shared_la)

7.7.6.11 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_shared_la.csr <- envelope(listings_shared_la_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.6.12 Plot the Complete Spatial Randomness graph

plot(F_shared_la.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 100m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb shared room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.7 Tanjong Pagar subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_tj = Fest(listings_tj_owin, correction="best")
plot(F_tj)

7.7.7.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_tj.csr <- envelope(listings_tj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.7.2 Plot the Complete Spatial Randomness graph

plot(F_tj.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 13m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Tanjong Pagar subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.8 Tanjong Pagar subzone area for each room type

7.7.8.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_apt_tj = Fest(listings_apt_tj_owin, correction="best")
plot(F_apt_tj)

7.7.8.2 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_apt_tj.csr <- envelope(listings_apt_tj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.8.3 Plot the Complete Spatial Randomness graph

plot(F_apt_tj.csr)

Based on the CSR graph, the black line is below the theoretical value and randomization envelope at about 12m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Tanjong Pagar subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.7.8.4 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_hotel_tj = Fest(listings_hotel_tj_owin, correction="best")
plot(F_hotel_tj)

7.7.8.5 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_hotel_tj.csr <- envelope(listings_hotel_tj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.8.6 Plot the Complete Spatial Randomness graph

plot(F_hotel_tj.csr)

Based on the CSR graph, the black line is above the theoretical value and within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb hotel room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.7.8.7 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_private_tj = Fest(listings_private_tj_owin, correction="best")
plot(F_private_tj)

7.7.8.8 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

F_private_tj.csr <- envelope(listings_private_tj_owin, Fest, correction="best", nsim=999)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.

7.7.8.9 Plot the Complete Spatial Randomness graph

plot(F_private_tj.csr)

Based on the CSR graph, the black line is close to the theoretical value and within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb private room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.7.8.10 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

F_shared_tj = Fest(listings_shared_tj_owin, correction="best")
plot(F_shared_tj)

Based on the graph, the F value line is not being plot which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.8 Analyse spatial point process using K-function

7.8.1 Aljunied subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_aj = Kest(listings_aj_owin, correction="Ripley")
plot(K_aj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

K_aj.csr <- envelope(listings_aj_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 30:19] .........20 [etd 32:43] .........
## 30 [etd 32:55] .........40 [etd 31:35] .........50 [etd 30:40] ........
## .60 [etd 29:39] .........70 [etd 29:04] .........80 [etd 28:29] .......
## ..90 [etd 28:05] .........100 [etd 27:41] .........110 [etd 27:20] ......
## ...120 [etd 26:48] .........130 [etd 26:24] .........140 [etd 26:04] .....
## ....150 [etd 25:40] .........160 [etd 25:18] .........170 [etd 24:53] ....
## .....180 [etd 24:34] .........190 [etd 24:09] .........200 [etd 23:51] ...
## ......210 [etd 23:27] .........220 [etd 23:10] .........230 [etd 22:48] ..
## .......240 [etd 22:30] .........250 [etd 22:10] .........260 [etd 21:49] .
## ........270 [etd 21:32] .........280 [etd 21:14] .........290
##  [etd 20:57] .........300 [etd 20:42] .........310 [etd 20:28] .........
## 320 [etd 20:09] .........330 [etd 19:53] .........340 [etd 19:36] ........
## .350 [etd 19:18] .........360 [etd 19:01] .........370 [etd 18:42] .......
## ..380 [etd 18:26] .........390 [etd 18:08] .........400 [etd 17:49] ......
## ...410 [etd 17:30] .........420 [etd 17:12] .........430 [etd 16:53] .....
## ....440 [etd 16:35] .........450 [etd 16:19] .........460 [etd 16:02] ....
## .....470 [etd 15:45] .........480 [etd 15:27] .........490 [etd 15:08] ...
## ......500 [etd 14:51] .........510 [etd 14:33] .........520 [etd 14:16] ..
## .......530 [etd 13:58] .........540 [etd 13:42] .........550 [etd 13:23] .
## ........560 [etd 13:06] .........570 [etd 12:48] .........580
##  [etd 12:30] .........590 [etd 12:13] .........600 [etd 11:54] .........
## 610 [etd 11:37] .........620 [etd 11:20] .........630 [etd 11:08] ........
## .640 [etd 10:53] .........650 [etd 10:37] .........660 [etd 10:20] .......
## ..670 [etd 10:03] .........680 [etd 9:47] .........690 [etd 9:30] ......
## ...700 [etd 9:13] .........710 [etd 8:56] .........720 [etd 8:39] .....
## ....730 [etd 8:22] .........740 [etd 8:05] .........750 [etd 7:50] ....
## .....760 [etd 7:34] .........770 [etd 7:18] .........780 [etd 7:01] ...
## ......790 [etd 6:46] .........800 [etd 6:29] .........810 [etd 6:12] ..
## .......820 [etd 5:54] .........830 [etd 5:36] .........840 [etd 5:18] .
## ........850 [etd 4:59] .........860 [etd 4:40] .........870
##  [etd 4:21] .........880 [etd 4:02] .........890 [etd 3:43] .........
## 900 [etd 3:23] .........910 [etd 3:03] .........920 [etd 2:43] ........
## .930 [etd 2:23] .........940 [etd 2:03] .........950 [etd 1:42] .......
## ..960 [etd 1:22] .........970 [etd 1:01] .........980 [etd 40 sec] ......
## ...990 [etd 19 sec] ........ 999.
## 
## Done.

7.8.1.2 Plot the Complete Spatial Randomness graph

plot(K_aj.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, The CSR graph show clustering spatial points patterns.

7.8.2 Aljunied subzone area for each room type

7.8.2.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_apt_aj = Kest(listings_apt_aj_owin, correction="Ripley")
plot(K_apt_aj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.2.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_apt_aj.csr <- envelope(listings_apt_aj_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 23:40] .........20 [etd 22:54] .........
## 30 [etd 23:17] .........40 [etd 22:29] .........50 [etd 22:43] ........
## .60 [etd 22:14] .........70 [etd 22:11] .........80 [etd 21:48] .......
## ..90 [etd 21:19] .........100 [etd 21:12] .........110 [etd 20:45] ......
## ...120 [etd 20:37] .........130 [etd 20:24] .........140 [etd 20:12] .....
## ....150 [etd 20:14] .........160 [etd 20:17] .........170 [etd 20:12] ....
## .....180 [etd 20:05] .........190 [etd 19:45] .........200 [etd 19:26] ...
## ......210 [etd 19:17] .........220 [etd 18:56] .........230 [etd 18:47] ..
## .......240 [etd 18:26] .........250 [etd 18:16] .........260 [etd 17:56] .
## ........270 [etd 17:44] .........280 [etd 17:32] .........290
##  [etd 17:19] .........300 [etd 17:07] .........310 [etd 16:50] .........
## 320 [etd 16:39] .........330 [etd 16:24] .........340 [etd 16:03] ........
## .350 [etd 15:39] .........360 [etd 15:14] .........370 [etd 14:54] .......
## ..380 [etd 14:30] .........390 [etd 14:06] .........400 [etd 13:45] ......
## ...410 [etd 13:24] .........420 [etd 13:07] .........430 [etd 12:49] .....
## ....440 [etd 12:31] .........450 [etd 12:16] .........460 [etd 12:00] ....
## .....470 [etd 11:42] .........480 [etd 11:23] .........490 [etd 11:09] ...
## ......500 [etd 10:53] .........510 [etd 10:36] .........520 [etd 10:19] ..
## .......530 [etd 10:04] .........540 [etd 9:48] .........550 [etd 9:31] .
## ........560 [etd 9:15] .........570 [etd 9:01] .........580
##  [etd 8:45] .........590 [etd 8:30] .........600 [etd 8:16] .........
## 610 [etd 8:01] .........620 [etd 7:47] .........630 [etd 7:32] ........
## .640 [etd 7:19] .........650 [etd 7:04] .........660 [etd 6:51] .......
## ..670 [etd 6:37] .........680 [etd 6:24] .........690 [etd 6:10] ......
## ...700 [etd 5:57] .........710 [etd 5:44] .........720 [etd 5:31] .....
## ....730 [etd 5:19] .........740 [etd 5:06] .........750 [etd 4:53] ....
## .....760 [etd 4:41] .........770 [etd 4:28] .........780 [etd 4:16] ...
## ......790 [etd 4:03] .........800 [etd 3:51] .........810 [etd 3:39] ..
## .......820 [etd 3:26] .........830 [etd 3:14] .........840 [etd 3:02] .
## ........850 [etd 2:50] .........860 [etd 2:38] .........870
##  [etd 2:27] .........880 [etd 2:15] .........890 [etd 2:03] .........
## 900 [etd 1:52] .........910 [etd 1:40] .........920 [etd 1:29] ........
## .930 [etd 1:17] .........940 [etd 1:06] .........950 [etd 55 sec] .......
## ..960 [etd 43 sec] .........970 [etd 32 sec] .........980 [etd 21 sec] ......
## ...990 [etd 10 sec] ........ 999.
## 
## Done.
7.8.2.1.2 Plot the Complete Spatial Randomness graph
plot(K_apt_aj.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.2.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_hotel_aj = Kest(listings_hotel_aj_owin, correction="Ripley")
plot(K_hotel_aj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.2.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_hotel_aj.csr <- envelope(listings_hotel_aj_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.8.2.2.2 Plot the Complete Spatial Randomness graph
plot(K_hotel_aj.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb hotel room listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.2.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_private_aj = Kest(listings_private_aj_owin, correction="Ripley")
plot(K_private_aj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.2.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_private_aj.csr <- envelope(listings_private_aj_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 3:53] .........20 [etd 4:17] .........
## 30 [etd 3:45] .........40 [etd 3:28] .........50 [etd 3:23] ........
## .60 [etd 3:13] .........70 [etd 3:08] .........80 [etd 3:06] .......
## ..90 [etd 3:04] .........100 [etd 3:02] .........110 [etd 2:58] ......
## ...120 [etd 2:54] .........130 [etd 2:51] .........140 [etd 2:48] .....
## ....150 [etd 2:47] .........160 [etd 2:44] .........170 [etd 2:42] ....
## .....180 [etd 2:42] .........190 [etd 2:42] .........200 [etd 2:40] ...
## ......210 [etd 2:38] .........220 [etd 2:35] .........230 [etd 2:32] ..
## .......240 [etd 2:32] .........250 [etd 2:29] .........260 [etd 2:27] .
## ........270 [etd 2:25] .........280 [etd 2:23] .........290
##  [etd 2:21] .........300 [etd 2:19] .........310 [etd 2:16] .........
## 320 [etd 2:14] .........330 [etd 2:13] .........340 [etd 2:12] ........
## .350 [etd 2:10] .........360 [etd 2:08] .........370 [etd 2:06] .......
## ..380 [etd 2:04] .........390 [etd 2:02] .........400 [etd 1:59] ......
## ...410 [etd 1:58] .........420 [etd 1:55] .........430 [etd 1:53] .....
## ....440 [etd 1:51] .........450 [etd 1:49] .........460 [etd 1:47] ....
## .....470 [etd 1:45] .........480 [etd 1:43] .........490 [etd 1:41] ...
## ......500 [etd 1:39] .........510 [etd 1:38] .........520 [etd 1:36] ..
## .......530 [etd 1:33] .........540 [etd 1:31] .........550 [etd 1:30] .
## ........560 [etd 1:28] .........570 [etd 1:26] .........580
##  [etd 1:23] .........590 [etd 1:21] .........600 [etd 1:19] .........
## 610 [etd 1:17] .........620 [etd 1:15] .........630 [etd 1:13] ........
## .640 [etd 1:11] .........650 [etd 1:09] .........660 [etd 1:07] .......
## ..670 [etd 1:06] .........680 [etd 1:04] .........690 [etd 1:02] ......
## ...700 [etd 1:00] .........710 [etd 58 sec] .........720 [etd 56 sec] .....
## ....730 [etd 54 sec] .........740 [etd 52 sec] .........750 [etd 50 sec] ....
## .....760 [etd 48 sec] .........770 [etd 46 sec] .........780 [etd 44 sec] ...
## ......790 [etd 41 sec] .........800 [etd 39 sec] .........810 [etd 38 sec] ..
## .......820 [etd 36 sec] .........830 [etd 34 sec] .........840 [etd 32 sec] .
## ........850 [etd 30 sec] .........860 [etd 28 sec] .........870
##  [etd 26 sec] .........880 [etd 24 sec] .........890 [etd 22 sec] .........
## 900 [etd 20 sec] .........910 [etd 18 sec] .........920 [etd 16 sec] ........
## .930 [etd 14 sec] .........940 [etd 12 sec] .........950 [etd 10 sec] .......
## ..960 [etd 8 sec] .........970 [etd 6 sec] .........980 [etd 4 sec] ......
## ...990 [etd 2 sec] ........ 999.
## 
## Done.
7.8.2.3.2 Plot the Complete Spatial Randomness graph
plot(K_private_aj.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.2.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_shared_aj = Kest(listings_shared_aj_owin, correction="Ripley")
plot(K_shared_aj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.2.4.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_shared_aj.csr <- envelope(listings_shared_aj_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.8.2.4.2 Plot the Complete Spatial Randomness graph
plot(K_shared_aj.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value at roughly 270m but is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Aljunied subzone area are randomly distributed.

7.8.3 Balestier subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_bs = Kest(listings_bs_owin, correction="Ripley")
plot(K_bs, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

K_bs.csr <- envelope(listings_bs_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 4:59] .........20 [etd 5:02] .........
## 30 [etd 5:13] .........40 [etd 5:39] .........50 [etd 5:28] ........
## .60 [etd 5:24] .........70 [etd 5:19] .........80 [etd 5:16] .......
## ..90 [etd 5:10] .........100 [etd 5:06] .........110 [etd 5:02] ......
## ...120 [etd 4:57] .........130 [etd 5:00] .........140 [etd 4:59] .....
## ....150 [etd 4:55] .........160 [etd 4:53] .........170 [etd 4:49] ....
## .....180 [etd 4:44] .........190 [etd 4:39] .........200 [etd 4:35] ...
## ......210 [etd 4:31] .........220 [etd 4:31] .........230 [etd 4:27] ..
## .......240 [etd 4:25] .........250 [etd 4:22] .........260 [etd 4:19] .
## ........270 [etd 4:14] .........280 [etd 4:10] .........290
##  [etd 4:05] .........300 [etd 4:02] .........310 [etd 3:59] .........
## 320 [etd 3:56] .........330 [etd 3:52] .........340 [etd 3:49] ........
## .350 [etd 3:45] .........360 [etd 3:42] .........370 [etd 3:37] .......
## ..380 [etd 3:33] .........390 [etd 3:29] .........400 [etd 3:26] ......
## ...410 [etd 3:23] .........420 [etd 3:20] .........430 [etd 3:16] .....
## ....440 [etd 3:13] .........450 [etd 3:09] .........460 [etd 3:06] ....
## .....470 [etd 3:02] .........480 [etd 2:58] .........490 [etd 2:55] ...
## ......500 [etd 2:52] .........510 [etd 2:49] .........520 [etd 2:45] ..
## .......530 [etd 2:42] .........540 [etd 2:38] .........550 [etd 2:35] .
## ........560 [etd 2:31] .........570 [etd 2:27] .........580
##  [etd 2:24] .........590 [etd 2:20] .........600 [etd 2:17] .........
## 610 [etd 2:14] .........620 [etd 2:11] .........630 [etd 2:07] ........
## .640 [etd 2:04] .........650 [etd 2:01] .........660 [etd 1:57] .......
## ..670 [etd 1:53] .........680 [etd 1:50] .........690 [etd 1:47] ......
## ...700 [etd 1:44] .........710 [etd 1:40] .........720 [etd 1:37] .....
## ....730 [etd 1:33] .........740 [etd 1:30] .........750 [etd 1:26] ....
## .....760 [etd 1:23] .........770 [etd 1:19] .........780 [etd 1:16] ...
## ......790 [etd 1:13] .........800 [etd 1:09] .........810 [etd 1:06] ..
## .......820 [etd 1:02] .........830 [etd 59 sec] .........840 [etd 55 sec] .
## ........850 [etd 52 sec] .........860 [etd 48 sec] .........870
##  [etd 45 sec] .........880 [etd 42 sec] .........890 [etd 38 sec] .........
## 900 [etd 35 sec] .........910 [etd 31 sec] .........920 [etd 28 sec] ........
## .930 [etd 24 sec] .........940 [etd 21 sec] .........950 [etd 17 sec] .......
## ..960 [etd 14 sec] .........970 [etd 10 sec] .........980 [etd 7 sec] ......
## ...990 [etd 3 sec] ........ 999.
## 
## Done.

7.8.3.2 Plot the Complete Spatial Randomness graph

plot(K_bs.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.4 Balestier subzone area for each room type

7.8.4.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_apt_bs = Kest(listings_apt_bs_owin, correction="Ripley")
plot(K_apt_bs, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.4.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_apt_bs.csr <- envelope(listings_apt_bs_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 3:28] .........20 [etd 3:49] .........
## 30 [etd 3:41] .........40 [etd 3:40] .........50 [etd 3:34] ........
## .60 [etd 3:32] .........70 [etd 3:41] .........80 [etd 3:39] .......
## ..90 [etd 3:34] .........100 [etd 3:31] .........110 [etd 3:30] ......
## ...120 [etd 3:26] .........130 [etd 3:24] .........140 [etd 3:23] .....
## ....150 [etd 3:20] .........160 [etd 3:17] .........170 [etd 3:16] ....
## .....180 [etd 3:13] .........190 [etd 3:10] .........200 [etd 3:09] ...
## ......210 [etd 3:10] .........220 [etd 3:08] .........230 [etd 3:06] ..
## .......240 [etd 3:03] .........250 [etd 3:00] .........260 [etd 2:58] .
## ........270 [etd 2:55] .........280 [etd 2:52] .........290
##  [etd 2:50] .........300 [etd 2:47] .........310 [etd 2:44] .........
## 320 [etd 2:42] .........330 [etd 2:39] .........340 [etd 2:39] ........
## .350 [etd 2:37] .........360 [etd 2:34] .........370 [etd 2:32] .......
## ..380 [etd 2:29] .........390 [etd 2:26] .........400 [etd 2:24] ......
## ...410 [etd 2:22] .........420 [etd 2:20] .........430 [etd 2:17] .....
## ....440 [etd 2:14] .........450 [etd 2:12] .........460 [etd 2:09] ....
## .....470 [etd 2:08] .........480 [etd 2:06] .........490 [etd 2:03] ...
## ......500 [etd 2:01] .........510 [etd 1:58] .........520 [etd 1:56] ..
## .......530 [etd 1:53] .........540 [etd 1:51] .........550 [etd 1:48] .
## ........560 [etd 1:46] .........570 [etd 1:43] .........580
##  [etd 1:41] .........590 [etd 1:38] .........600 [etd 1:36] .........
## 610 [etd 1:34] .........620 [etd 1:32] .........630 [etd 1:29] ........
## .640 [etd 1:27] .........650 [etd 1:24] .........660 [etd 1:22] .......
## ..670 [etd 1:20] .........680 [etd 1:17] .........690 [etd 1:15] ......
## ...700 [etd 1:12] .........710 [etd 1:10] .........720 [etd 1:07] .....
## ....730 [etd 1:05] .........740 [etd 1:03] .........750 [etd 1:00] ....
## .....760 [etd 58 sec] .........770 [etd 56 sec] .........780 [etd 53 sec] ...
## ......790 [etd 51 sec] .........800 [etd 48 sec] .........810 [etd 46 sec] ..
## .......820 [etd 43 sec] .........830 [etd 41 sec] .........840 [etd 38 sec] .
## ........850 [etd 36 sec] .........860 [etd 34 sec] .........870
##  [etd 31 sec] .........880 [etd 29 sec] .........890 [etd 27 sec] .........
## 900 [etd 24 sec] .........910 [etd 22 sec] .........920 [etd 19 sec] ........
## .930 [etd 17 sec] .........940 [etd 14 sec] .........950 [etd 12 sec] .......
## ..960 [etd 9 sec] .........970 [etd 7 sec] .........980 [etd 5 sec] ......
## ...990 [etd 2 sec] ........ 999.
## 
## Done.
7.8.4.1.2 Plot the Complete Spatial Randomness graph
plot(K_apt_bs.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.4.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_hotel_bs = Kest(listings_hotel_bs_owin, correction="Ripley")
plot(K_hotel_bs, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.4.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_hotel_bs.csr <- envelope(listings_hotel_bs_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.8.4.2.2 Plot the Complete Spatial Randomness graph
plot(K_hotel_bs.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb hotel room listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.4.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_private_bs = Kest(listings_private_bs_owin, correction="Ripley")
plot(K_private_bs, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.4.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_private_bs.csr <- envelope(listings_private_bs_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 1:55] .........20 [etd 1:36] .........
## 30 [etd 1:30] .........40 [etd 1:28] .........50 [etd 1:23] ........
## .60 [etd 1:25] .........70 [etd 1:22] .........80 [etd 1:20] .......
## ..90 [etd 1:18] .........100 [etd 1:18] .........110 [etd 1:18] ......
## ...120 [etd 1:16] .........130 [etd 1:20] .........140 [etd 1:20] .....
## ....150 [etd 1:18] .........160 [etd 1:19] .........170 [etd 1:17] ....
## .....180 [etd 1:15] .........190 [etd 1:13] .........200 [etd 1:12] ...
## ......210 [etd 1:11] .........220 [etd 1:09] .........230 [etd 1:08] ..
## .......240 [etd 1:06] .........250 [etd 1:05] .........260 [etd 1:04] .
## ........270 [etd 1:03] .........280 [etd 1:01] .........290
##  [etd 1:00] .........300 [etd 59 sec] .........310 [etd 59 sec] .........
## 320 [etd 57 sec] .........330 [etd 56 sec] .........340 [etd 55 sec] ........
## .350 [etd 54 sec] .........360 [etd 53 sec] .........370 [etd 53 sec] .......
## ..380 [etd 52 sec] .........390 [etd 51 sec] .........400 [etd 50 sec] ......
## ...410 [etd 49 sec] .........420 [etd 48 sec] .........430 [etd 47 sec] .....
## ....440 [etd 46 sec] .........450 [etd 45 sec] .........460 [etd 44 sec] ....
## .....470 [etd 43 sec] .........480 [etd 42 sec] .........490 [etd 41 sec] ...
## ......500 [etd 41 sec] .........510 [etd 40 sec] .........520 [etd 39 sec] ..
## .......530 [etd 39 sec] .........540 [etd 39 sec] .........550 [etd 38 sec] .
## ........560 [etd 37 sec] .........570 [etd 36 sec] .........580
##  [etd 35 sec] .........590 [etd 35 sec] .........600 [etd 34 sec] .........
## 610 [etd 33 sec] .........620 [etd 32 sec] .........630 [etd 31 sec] ........
## .640 [etd 30 sec] .........650 [etd 29 sec] .........660 [etd 28 sec] .......
## ..670 [etd 27 sec] .........680 [etd 27 sec] .........690 [etd 26 sec] ......
## ...700 [etd 25 sec] .........710 [etd 24 sec] .........720 [etd 23 sec] .....
## ....730 [etd 22 sec] .........740 [etd 21 sec] .........750 [etd 21 sec] ....
## .....760 [etd 20 sec] .........770 [etd 19 sec] .........780 [etd 18 sec] ...
## ......790 [etd 17 sec] .........800 [etd 16 sec] .........810 [etd 16 sec] ..
## .......820 [etd 15 sec] .........830 [etd 14 sec] .........840 [etd 13 sec] .
## ........850 [etd 12 sec] .........860 [etd 11 sec] .........870
##  [etd 11 sec] .........880 [etd 10 sec] .........890 [etd 9 sec] .........
## 900 [etd 8 sec] .........910 [etd 7 sec] .........920 [etd 7 sec] ........
## .930 [etd 6 sec] .........940 [etd 5 sec] .........950 [etd 4 sec] .......
## ..960 [etd 3 sec] .........970 [etd 2 sec] .........980 [etd 2 sec] ......
## ...990 [etd 1 sec] ........ 999.
## 
## Done.
7.8.4.3.2 Plot the Complete Spatial Randomness graph
plot(K_private_bs.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.4.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_shared_bs = Kest(listings_shared_bs_owin, correction="Ripley")
plot(K_shared_bs, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

Based on the graph, the K value line is not being plot which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Balestier subzone area are randomly distributed.

7.8.5 Lavender subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_la = Kest(listings_la_owin, correction="Ripley")
plot(K_la, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.5.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

K_la.csr <- envelope(listings_la_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 9:57] .........20 [etd 10:26] .........
## 30 [etd 10:13] .........40 [etd 10:37] .........50 [etd 10:17] ........
## .60 [etd 10:01] .........70 [etd 9:53] .........80 [etd 9:45] .......
## ..90 [etd 9:50] .........100 [etd 9:39] .........110 [etd 9:29] ......
## ...120 [etd 9:27] .........130 [etd 9:19] .........140 [etd 9:20] .....
## ....150 [etd 9:10] .........160 [etd 9:04] .........170 [etd 8:56] ....
## .....180 [etd 9:01] .........190 [etd 9:08] .........200 [etd 9:11] ...
## ......210 [etd 9:15] .........220 [etd 9:15] .........230 [etd 9:14] ..
## .......240 [etd 9:09] .........250 [etd 9:03] .........260 [etd 9:02] .
## ........270 [etd 8:55] .........280 [etd 8:48] .........290
##  [etd 8:41] .........300 [etd 8:36] .........310 [etd 8:31] .........
## 320 [etd 8:25] .........330 [etd 8:19] .........340 [etd 8:15] ........
## .350 [etd 8:07] .........360 [etd 7:59] .........370 [etd 7:51] .......
## ..380 [etd 7:46] .........390 [etd 7:39] .........400 [etd 7:32] ......
## ...410 [etd 7:24] .........420 [etd 7:17] .........430 [etd 7:09] .....
## ....440 [etd 7:01] .........450 [etd 6:56] .........460 [etd 6:55] ....
## .....470 [etd 6:48] .........480 [etd 6:39] .........490 [etd 6:32] ...
## ......500 [etd 6:25] .........510 [etd 6:18] .........520 [etd 6:09] ..
## .......530 [etd 6:03] .........540 [etd 5:56] .........550 [etd 5:48] .
## ........560 [etd 5:39] .........570 [etd 5:31] .........580
##  [etd 5:23] .........590 [etd 5:15] .........600 [etd 5:06] .........
## 610 [etd 4:58] .........620 [etd 4:51] .........630 [etd 4:43] ........
## .640 [etd 4:34] .........650 [etd 4:26] .........660 [etd 4:18] .......
## ..670 [etd 4:10] .........680 [etd 4:02] .........690 [etd 3:54] ......
## ...700 [etd 3:46] .........710 [etd 3:39] .........720 [etd 3:31] .....
## ....730 [etd 3:24] .........740 [etd 3:16] .........750 [etd 3:11] ....
## .....760 [etd 3:03] .........770 [etd 2:56] .........780 [etd 2:48] ...
## ......790 [etd 2:41] .........800 [etd 2:33] .........810 [etd 2:25] ..
## .......820 [etd 2:18] .........830 [etd 2:10] .........840 [etd 2:03] .
## ........850 [etd 1:55] .........860 [etd 1:47] .........870
##  [etd 1:39] .........880 [etd 1:32] .........890 [etd 1:24] .........
## 900 [etd 1:16] .........910 [etd 1:09] .........920 [etd 1:01] ........
## .930 [etd 53 sec] .........940 [etd 45 sec] .........950 [etd 38 sec] .......
## ..960 [etd 30 sec] .........970 [etd 22 sec] .........980 [etd 15 sec] ......
## ...990 [etd 7 sec] ........ 999.
## 
## Done.

7.8.5.2 Plot the Complete Spatial Randomness graph

plot(K_la.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.6 Lavender subzone area for each room type

7.8.6.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_apt_la = Kest(listings_apt_la_owin, correction="Ripley")
plot(K_apt_la, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.6.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_apt_la.csr <- envelope(listings_apt_la_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 2:20] .........20 [etd 2:03] .........
## 30 [etd 2:03] .........40 [etd 1:55] .........50 [etd 1:51] ........
## .60 [etd 1:47] .........70 [etd 1:45] .........80 [etd 1:42] .......
## ..90 [etd 1:39] .........100 [etd 1:41] .........110 [etd 1:38] ......
## ...120 [etd 1:36] .........130 [etd 1:35] .........140 [etd 1:34] .....
## ....150 [etd 1:34] .........160 [etd 1:32] .........170 [etd 1:30] ....
## .....180 [etd 1:29] .........190 [etd 1:28] .........200 [etd 1:29] ...
## ......210 [etd 1:29] .........220 [etd 1:32] .........230 [etd 1:32] ..
## .......240 [etd 1:30] .........250 [etd 1:28] .........260 [etd 1:27] .
## ........270 [etd 1:25] .........280 [etd 1:25] .........290
##  [etd 1:23] .........300 [etd 1:22] .........310 [etd 1:21] .........
## 320 [etd 1:20] .........330 [etd 1:18] .........340 [etd 1:17] ........
## .350 [etd 1:15] .........360 [etd 1:14] .........370 [etd 1:12] .......
## ..380 [etd 1:11] .........390 [etd 1:10] .........400 [etd 1:09] ......
## ...410 [etd 1:07] .........420 [etd 1:06] .........430 [etd 1:05] .....
## ....440 [etd 1:04] .........450 [etd 1:03] .........460 [etd 1:02] ....
## .....470 [etd 1:01] .........480 [etd 1:00] .........490 [etd 59 sec] ...
## ......500 [etd 58 sec] .........510 [etd 57 sec] .........520 [etd 55 sec] ..
## .......530 [etd 54 sec] .........540 [etd 53 sec] .........550 [etd 52 sec] .
## ........560 [etd 51 sec] .........570 [etd 50 sec] .........580
##  [etd 49 sec] .........590 [etd 47 sec] .........600 [etd 46 sec] .........
## 610 [etd 45 sec] .........620 [etd 44 sec] .........630 [etd 42 sec] ........
## .640 [etd 41 sec] .........650 [etd 40 sec] .........660 [etd 39 sec] .......
## ..670 [etd 38 sec] .........680 [etd 36 sec] .........690 [etd 35 sec] ......
## ...700 [etd 34 sec] .........710 [etd 33 sec] .........720 [etd 32 sec] .....
## ....730 [etd 31 sec] .........740 [etd 29 sec] .........750 [etd 28 sec] ....
## .....760 [etd 27 sec] .........770 [etd 26 sec] .........780 [etd 25 sec] ...
## ......790 [etd 24 sec] .........800 [etd 23 sec] .........810 [etd 22 sec] ..
## .......820 [etd 20 sec] .........830 [etd 19 sec] .........840 [etd 18 sec] .
## ........850 [etd 17 sec] .........860 [etd 16 sec] .........870
##  [etd 15 sec] .........880 [etd 14 sec] .........890 [etd 12 sec] .........
## 900 [etd 11 sec] .........910 [etd 10 sec] .........920 [etd 9 sec] ........
## .930 [etd 8 sec] .........940 [etd 7 sec] .........950 [etd 6 sec] .......
## ..960 [etd 4 sec] .........970 [etd 3 sec] .........980 [etd 2 sec] ......
## ...990 [etd 1 sec] ........ 999.
## 
## Done.
7.8.6.1.2 Plot the Complete Spatial Randomness graph
plot(K_apt_la.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.6.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_hotel_la = Kest(listings_hotel_la_owin, correction="Ripley")
plot(K_hotel_la, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.6.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_hotel_la.csr <- envelope(listings_hotel_la_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 1:52] .........20 [etd 1:30] .........
## 30 [etd 1:22] .........40 [etd 1:24] .........50 [etd 1:25] ........
## .60 [etd 1:27] .........70 [etd 1:33] .........80 [etd 1:34] .......
## ..90 [etd 1:34] .........100 [etd 1:31] .........110 [etd 1:29] ......
## ...120 [etd 1:28] .........130 [etd 1:25] .........140 [etd 1:23] .....
## ....150 [etd 1:21] .........160 [etd 1:19] .........170 [etd 1:17] ....
## .....180 [etd 1:16] .........190 [etd 1:15] .........200 [etd 1:14] ...
## ......210 [etd 1:12] .........220 [etd 1:10] .........230 [etd 1:09] ..
## .......240 [etd 1:08] .........250 [etd 1:06] .........260 [etd 1:05] .
## ........270 [etd 1:03] .........280 [etd 1:02] .........290
##  [etd 1:01] .........300 [etd 1:00] .........310 [etd 59 sec] .........
## 320 [etd 58 sec] .........330 [etd 57 sec] .........340 [etd 55 sec] ........
## .350 [etd 54 sec] .........360 [etd 53 sec] .........370 [etd 52 sec] .......
## ..380 [etd 51 sec] .........390 [etd 51 sec] .........400 [etd 50 sec] ......
## ...410 [etd 49 sec] .........420 [etd 48 sec] .........430 [etd 47 sec] .....
## ....440 [etd 46 sec] .........450 [etd 46 sec] .........460 [etd 45 sec] ....
## .....470 [etd 45 sec] .........480 [etd 44 sec] .........490 [etd 43 sec] ...
## ......500 [etd 42 sec] .........510 [etd 41 sec] .........520 [etd 40 sec] ..
## .......530 [etd 39 sec] .........540 [etd 39 sec] .........550 [etd 38 sec] .
## ........560 [etd 37 sec] .........570 [etd 36 sec] .........580
##  [etd 35 sec] .........590 [etd 34 sec] .........600 [etd 33 sec] .........
## 610 [etd 32 sec] .........620 [etd 32 sec] .........630 [etd 31 sec] ........
## .640 [etd 30 sec] .........650 [etd 29 sec] .........660 [etd 28 sec] .......
## ..670 [etd 27 sec] .........680 [etd 26 sec] .........690 [etd 25 sec] ......
## ...700 [etd 24 sec] .........710 [etd 24 sec] .........720 [etd 23 sec] .....
## ....730 [etd 22 sec] .........740 [etd 21 sec] .........750 [etd 20 sec] ....
## .....760 [etd 20 sec] .........770 [etd 19 sec] .........780 [etd 18 sec] ...
## ......790 [etd 17 sec] .........800 [etd 16 sec] .........810 [etd 15 sec] ..
## .......820 [etd 15 sec] .........830 [etd 14 sec] .........840 [etd 13 sec] .
## ........850 [etd 12 sec] .........860 [etd 12 sec] .........870
##  [etd 11 sec] .........880 [etd 10 sec] .........890 [etd 9 sec] .........
## 900 [etd 8 sec] .........910 [etd 7 sec] .........920 [etd 7 sec] ........
## .930 [etd 6 sec] .........940 [etd 5 sec] .........950 [etd 4 sec] .......
## ..960 [etd 3 sec] .........970 [etd 2 sec] .........980 [etd 2 sec] ......
## ...990 [etd 1 sec] ........ 999.
## 
## Done.
7.8.6.2.2 Plot the Complete Spatial Randomness graph
plot(K_hotel_la.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb hotel room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.6.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_private_la = Kest(listings_private_la_owin, correction="Ripley")
plot(K_private_la, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.6.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_private_la.csr <- envelope(listings_private_la_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 4:14] .........20 [etd 4:18] .........
## 30 [etd 4:09] .........40 [etd 4:05] .........50 [etd 3:58] ........
## .60 [etd 4:01] .........70 [etd 4:06] .........80 [etd 4:08] .......
## ..90 [etd 4:05] .........100 [etd 4:03] .........110 [etd 3:59] ......
## ...120 [etd 3:55] .........130 [etd 3:53] .........140 [etd 3:49] .....
## ....150 [etd 3:44] .........160 [etd 3:40] .........170 [etd 3:37] ....
## .....180 [etd 3:34] .........190 [etd 3:33] .........200 [etd 3:34] ...
## ......210 [etd 3:31] .........220 [etd 3:27] .........230 [etd 3:24] ..
## .......240 [etd 3:24] .........250 [etd 3:20] .........260 [etd 3:17] .
## ........270 [etd 3:14] .........280 [etd 3:11] .........290
##  [etd 3:08] .........300 [etd 3:05] .........310 [etd 3:04] .........
## 320 [etd 3:02] .........330 [etd 2:59] .........340 [etd 2:56] ........
## .350 [etd 2:54] .........360 [etd 2:51] .........370 [etd 2:48] .......
## ..380 [etd 2:46] .........390 [etd 2:43] .........400 [etd 2:40] ......
## ...410 [etd 2:38] .........420 [etd 2:36] .........430 [etd 2:33] .....
## ....440 [etd 2:31] .........450 [etd 2:30] .........460 [etd 2:28] ....
## .....470 [etd 2:27] .........480 [etd 2:25] .........490 [etd 2:22] ...
## ......500 [etd 2:20] .........510 [etd 2:17] .........520 [etd 2:15] ..
## .......530 [etd 2:14] .........540 [etd 2:11] .........550 [etd 2:08] .
## ........560 [etd 2:07] .........570 [etd 2:03] .........580
##  [etd 2:00] .........590 [etd 1:57] .........600 [etd 1:54] .........
## 610 [etd 1:51] .........620 [etd 1:48] .........630 [etd 1:45] ........
## .640 [etd 1:42] .........650 [etd 1:40] .........660 [etd 1:37] .......
## ..670 [etd 1:34] .........680 [etd 1:31] .........690 [etd 1:28] ......
## ...700 [etd 1:25] .........710 [etd 1:22] .........720 [etd 1:19] .....
## ....730 [etd 1:16] .........740 [etd 1:13] .........750 [etd 1:11] ....
## .....760 [etd 1:08] .........770 [etd 1:05] .........780 [etd 1:02] ...
## ......790 [etd 59 sec] .........800 [etd 56 sec] .........810 [etd 53 sec] ..
## .......820 [etd 50 sec] .........830 [etd 47 sec] .........840 [etd 45 sec] .
## ........850 [etd 42 sec] .........860 [etd 39 sec] .........870
##  [etd 36 sec] .........880 [etd 33 sec] .........890 [etd 31 sec] .........
## 900 [etd 28 sec] .........910 [etd 25 sec] .........920 [etd 22 sec] ........
## .930 [etd 19 sec] .........940 [etd 16 sec] .........950 [etd 14 sec] .......
## ..960 [etd 11 sec] .........970 [etd 8 sec] .........980 [etd 5 sec] ......
## ...990 [etd 3 sec] ........ 999.
## 
## Done.
7.8.6.3.2 Plot the Complete Spatial Randomness graph
plot(K_private_la.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.6.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_shared_la = Kest(listings_shared_la_owin, correction="Ripley")
plot(K_shared_la, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.6.4.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_shared_la.csr <- envelope(listings_shared_la_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.8.6.4.2 Plot the Complete Spatial Randomness graph
plot(K_shared_la.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb shared room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.7 Tanjong Pagar subzone area for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_tj = Kest(listings_tj_owin, correction="Ripley")
plot(K_tj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.7.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

K_tj.csr <- envelope(listings_tj_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 2:29] .........20 [etd 2:23] .........
## 30 [etd 2:23] .........40 [etd 2:25] .........50 [etd 2:29] ........
## .60 [etd 2:39] .........70 [etd 2:43] .........80 [etd 2:40] .......
## ..90 [etd 2:37] .........100 [etd 2:36] .........110 [etd 2:43] ......
## ...120 [etd 2:46] .........130 [etd 2:43] .........140 [etd 2:45] .....
## ....150 [etd 2:41] .........160 [etd 2:37] .........170 [etd 2:33] ....
## .....180 [etd 2:30] .........190 [etd 2:28] .........200 [etd 2:27] ...
## ......210 [etd 2:25] .........220 [etd 2:26] .........230 [etd 2:25] ..
## .......240 [etd 2:22] .........250 [etd 2:19] .........260 [etd 2:16] .
## ........270 [etd 2:14] .........280 [etd 2:11] .........290
##  [etd 2:09] .........300 [etd 2:06] .........310 [etd 2:03] .........
## 320 [etd 2:01] .........330 [etd 1:59] .........340 [etd 1:57] ........
## .350 [etd 1:55] .........360 [etd 1:53] .........370 [etd 1:50] .......
## ..380 [etd 1:48] .........390 [etd 1:45] .........400 [etd 1:43] ......
## ...410 [etd 1:42] .........420 [etd 1:40] .........430 [etd 1:39] .....
## ....440 [etd 1:37] .........450 [etd 1:36] .........460 [etd 1:34] ....
## .....470 [etd 1:32] .........480 [etd 1:30] .........490 [etd 1:28] ...
## ......500 [etd 1:26] .........510 [etd 1:24] .........520 [etd 1:22] ..
## .......530 [etd 1:20] .........540 [etd 1:18] .........550 [etd 1:16] .
## ........560 [etd 1:14] .........570 [etd 1:12] .........580
##  [etd 1:10] .........590 [etd 1:09] .........600 [etd 1:07] .........
## 610 [etd 1:05] .........620 [etd 1:04] .........630 [etd 1:02] ........
## .640 [etd 1:01] .........650 [etd 59 sec] .........660 [etd 57 sec] .......
## ..670 [etd 55 sec] .........680 [etd 53 sec] .........690 [etd 52 sec] ......
## ...700 [etd 50 sec] .........710 [etd 48 sec] .........720 [etd 46 sec] .....
## ....730 [etd 45 sec] .........740 [etd 43 sec] .........750 [etd 41 sec] ....
## .....760 [etd 39 sec] .........770 [etd 38 sec] .........780 [etd 36 sec] ...
## ......790 [etd 34 sec] .........800 [etd 33 sec] .........810 [etd 31 sec] ..
## .......820 [etd 29 sec] .........830 [etd 28 sec] .........840 [etd 26 sec] .
## ........850 [etd 24 sec] .........860 [etd 23 sec] .........870
##  [etd 21 sec] .........880 [etd 20 sec] .........890 [etd 18 sec] .........
## 900 [etd 16 sec] .........910 [etd 15 sec] .........920 [etd 13 sec] ........
## .930 [etd 11 sec] .........940 [etd 10 sec] .........950 [etd 8 sec] .......
## ..960 [etd 6 sec] .........970 [etd 5 sec] .........980 [etd 3 sec] ......
## ...990 [etd 1 sec] ........ 999.
## 
## Done.

7.8.7.2 Plot the Complete Spatial Randomness graph

plot(K_tj.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Tanjong Pagar subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.8 Tanjong Pagar subzone area for each room type

7.8.8.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_apt_tj = Kest(listings_apt_tj_owin, correction="Ripley")
plot(K_apt_tj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.8.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_apt_tj.csr <- envelope(listings_apt_tj_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 2:27] .........20 [etd 2:38] .........
## 30 [etd 2:29] .........40 [etd 2:42] .........50 [etd 2:42] ........
## .60 [etd 2:40] .........70 [etd 2:32] .........80 [etd 2:26] .......
## ..90 [etd 2:20] .........100 [etd 2:15] .........110 [etd 2:14] ......
## ...120 [etd 2:13] .........130 [etd 2:14] .........140 [etd 2:10] .....
## ....150 [etd 2:06] .........160 [etd 2:03] .........170 [etd 1:59] ....
## .....180 [etd 1:58] .........190 [etd 1:55] .........200 [etd 1:53] ...
## ......210 [etd 1:50] .........220 [etd 1:48] .........230 [etd 1:46] ..
## .......240 [etd 1:45] .........250 [etd 1:43] .........260 [etd 1:42] .
## ........270 [etd 1:41] .........280 [etd 1:41] .........290
##  [etd 1:39] .........300 [etd 1:38] .........310 [etd 1:36] .........
## 320 [etd 1:34] .........330 [etd 1:32] .........340 [etd 1:31] ........
## .350 [etd 1:30] .........360 [etd 1:28] .........370 [etd 1:26] .......
## ..380 [etd 1:25] .........390 [etd 1:23] .........400 [etd 1:22] ......
## ...410 [etd 1:20] .........420 [etd 1:18] .........430 [etd 1:17] .....
## ....440 [etd 1:15] .........450 [etd 1:14] .........460 [etd 1:12] ....
## .....470 [etd 1:11] .........480 [etd 1:09] .........490 [etd 1:08] ...
## ......500 [etd 1:06] .........510 [etd 1:05] .........520 [etd 1:04] ..
## .......530 [etd 1:03] .........540 [etd 1:02] .........550 [etd 1:00] .
## ........560 [etd 59 sec] .........570 [etd 57 sec] .........580
##  [etd 56 sec] .........590 [etd 54 sec] .........600 [etd 53 sec] .........
## 610 [etd 51 sec] .........620 [etd 50 sec] .........630 [etd 49 sec] ........
## .640 [etd 47 sec] .........650 [etd 46 sec] .........660 [etd 44 sec] .......
## ..670 [etd 43 sec] .........680 [etd 42 sec] .........690 [etd 41 sec] ......
## ...700 [etd 39 sec] .........710 [etd 38 sec] .........720 [etd 36 sec] .....
## ....730 [etd 35 sec] .........740 [etd 34 sec] .........750 [etd 32 sec] ....
## .....760 [etd 31 sec] .........770 [etd 30 sec] .........780 [etd 29 sec] ...
## ......790 [etd 27 sec] .........800 [etd 26 sec] .........810 [etd 25 sec] ..
## .......820 [etd 23 sec] .........830 [etd 22 sec] .........840 [etd 21 sec] .
## ........850 [etd 19 sec] .........860 [etd 18 sec] .........870
##  [etd 17 sec] .........880 [etd 15 sec] .........890 [etd 14 sec] .........
## 900 [etd 13 sec] .........910 [etd 12 sec] .........920 [etd 10 sec] ........
## .930 [etd 9 sec] .........940 [etd 8 sec] .........950 [etd 6 sec] .......
## ..960 [etd 5 sec] .........970 [etd 4 sec] .........980 [etd 2 sec] ......
## ...990 [etd 1 sec] ........ 999.
## 
## Done.
7.8.8.1.2 Plot the Complete Spatial Randomness graph
plot(K_apt_tj.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Tanjong Pagar subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.8.8.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_hotel_tj = Kest(listings_hotel_tj_owin, correction="Ripley")
plot(K_hotel_tj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

Based on the graph, the K value line is flat at 0 which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb hotel room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.8.8.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_private_tj = Kest(listings_private_tj_owin, correction="Ripley")
plot(K_private_tj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

7.8.8.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns
K_private_tj.csr <- envelope(listings_private_tj_owin, Kest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 2:33] .........20 [etd 1:59] .........
## 30 [etd 2:16] .........40 [etd 2:14] .........50 [etd 2:09] ........
## .60 [etd 1:56] .........70 [etd 1:49] .........80 [etd 1:45] .......
## ..90 [etd 1:40] .........100 [etd 1:38] .........110 [etd 1:33] ......
## ...120 [etd 1:31] .........130 [etd 1:28] .........140 [etd 1:25] .....
## ....150 [etd 1:22] .........160 [etd 1:21] .........170 [etd 1:19] ....
## .....180 [etd 1:17] .........190 [etd 1:15] .........200 [etd 1:13] ...
## ......210 [etd 1:11] .........220 [etd 1:10] .........230 [etd 1:09] ..
## .......240 [etd 1:07] .........250 [etd 1:06] .........260 [etd 1:04] .
## ........270 [etd 1:04] .........280 [etd 1:02] .........290
##  [etd 1:01] .........300 [etd 1:00] .........310 [etd 59 sec] .........
## 320 [etd 58 sec] .........330 [etd 56 sec] .........340 [etd 55 sec] ........
## .350 [etd 54 sec] .........360 [etd 53 sec] .........370 [etd 52 sec] .......
## ..380 [etd 51 sec] .........390 [etd 50 sec] .........400 [etd 50 sec] ......
## ...410 [etd 49 sec] .........420 [etd 50 sec] .........430 [etd 49 sec] .....
## ....440 [etd 48 sec] .........450 [etd 47 sec] .........460 [etd 46 sec] ....
## .....470 [etd 45 sec] .........480 [etd 44 sec] .........490 [etd 43 sec] ...
## ......500 [etd 42 sec] .........510 [etd 41 sec] .........520 [etd 40 sec] ..
## .......530 [etd 39 sec] .........540 [etd 38 sec] .........550 [etd 37 sec] .
## ........560 [etd 36 sec] .........570 [etd 35 sec] .........580
##  [etd 34 sec] .........590 [etd 33 sec] .........600 [etd 33 sec] .........
## 610 [etd 32 sec] .........620 [etd 31 sec] .........630 [etd 30 sec] ........
## .640 [etd 29 sec] .........650 [etd 28 sec] .........660 [etd 27 sec] .......
## ..670 [etd 26 sec] .........680 [etd 26 sec] .........690 [etd 25 sec] ......
## ...700 [etd 24 sec] .........710 [etd 23 sec] .........720 [etd 22 sec] .....
## ....730 [etd 21 sec] .........740 [etd 21 sec] .........750 [etd 20 sec] ....
## .....760 [etd 19 sec] .........770 [etd 18 sec] .........780 [etd 17 sec] ...
## ......790 [etd 16 sec] .........800 [etd 16 sec] .........810 [etd 15 sec] ..
## .......820 [etd 14 sec] .........830 [etd 13 sec] .........840 [etd 13 sec] .
## ........850 [etd 12 sec] .........860 [etd 11 sec] .........870
##  [etd 10 sec] .........880 [etd 10 sec] .........890 [etd 9 sec] .........
## 900 [etd 8 sec] .........910 [etd 7 sec] .........920 [etd 6 sec] ........
## .930 [etd 6 sec] .........940 [etd 5 sec] .........950 [etd 4 sec] .......
## ..960 [etd 3 sec] .........970 [etd 2 sec] .........980 [etd 2 sec] ......
## ...990 [etd 1 sec] ........ 999.
## 
## Done.
7.8.8.3.2 Plot the Complete Spatial Randomness graph
plot(K_private_tj.csr, . - r ~ r, xlab="d", ylab="K(d)-r")

Based on the CSR graph, the black line is above the theoretical value and within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb private room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.8.8.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

K_shared_tj = Kest(listings_shared_tj_owin, correction="Ripley")
plot(K_shared_tj, . -r ~ r, ylab="K(d)-r", xlab="d(m)")

Based on the graph, the K value line is not being plot which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Tanjong Pajar subzone area are randomly distributed.

7.9 Analyse spatial point process using L-function

7.9.1 Aljunied planning subzone for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_aj = Lest(listings_aj_owin, correction="Ripley")
plot(L_aj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_aj.csr <- envelope(listings_aj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 31:17] .........20 [etd 29:48] .........
## 30 [etd 29:11] .........40 [etd 28:43] .........50 [etd 28:18] ........
## .60 [etd 27:31] .........70 [etd 27:14] .........80 [etd 26:42] .......
## ..90 [etd 26:25] .........100 [etd 26:09] .........110 [etd 25:53] ......
## ...120 [etd 25:38] .........130 [etd 25:17] .........140 [etd 25:08] .....
## ....150 [etd 24:51] .........160 [etd 24:35] .........170 [etd 24:13] ....
## .....180 [etd 24:01] .........190 [etd 23:43] .........200 [etd 23:19] ...
## ......210 [etd 23:23] .........220 [etd 23:09] .........230 [etd 23:01] ..
## .......240 [etd 22:53] .........250 [etd 22:39] .........260 [etd 22:27] .
## ........270 [etd 22:10] .........280 [etd 21:59] .........290
##  [etd 21:45] .........300 [etd 21:24] .........310 [etd 21:06] .........
## 320 [etd 20:44] .........330 [etd 20:24] .........340 [etd 20:04] ........
## .350 [etd 19:44] .........360 [etd 19:25] .........370 [etd 19:06] .......
## ..380 [etd 18:46] .........390 [etd 18:27] .........400 [etd 18:11] ......
## ...410 [etd 17:50] .........420 [etd 17:31] .........430 [etd 17:11] .....
## ....440 [etd 16:51] .........450 [etd 16:31] .........460 [etd 16:13] ....
## .....470 [etd 15:53] .........480 [etd 15:37] .........490 [etd 15:18] ...
## ......500 [etd 14:58] .........510 [etd 14:42] .........520 [etd 14:26] ..
## .......530 [etd 14:08] .........540 [etd 13:50] .........550 [etd 13:31] .
## ........560 [etd 13:13] .........570 [etd 12:54] .........580
##  [etd 12:35] .........590 [etd 12:17] .........600 [etd 11:58] .........
## 610 [etd 11:39] .........620 [etd 11:22] .........630 [etd 11:03] ........
## .640 [etd 10:45] .........650 [etd 10:26] .........660 [etd 10:08] .......
## ..670 [etd 9:49] .........680 [etd 9:31] .........690 [etd 9:13] ......
## ...700 [etd 8:54] .........710 [etd 8:36] .........720 [etd 8:17] .....
## ....730 [etd 7:59] .........740 [etd 7:41] .........750 [etd 7:24] ....
## .....760 [etd 7:05] .........770 [etd 6:48] .........780 [etd 6:29] ...
## ......790 [etd 6:12] .........800 [etd 5:54] .........810 [etd 5:36] ..
## .......820 [etd 5:18] .........830 [etd 5:01] .........840 [etd 4:43] .
## ........850 [etd 4:25] .........860 [etd 4:07] .........870
##  [etd 3:49] .........880 [etd 3:32] .........890 [etd 3:14] .........
## 900 [etd 2:56] .........910 [etd 2:38] .........920 [etd 2:20] ........
## .930 [etd 2:03] .........940 [etd 1:45] .........950 [etd 1:27] .......
## ..960 [etd 1:09] .........970 [etd 51 sec] .........980 [etd 34 sec] ......
## ...990 [etd 16 sec] ........ 999.
## 
## Done.

7.9.1.2 Plot the Complete Spatial Randomness graph

plot(L_aj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.2 Aljunied planning subzone for each room type

7.9.2.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_apt_aj = Lest(listings_apt_aj_owin, correction="Ripley")
plot(L_apt_aj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.2.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_apt_aj.csr <- envelope(listings_apt_aj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 14:58] .........20 [etd 14:19] .........
## 30 [etd 14:00] .........40 [etd 14:21] .........50 [etd 14:03] ........
## .60 [etd 13:51] .........70 [etd 13:41] .........80 [etd 14:06] .......
## ..90 [etd 13:52] .........100 [etd 13:30] .........110 [etd 13:42] ......
## ...120 [etd 13:40] .........130 [etd 13:20] .........140 [etd 13:17] .....
## ....150 [etd 13:11] .........160 [etd 12:58] .........170 [etd 12:44] ....
## .....180 [etd 12:40] .........190 [etd 12:26] .........200 [etd 12:12] ...
## ......210 [etd 11:58] .........220 [etd 11:52] .........230 [etd 11:42] ..
## .......240 [etd 11:31] .........250 [etd 11:25] .........260 [etd 11:16] .
## ........270 [etd 11:06] .........280 [etd 10:55] .........290
##  [etd 10:49] .........300 [etd 10:38] .........310 [etd 10:27] .........
## 320 [etd 10:19] .........330 [etd 10:14] .........340 [etd 10:04] ........
## .350 [etd 9:54] .........360 [etd 9:46] .........370 [etd 9:36] .......
## ..380 [etd 9:25] .........390 [etd 9:17] .........400 [etd 9:07] ......
## ...410 [etd 8:57] .........420 [etd 8:47] .........430 [etd 8:39] .....
## ....440 [etd 8:29] .........450 [etd 8:19] .........460 [etd 8:13] ....
## .....470 [etd 8:07] .........480 [etd 7:59] .........490 [etd 7:50] ...
## ......500 [etd 7:42] .........510 [etd 7:33] .........520 [etd 7:23] ..
## .......530 [etd 7:14] .........540 [etd 7:05] .........550 [etd 6:55] .
## ........560 [etd 6:46] .........570 [etd 6:37] .........580
##  [etd 6:27] .........590 [etd 6:18] .........600 [etd 6:09] .........
## 610 [etd 6:00] .........620 [etd 5:50] .........630 [etd 5:41] ........
## .640 [etd 5:33] .........650 [etd 5:23] .........660 [etd 5:14] .......
## ..670 [etd 5:05] .........680 [etd 4:55] .........690 [etd 4:46] ......
## ...700 [etd 4:37] .........710 [etd 4:28] .........720 [etd 4:19] .....
## ....730 [etd 4:09] .........740 [etd 4:00] .........750 [etd 3:50] ....
## .....760 [etd 3:40] .........770 [etd 3:31] .........780 [etd 3:22] ...
## ......790 [etd 3:12] .........800 [etd 3:03] .........810 [etd 2:53] ..
## .......820 [etd 2:44] .........830 [etd 2:35] .........840 [etd 2:25] .
## ........850 [etd 2:16] .........860 [etd 2:07] .........870
##  [etd 1:58] .........880 [etd 1:49] .........890 [etd 1:40] .........
## 900 [etd 1:30] .........910 [etd 1:21] .........920 [etd 1:12] ........
## .930 [etd 1:03] .........940 [etd 54 sec] .........950 [etd 45 sec] .......
## ..960 [etd 35 sec] .........970 [etd 26 sec] .........980 [etd 17 sec] ......
## ...990 [etd 8 sec] ........ 999.
## 
## Done.
7.9.2.1.2 Plot the Complete Spatial Randomness graph
plot(L_apt_aj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.2.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_hotel_aj = Lest(listings_hotel_aj_owin, correction="Ripley")
plot(L_hotel_aj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.2.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_hotel_aj.csr <- envelope(listings_hotel_aj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.2.2.2 Plot the Complete Spatial Randomness graph
plot(L_hotel_aj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value but close to the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb hotel room listing locations in Aljunied subzone area are randomly distributed.

7.9.2.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_private_aj = Lest(listings_private_aj_owin, correction="Ripley")
plot(L_private_aj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.2.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_private_aj.csr <- envelope(listings_private_aj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 4:16] .........20 [etd 5:17] .........
## 30 [etd 4:41] .........40 [etd 4:27] .........50 [etd 4:06] ........
## .60 [etd 3:56] .........70 [etd 3:48] .........80 [etd 3:37] .......
## ..90 [etd 3:32] .........100 [etd 3:25] .........110 [etd 3:18] ......
## ...120 [etd 3:16] .........130 [etd 3:12] .........140 [etd 3:08] .....
## ....150 [etd 3:05] .........160 [etd 3:06] .........170 [etd 3:07] ....
## .....180 [etd 3:05] .........190 [etd 3:02] .........200 [etd 2:58] ...
## ......210 [etd 2:57] .........220 [etd 2:54] .........230 [etd 2:50] ..
## .......240 [etd 2:48] .........250 [etd 2:45] .........260 [etd 2:42] .
## ........270 [etd 2:41] .........280 [etd 2:38] .........290
##  [etd 2:35] .........300 [etd 2:33] .........310 [etd 2:32] .........
## 320 [etd 2:29] .........330 [etd 2:27] .........340 [etd 2:25] ........
## .350 [etd 2:22] .........360 [etd 2:20] .........370 [etd 2:17] .......
## ..380 [etd 2:15] .........390 [etd 2:12] .........400 [etd 2:10] ......
## ...410 [etd 2:07] .........420 [etd 2:05] .........430 [etd 2:03] .....
## ....440 [etd 2:01] .........450 [etd 2:00] .........460 [etd 1:59] ....
## .....470 [etd 1:56] .........480 [etd 1:53] .........490 [etd 1:51] ...
## ......500 [etd 1:49] .........510 [etd 1:46] .........520 [etd 1:44] ..
## .......530 [etd 1:42] .........540 [etd 1:39] .........550 [etd 1:37] .
## ........560 [etd 1:35] .........570 [etd 1:32] .........580
##  [etd 1:31] .........590 [etd 1:29] .........600 [etd 1:27] .........
## 610 [etd 1:24] .........620 [etd 1:22] .........630 [etd 1:20] ........
## .640 [etd 1:18] .........650 [etd 1:16] .........660 [etd 1:13] .......
## ..670 [etd 1:12] .........680 [etd 1:10] .........690 [etd 1:07] ......
## ...700 [etd 1:05] .........710 [etd 1:03] .........720 [etd 1:01] .....
## ....730 [etd 58 sec] .........740 [etd 56 sec] .........750 [etd 54 sec] ....
## .....760 [etd 52 sec] .........770 [etd 50 sec] .........780 [etd 48 sec] ...
## ......790 [etd 46 sec] .........800 [etd 44 sec] .........810 [etd 41 sec] ..
## .......820 [etd 39 sec] .........830 [etd 37 sec] .........840 [etd 34 sec] .
## ........850 [etd 32 sec] .........860 [etd 30 sec] .........870
##  [etd 28 sec] .........880 [etd 26 sec] .........890 [etd 24 sec] .........
## 900 [etd 21 sec] .........910 [etd 19 sec] .........920 [etd 17 sec] ........
## .930 [etd 15 sec] .........940 [etd 13 sec] .........950 [etd 11 sec] .......
## ..960 [etd 8 sec] .........970 [etd 6 sec] .........980 [etd 4 sec] ......
## ...990 [etd 2 sec] ........ 999.
## 
## Done.
7.9.2.3.2 Plot the Complete Spatial Randomness graph
plot(L_private_aj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Aljunied subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.2.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Aljunied subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Aljunied subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_shared_aj = Lest(listings_shared_aj_owin, correction="Ripley")
plot(L_shared_aj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.2.4.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_shared_aj.csr <- envelope(listings_shared_aj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.2.4.2 Plot the Complete Spatial Randomness graph
plot(L_shared_aj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value at about 300m but is within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Aljunied subzone area are randomly distributed.

7.9.3 Balestier planning subzone for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_bs = Lest(listings_bs_owin, correction="Ripley")
plot(L_bs, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_bs.csr <- envelope(listings_bs_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 5:24] .........20 [etd 5:46] .........
## 30 [etd 5:34] .........40 [etd 5:24] .........50 [etd 5:14] ........
## .60 [etd 5:06] .........70 [etd 5:05] .........80 [etd 5:07] .......
## ..90 [etd 5:04] .........100 [etd 4:58] .........110 [etd 4:54] ......
## ...120 [etd 4:51] .........130 [etd 4:45] .........140 [etd 4:41] .....
## ....150 [etd 4:37] .........160 [etd 4:32] .........170 [etd 4:30] ....
## .....180 [etd 4:31] .........190 [etd 4:27] .........200 [etd 4:24] ...
## ......210 [etd 4:22] .........220 [etd 4:17] .........230 [etd 4:14] ..
## .......240 [etd 4:11] .........250 [etd 4:07] .........260 [etd 4:04] .
## ........270 [etd 4:00] .........280 [etd 3:57] .........290
##  [etd 3:54] .........300 [etd 3:51] .........310 [etd 3:47] .........
## 320 [etd 3:44] .........330 [etd 3:40] .........340 [etd 3:37] ........
## .350 [etd 3:34] .........360 [etd 3:30] .........370 [etd 3:29] .......
## ..380 [etd 3:25] .........390 [etd 3:22] .........400 [etd 3:18] ......
## ...410 [etd 3:15] .........420 [etd 3:12] .........430 [etd 3:08] .....
## ....440 [etd 3:05] .........450 [etd 3:01] .........460 [etd 2:58] ....
## .....470 [etd 2:56] .........480 [etd 2:52] .........490 [etd 2:49] ...
## ......500 [etd 2:46] .........510 [etd 2:42] .........520 [etd 2:39] ..
## .......530 [etd 2:35] .........540 [etd 2:32] .........550 [etd 2:29] .
## ........560 [etd 2:25] .........570 [etd 2:22] .........580
##  [etd 2:19] .........590 [etd 2:15] .........600 [etd 2:12] .........
## 610 [etd 2:09] .........620 [etd 2:05] .........630 [etd 2:02] ........
## .640 [etd 1:59] .........650 [etd 1:55] .........660 [etd 1:52] .......
## ..670 [etd 1:50] .........680 [etd 1:46] .........690 [etd 1:43] ......
## ...700 [etd 1:40] .........710 [etd 1:37] .........720 [etd 1:33] .....
## ....730 [etd 1:30] .........740 [etd 1:27] .........750 [etd 1:24] ....
## .....760 [etd 1:20] .........770 [etd 1:17] .........780 [etd 1:14] ...
## ......790 [etd 1:10] .........800 [etd 1:07] .........810 [etd 1:04] ..
## .......820 [etd 1:00] .........830 [etd 57 sec] .........840 [etd 54 sec] .
## ........850 [etd 51 sec] .........860 [etd 47 sec] .........870
##  [etd 44 sec] .........880 [etd 40 sec] .........890 [etd 37 sec] .........
## 900 [etd 34 sec] .........910 [etd 30 sec] .........920 [etd 27 sec] ........
## .930 [etd 23 sec] .........940 [etd 20 sec] .........950 [etd 17 sec] .......
## ..960 [etd 13 sec] .........970 [etd 10 sec] .........980 [etd 6 sec] ......
## ...990 [etd 3 sec] ........ 999.
## 
## Done.

7.9.3.2 Plot the Complete Spatial Randomness graph

plot(L_bs.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.4 Balestier planning subzone for each room type

7.9.4.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_apt_bs = Lest(listings_apt_bs_owin, correction="Ripley")
plot(L_apt_bs, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.4.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_apt_bs.csr <- envelope(listings_apt_bs_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 3:28] .........20 [etd 3:57] .........
## 30 [etd 4:15] .........40 [etd 4:19] .........50 [etd 4:07] ........
## .60 [etd 3:59] .........70 [etd 3:52] .........80 [etd 3:53] .......
## ..90 [etd 3:47] .........100 [etd 3:41] .........110 [etd 3:38] ......
## ...120 [etd 3:34] .........130 [etd 3:32] .........140 [etd 3:29] .....
## ....150 [etd 3:27] .........160 [etd 3:29] .........170 [etd 3:28] ....
## .....180 [etd 3:25] .........190 [etd 3:21] .........200 [etd 3:19] ...
## ......210 [etd 3:17] .........220 [etd 3:15] .........230 [etd 3:14] ..
## .......240 [etd 3:11] .........250 [etd 3:08] .........260 [etd 3:05] .
## ........270 [etd 3:02] .........280 [etd 3:00] .........290
##  [etd 3:00] .........300 [etd 2:58] .........310 [etd 2:55] .........
## 320 [etd 2:53] .........330 [etd 2:50] .........340 [etd 2:47] ........
## .350 [etd 2:44] .........360 [etd 2:41] .........370 [etd 2:38] .......
## ..380 [etd 2:35] .........390 [etd 2:33] .........400 [etd 2:30] ......
## ...410 [etd 2:29] .........420 [etd 2:27] .........430 [etd 2:24] .....
## ....440 [etd 2:21] .........450 [etd 2:18] .........460 [etd 2:15] ....
## .....470 [etd 2:12] .........480 [etd 2:10] .........490 [etd 2:07] ...
## ......500 [etd 2:04] .........510 [etd 2:01] .........520 [etd 1:59] ..
## .......530 [etd 1:56] .........540 [etd 1:54] .........550 [etd 1:52] .
## ........560 [etd 1:49] .........570 [etd 1:47] .........580
##  [etd 1:44] .........590 [etd 1:41] .........600 [etd 1:39] .........
## 610 [etd 1:36] .........620 [etd 1:33] .........630 [etd 1:31] ........
## .640 [etd 1:28] .........650 [etd 1:26] .........660 [etd 1:23] .......
## ..670 [etd 1:21] .........680 [etd 1:19] .........690 [etd 1:16] ......
## ...700 [etd 1:14] .........710 [etd 1:11] .........720 [etd 1:09] .....
## ....730 [etd 1:06] .........740 [etd 1:04] .........750 [etd 1:01] ....
## .....760 [etd 59 sec] .........770 [etd 56 sec] .........780 [etd 54 sec] ...
## ......790 [etd 51 sec] .........800 [etd 49 sec] .........810 [etd 46 sec] ..
## .......820 [etd 44 sec] .........830 [etd 42 sec] .........840 [etd 39 sec] .
## ........850 [etd 37 sec] .........860 [etd 34 sec] .........870
##  [etd 32 sec] .........880 [etd 29 sec] .........890 [etd 27 sec] .........
## 900 [etd 24 sec] .........910 [etd 22 sec] .........920 [etd 19 sec] ........
## .930 [etd 17 sec] .........940 [etd 14 sec] .........950 [etd 12 sec] .......
## ..960 [etd 10 sec] .........970 [etd 7 sec] .........980 [etd 5 sec] ......
## ...990 [etd 2 sec] ........ 999.
## 
## Done.
7.9.4.1.2 Plot the Complete Spatial Randomness graph
plot(L_apt_bs.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire room/apt listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.4.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_hotel_bs = Lest(listings_hotel_bs_owin, correction="Ripley")
plot(L_hotel_bs, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.4.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_hotel_bs.csr <- envelope(listings_hotel_bs_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.4.2.2 Plot the Complete Spatial Randomness graph
plot(L_hotel_bs.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at about 50m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb hotel room listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.4.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_private_bs = Lest(listings_private_bs_owin, correction="Ripley")
plot(L_private_bs, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.4.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_private_bs.csr <- envelope(listings_private_bs_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.4.3.2 Plot the Complete Spatial Randomness graph
plot(L_private_bs.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at about 40m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Balestier subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.4.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Balestier subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Balestier subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_shared_bs = Lest(listings_shared_bs_owin, correction="Ripley")
plot(L_shared_bs, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

Based on the graph, the L value line is not being plot which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Balestier subzone area are randomly distributed.

7.9.5 Lavender planning subzone for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_la = Lest(listings_la_owin, correction="Ripley")
plot(L_la, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.5.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_la.csr <- envelope(listings_la_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 9:34] .........20 [etd 9:51] .........
## 30 [etd 10:45] .........40 [etd 10:31] .........50 [etd 10:16] ........
## .60 [etd 10:04] .........70 [etd 9:59] .........80 [etd 9:57] .......
## ..90 [etd 9:50] .........100 [etd 9:41] .........110 [etd 9:30] ......
## ...120 [etd 9:23] .........130 [etd 9:25] .........140 [etd 9:21] .....
## ....150 [etd 9:15] .........160 [etd 9:07] .........170 [etd 9:05] ....
## .....180 [etd 8:55] .........190 [etd 8:46] .........200 [etd 8:38] ...
## ......210 [etd 8:29] .........220 [etd 8:25] .........230 [etd 8:19] ..
## .......240 [etd 8:11] .........250 [etd 8:03] .........260 [etd 7:55] .
## ........270 [etd 7:49] .........280 [etd 7:46] .........290
##  [etd 7:38] .........300 [etd 7:31] .........310 [etd 7:24] .........
## 320 [etd 7:17] .........330 [etd 7:11] .........340 [etd 7:03] ........
## .350 [etd 6:56] .........360 [etd 6:49] .........370 [etd 6:43] .......
## ..380 [etd 6:37] .........390 [etd 6:30] .........400 [etd 6:23] ......
## ...410 [etd 6:17] .........420 [etd 6:10] .........430 [etd 6:05] .....
## ....440 [etd 5:58] .........450 [etd 5:51] .........460 [etd 5:45] ....
## .....470 [etd 5:39] .........480 [etd 5:33] .........490 [etd 5:26] ...
## ......500 [etd 5:19] .........510 [etd 5:13] .........520 [etd 5:08] ..
## .......530 [etd 5:01] .........540 [etd 4:55] .........550 [etd 4:48] .
## ........560 [etd 4:41] .........570 [etd 4:35] .........580
##  [etd 4:29] .........590 [etd 4:23] .........600 [etd 4:16] .........
## 610 [etd 4:10] .........620 [etd 4:04] .........630 [etd 3:58] ........
## .640 [etd 3:51] .........650 [etd 3:44] .........660 [etd 3:38] .......
## ..670 [etd 3:31] .........680 [etd 3:25] .........690 [etd 3:18] ......
## ...700 [etd 3:12] .........710 [etd 3:05] .........720 [etd 2:59] .....
## ....730 [etd 2:53] .........740 [etd 2:46] .........750 [etd 2:40] ....
## .....760 [etd 2:33] .........770 [etd 2:27] .........780 [etd 2:21] ...
## ......790 [etd 2:14] .........800 [etd 2:08] .........810 [etd 2:01] ..
## .......820 [etd 1:55] .........830 [etd 1:48] .........840 [etd 1:42] .
## ........850 [etd 1:35] .........860 [etd 1:29] .........870
##  [etd 1:23] .........880 [etd 1:16] .........890 [etd 1:10] .........
## 900 [etd 1:03] .........910 [etd 57 sec] .........920 [etd 51 sec] ........
## .930 [etd 44 sec] .........940 [etd 38 sec] .........950 [etd 31 sec] .......
## ..960 [etd 25 sec] .........970 [etd 19 sec] .........980 [etd 12 sec] ......
## ...990 [etd 6 sec] ........ 999.
## 
## Done.

7.9.5.2 Plot the Complete Spatial Randomness graph

plot(L_la.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.6 Lavender planning subzone for each room type

7.9.6.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_apt_la = Lest(listings_apt_la_owin, correction="Ripley")
plot(L_apt_la, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.6.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_apt_la.csr <- envelope(listings_apt_la_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.6.1.2 Plot the Complete Spatial Randomness graph
plot(L_apt_la.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at about 18m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire home/apt listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.6.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_hotel_la = Lest(listings_hotel_la_owin, correction="Ripley")
plot(L_hotel_la, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.6.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_hotel_la.csr <- envelope(listings_hotel_la_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.6.2.2 Plot the Complete Spatial Randomness graph
plot(L_hotel_la.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at about 35m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb hotel room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.6.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_private_la = Lest(listings_private_la_owin, correction="Ripley")
plot(L_private_la, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.6.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_private_la.csr <- envelope(listings_private_la_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 4:47] .........20 [etd 4:22] .........
## 30 [etd 4:17] .........40 [etd 4:14] .........50 [etd 4:12] ........
## .60 [etd 4:05] .........70 [etd 4:00] .........80 [etd 3:54] .......
## ..90 [etd 3:51] .........100 [etd 3:49] .........110 [etd 3:48] ......
## ...120 [etd 3:52] .........130 [etd 3:51] .........140 [etd 3:46] .....
## ....150 [etd 3:45] .........160 [etd 3:40] .........170 [etd 3:38] ....
## .....180 [etd 3:35] .........190 [etd 3:32] .........200 [etd 3:29] ...
## ......210 [etd 3:29] .........220 [etd 3:27] .........230 [etd 3:28] ..
## .......240 [etd 3:28] .........250 [etd 3:25] .........260 [etd 3:21] .
## ........270 [etd 3:19] .........280 [etd 3:15] .........290
##  [etd 3:12] .........300 [etd 3:10] .........310 [etd 3:07] .........
## 320 [etd 3:03] .........330 [etd 3:00] .........340 [etd 2:58] ........
## .350 [etd 2:57] .........360 [etd 2:54] .........370 [etd 2:50] .......
## ..380 [etd 2:47] .........390 [etd 2:44] .........400 [etd 2:41] ......
## ...410 [etd 2:38] .........420 [etd 2:35] .........430 [etd 2:32] .....
## ....440 [etd 2:29] .........450 [etd 2:26] .........460 [etd 2:23] ....
## .....470 [etd 2:22] .........480 [etd 2:19] .........490 [etd 2:16] ...
## ......500 [etd 2:14] .........510 [etd 2:11] .........520 [etd 2:08] ..
## .......530 [etd 2:05] .........540 [etd 2:02] .........550 [etd 2:00] .
## ........560 [etd 1:57] .........570 [etd 1:54] .........580
##  [etd 1:51] .........590 [etd 1:48] .........600 [etd 1:46] .........
## 610 [etd 1:43] .........620 [etd 1:40] .........630 [etd 1:38] ........
## .640 [etd 1:35] .........650 [etd 1:32] .........660 [etd 1:29] .......
## ..670 [etd 1:27] .........680 [etd 1:24] .........690 [etd 1:21] ......
## ...700 [etd 1:19] .........710 [etd 1:16] .........720 [etd 1:14] .....
## ....730 [etd 1:11] .........740 [etd 1:08] .........750 [etd 1:06] ....
## .....760 [etd 1:03] .........770 [etd 1:00] .........780 [etd 58 sec] ...
## ......790 [etd 55 sec] .........800 [etd 52 sec] .........810 [etd 50 sec] ..
## .......820 [etd 47 sec] .........830 [etd 44 sec] .........840 [etd 42 sec] .
## ........850 [etd 39 sec] .........860 [etd 37 sec] .........870
##  [etd 34 sec] .........880 [etd 31 sec] .........890 [etd 29 sec] .........
## 900 [etd 26 sec] .........910 [etd 23 sec] .........920 [etd 21 sec] ........
## .930 [etd 18 sec] .........940 [etd 15 sec] .........950 [etd 13 sec] .......
## ..960 [etd 10 sec] .........970 [etd 8 sec] .........980 [etd 5 sec] ......
## ...990 [etd 2 sec] ........ 999.
## 
## Done.
7.9.6.3.2 Plot the Complete Spatial Randomness graph
plot(L_private_la.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb private room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.6.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Lavender subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Lavender subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_shared_la = Lest(listings_shared_la_owin, correction="Ripley")
plot(L_shared_la, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.6.4.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_shared_la.csr <- envelope(listings_shared_la_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.6.4.2 Plot the Complete Spatial Randomness graph
plot(L_shared_la.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at about 35m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb shared room listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.7 Tanjong Pagar planning subzone for all room types

Null Hypothesis: The distribution of Airbnb listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_tj = Lest(listings_tj_owin, correction="Ripley")
plot(L_tj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.7.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_tj.csr <- envelope(listings_tj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 3:18] .........20 [etd 2:44] .........
## 30 [etd 2:56] .........40 [etd 3:10] .........50 [etd 2:55] ........
## .60 [etd 2:48] .........70 [etd 2:40] .........80 [etd 2:34] .......
## ..90 [etd 2:30] .........100 [etd 2:26] .........110 [etd 2:23] ......
## ...120 [etd 2:20] .........130 [etd 2:16] .........140 [etd 2:14] .....
## ....150 [etd 2:11] .........160 [etd 2:08] .........170 [etd 2:05] ....
## .....180 [etd 2:03] .........190 [etd 2:02] .........200 [etd 2:00] ...
## ......210 [etd 1:58] .........220 [etd 1:55] .........230 [etd 1:54] ..
## .......240 [etd 1:54] .........250 [etd 1:55] .........260 [etd 1:56] .
## ........270 [etd 1:53] .........280 [etd 1:51] .........290
##  [etd 1:49] .........300 [etd 1:49] .........310 [etd 1:47] .........
## 320 [etd 1:45] .........330 [etd 1:43] .........340 [etd 1:42] ........
## .350 [etd 1:40] .........360 [etd 1:38] .........370 [etd 1:36] .......
## ..380 [etd 1:34] .........390 [etd 1:33] .........400 [etd 1:31] ......
## ...410 [etd 1:29] .........420 [etd 1:27] .........430 [etd 1:26] .....
## ....440 [etd 1:25] .........450 [etd 1:23] .........460 [etd 1:23] ....
## .....470 [etd 1:22] .........480 [etd 1:20] .........490 [etd 1:18] ...
## ......500 [etd 1:17] .........510 [etd 1:15] .........520 [etd 1:13] ..
## .......530 [etd 1:12] .........540 [etd 1:10] .........550 [etd 1:09] .
## ........560 [etd 1:07] .........570 [etd 1:05] .........580
##  [etd 1:04] .........590 [etd 1:02] .........600 [etd 1:01] .........
## 610 [etd 59 sec] .........620 [etd 58 sec] .........630 [etd 56 sec] ........
## .640 [etd 54 sec] .........650 [etd 53 sec] .........660 [etd 51 sec] .......
## ..670 [etd 51 sec] .........680 [etd 49 sec] .........690 [etd 48 sec] ......
## ...700 [etd 46 sec] .........710 [etd 45 sec] .........720 [etd 43 sec] .....
## ....730 [etd 42 sec] .........740 [etd 40 sec] .........750 [etd 38 sec] ....
## .....760 [etd 37 sec] .........770 [etd 35 sec] .........780 [etd 34 sec] ...
## ......790 [etd 32 sec] .........800 [etd 30 sec] .........810 [etd 29 sec] ..
## .......820 [etd 27 sec] .........830 [etd 26 sec] .........840 [etd 24 sec] .
## ........850 [etd 23 sec] .........860 [etd 21 sec] .........870
##  [etd 20 sec] .........880 [etd 18 sec] .........890 [etd 17 sec] .........
## 900 [etd 15 sec] .........910 [etd 14 sec] .........920 [etd 12 sec] ........
## .930 [etd 11 sec] .........940 [etd 9 sec] .........950 [etd 7 sec] .......
## ..960 [etd 6 sec] .........970 [etd 4 sec] .........980 [etd 3 sec] ......
## ...990 [etd 1 sec] ........ 999.
## 
## Done.

7.9.7.2 Plot the Complete Spatial Randomness graph

plot(L_tj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb listing locations clustering in Lavender subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.8 Tanjong Pagar planning subzone for each room type

7.9.8.1 Entire home/apt

Null Hypothesis: The distribution of Airbnb Entire room/apt listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb Entire room/apt listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_apt_tj = Lest(listings_apt_tj_owin, correction="Ripley")
plot(L_apt_tj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.8.1.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_apt_tj.csr <- envelope(listings_apt_tj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10 [etd 2:07] .........20 [etd 2:00] .........
## 30 [etd 1:56] .........40 [etd 1:54] .........50 [etd 1:51] ........
## .60 [etd 1:50] .........70 [etd 1:48] .........80 [etd 1:49] .......
## ..90 [etd 1:54] .........100 [etd 1:56] .........110 [etd 1:58] ......
## ...120 [etd 1:56] .........130 [etd 1:53] .........140 [etd 1:52] .....
## ....150 [etd 1:49] .........160 [etd 1:48] .........170 [etd 1:46] ....
## .....180 [etd 1:44] .........190 [etd 1:42] .........200 [etd 1:41] ...
## ......210 [etd 1:40] .........220 [etd 1:38] .........230 [etd 1:36] ..
## .......240 [etd 1:35] .........250 [etd 1:33] .........260 [etd 1:31] .
## ........270 [etd 1:30] .........280 [etd 1:28] .........290
##  [etd 1:26] .........300 [etd 1:25] .........310 [etd 1:24] .........
## 320 [etd 1:22] .........330 [etd 1:21] .........340 [etd 1:19] ........
## .350 [etd 1:19] .........360 [etd 1:19] .........370 [etd 1:18] .......
## ..380 [etd 1:16] .........390 [etd 1:15] .........400 [etd 1:14] ......
## ...410 [etd 1:13] .........420 [etd 1:11] .........430 [etd 1:10] .....
## ....440 [etd 1:09] .........450 [etd 1:07] .........460 [etd 1:06] ....
## .....470 [etd 1:05] .........480 [etd 1:03] .........490 [etd 1:02] ...
## ......500 [etd 1:01] .........510 [etd 59 sec] .........520 [etd 58 sec] ..
## .......530 [etd 57 sec] .........540 [etd 56 sec] .........550 [etd 54 sec] .
## ........560 [etd 53 sec] .........570 [etd 52 sec] .........580
##  [etd 51 sec] .........590 [etd 49 sec] .........600 [etd 48 sec] .........
## 610 [etd 47 sec] .........620 [etd 46 sec] .........630 [etd 45 sec] ........
## .640 [etd 44 sec] .........650 [etd 42 sec] .........660 [etd 41 sec] .......
## ..670 [etd 40 sec] .........680 [etd 39 sec] .........690 [etd 37 sec] ......
## ...700 [etd 36 sec] .........710 [etd 35 sec] .........720 [etd 34 sec] .....
## ....730 [etd 32 sec] .........740 [etd 31 sec] .........750 [etd 30 sec] ....
## .....760 [etd 29 sec] .........770 [etd 28 sec] .........780 [etd 26 sec] ...
## ......790 [etd 25 sec] .........800 [etd 24 sec] .........810 [etd 23 sec] ..
## .......820 [etd 21 sec] .........830 [etd 20 sec] .........840 [etd 19 sec] .
## ........850 [etd 18 sec] .........860 [etd 17 sec] .........870
##  [etd 15 sec] .........880 [etd 14 sec] .........890 [etd 13 sec] .........
## 900 [etd 12 sec] .........910 [etd 11 sec] .........920 [etd 10 sec] ........
## .930 [etd 8 sec] .........940 [etd 7 sec] .........950 [etd 6 sec] .......
## ..960 [etd 5 sec] .........970 [etd 4 sec] .........980 [etd 2 sec] ......
## ...990 [etd 1 sec] ........ 999.
## 
## Done.
7.9.8.1.2 Plot the Complete Spatial Randomness graph
plot(L_apt_tj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is above the theoretical value and randomization envelope at about 8m which is statistically significant. Therefore, I can conclude that there is a clear sign of Airbnb Entire home/apt listing locations clustering in Tanjong Pagar subzone area.

The null hypothesis will be rejected as p-value is smaller than alpha value of 0.001. Therefore, the CSR graph show clustering spatial points patterns.

7.9.8.2 Hotel room

Null Hypothesis: The distribution of Airbnb hotel room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb hotel room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_hotel_tj = Lest(listings_hotel_tj_owin, correction="Ripley")
plot(L_hotel_tj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.8.2.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_hotel_tj.csr <- envelope(listings_hotel_tj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.8.2.2 Plot the Complete Spatial Randomness graph
plot(L_hotel_tj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the graph, although the L value line is below the theoretical value but there’s isn’t a randomization envelope to determine that it’s statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb hotel room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.9.8.3 Private room

Null Hypothesis: The distribution of Airbnb private room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb private room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_private_tj = Lest(listings_private_tj_owin, correction="Ripley")
plot(L_private_tj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

7.9.8.3.1 Perform Complete Spatial Randomness test to confirm the observed spatial patterns

using Monte Carlo test with L-fucntion

L_private_tj.csr <- envelope(listings_private_tj_owin, Lest, nsim=999, rank=1, glocal=TRUE)
## Generating 999 simulations of CSR  ...
## 1, 2, 3, ......10.........20.........30.........40.........50.........60........
## .70.........80.........90.........100.........110.........120.........130......
## ...140.........150.........160.........170.........180.........190.........200....
## .....210.........220.........230.........240.........250.........260.........270..
## .......280.........290.........300.........310.........320.........330.........340
## .........350.........360.........370.........380.........390.........400........
## .410.........420.........430.........440.........450.........460.........470......
## ...480.........490.........500.........510.........520.........530.........540....
## .....550.........560.........570.........580.........590.........600.........610..
## .......620.........630.........640.........650.........660.........670.........680
## .........690.........700.........710.........720.........730.........740........
## .750.........760.........770.........780.........790.........800.........810......
## ...820.........830.........840.........850.........860.........870.........880....
## .....890.........900.........910.........920.........930.........940.........950..
## .......960.........970.........980.........990........ 999.
## 
## Done.
7.9.8.3.2 Plot the Complete Spatial Randomness graph
plot(L_private_tj.csr, . - r ~ r, xlab="d", ylab="L(d)-r")

Based on the CSR graph, the black line is close to the theoretical value till about 90m is above the theoretical value but it’s within the randomization envelope which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb private room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.9.8.4 Shared room

Null Hypothesis: The distribution of Airbnb shared room listing locations are randomly distributed in Tanjong Pagar subzone area.
Alternative Hypothesis: The distribution of Airbnb shared room listing locations are not randomly distributed in Tanjong Pagar subzone area.
The null hypothesis will be rejected if p-value is smaller than alpha value of 0.001.

L_shared_tj = Lest(listings_shared_tj_owin, correction="Ripley")
plot(L_shared_tj, . -r ~ r, ylab="L(d)-r", xlab="d(m)")

Based on the graph, the L value line is not being plot which is not statistically significant. Therfore, the null hypothesis fail to be rejected that the distribution of Airbnb shared room listing locations in Tanjong Pagar subzone area are randomly distributed.

7.10 Conclusion of the second-order Spatial Point Process Analysis

G-Function
Aljunied Balestier Lavender Tanjong Pagar
Overall Reject null hypothesis Reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
Entire home/apt Reject null hypothesis Reject null hypothesis Fail to reject null hypothesis Fail to reject null hypothesis
Hotel room Fail to reject null hypothesis Fail to reject null hypothesis Fail to reject null hypothesis Fail to reject null hypothesis
Private room Reject null hypothesis Reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
Shared room Fail to reject null hypothesis Fail to reject null hypothesis Fail to reject null hypothesis Fail to reject null hypothesis
F-Function
Aljunied Balestier Lavender Tanjong Pagar
Overall Reject null hypothesis Reject null hypothesis Reject null hypothesis Reject null hypothesis
Entire home/apt Reject null hypothesis Reject null hypothesis Reject null hypothesis Reject null hypothesis
Hotel room Fail to reject null hypothesis Fail to reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
Private room Reject null hypothesis Reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
Shared room Fail to reject null hypothesis Fail to reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
K-Function
Aljunied Balestier Lavender Tanjong Pagar
Overall Reject null hypothesis Reject null hypothesis Reject null hypothesis Reject null hypothesis
Entire home/apt Reject null hypothesis Reject null hypothesis Reject null hypothesis Reject null hypothesis
Hotel room Reject null hypothesis Reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
Private room Reject null hypothesis Reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
Shared room Fail to reject null hypothesis Fail to reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
L-Function
Aljunied Balestier Lavender Tanjong Pagar
Overall Reject null hypothesis Reject null hypothesis Reject null hypothesis Reject null hypothesis
Entire home/apt Reject null hypothesis Reject null hypothesis Reject null hypothesis Reject null hypothesis
Hotel room Fail to reject null hypothesis Reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
Private room Reject null hypothesis Reject null hypothesis Reject null hypothesis Fail to reject null hypothesis
Shared room Fail to reject null hypothesis Fail to reject null hypothesis Reject null hypothesis Fail to reject null hypothesis



In overall, I have conducted G, F, K, and L function spatial point analsysis to the Airbnb listings location by the subzones and Airbnb room type listings location in each subzone.

The overall room listings by the subzone, the results are rather consistent but only Tanjang Pagar subzone in G-function anaylsis that null hypothesis fail to be rejected. However, I can conclude that it’s still show a clear sign of Airbnb listing locations clustering in Aljunied, Balestier, Lavender, and Tanjong Pagar subzones.

For the analysis on the room type listings in each sub zone:

  1. Comparing G-Function with F, K and L-Function anaylsis, Lavender has the total opposite results than the other subzones showing a clear sign of Airbnb listing locations clustering in Lavender.

  2. Comparing G-Function with F-Function anaylsis, Hotel room listings in Aljunied and Balestier that null hypothesis fail to be rejected. However, comparing K-Function with L-Function anaylsis, Hotel room listings are able to reject the null hypothesis. This show some sign that Hotel room listings clustering in Aljunied, Balestier subzones.

  3. Shared room listings in Aljunied, Balestier, and Tanjong Pagar subzones consistently failed to reject the null hypothesis. Therefore, the analysis failed to determine if listingsthe distribution of Airbnb shared room listing locations in Aljunied, Balestier, and Tanjong Pagar subzones are randomly or not randomly distributed.

7.11 Derive kernel density maps of Airbnb listing by room type

7.11.1 Convert the unit of measurement from meter to kilometer

listings_aj_owin.km <- rescale(listings_aj_owin, 1000, "km")
listings_bs_owin.km <- rescale(listings_bs_owin, 1000, "km")
listings_la_owin.km <- rescale(listings_la_owin, 1000, "km")
listings_tj_owin.km <- rescale(listings_tj_owin, 1000, "km")
listings_apt_aj_owin.km <- rescale(listings_apt_aj_owin, 1000, "km")
listings_hotel_aj_owin.km <- rescale(listings_hotel_aj_owin, 1000, "km")
listings_private_aj_owin.km <- rescale(listings_private_aj_owin, 1000, "km")
listings_shared_aj_owin.km <- rescale(listings_shared_aj_owin, 1000, "km")

listings_apt_bs_owin.km <- rescale(listings_apt_bs_owin, 1000, "km")
listings_hotel_bs_owin.km <- rescale(listings_hotel_bs_owin, 1000, "km")
listings_private_bs_owin.km <- rescale(listings_private_bs_owin, 1000, "km")
listings_shared_bs_owin.km <- rescale(listings_shared_bs_owin, 1000, "km")

listings_apt_la_owin.km <- rescale(listings_apt_la_owin, 1000, "km")
listings_hotel_la_owin.km <- rescale(listings_hotel_la_owin, 1000, "km")
listings_private_la_owin.km <- rescale(listings_private_la_owin, 1000, "km")
listings_shared_la_owin.km <- rescale(listings_shared_la_owin, 1000, "km")

listings_apt_tj_owin.km <- rescale(listings_apt_tj_owin, 1000, "km")
listings_hotel_tj_owin.km <- rescale(listings_hotel_tj_owin, 1000, "km")
listings_private_tj_owin.km <- rescale(listings_private_tj_owin, 1000, "km")
listings_shared_tj_owin.km <- rescale(listings_shared_tj_owin, 1000, "km")

7.11.2 Plot all the target planning areas with the room listings points

par(mfrow=c(1,2), mai=c(0.3,0.3,0.3,0.3))
plot(listings_aj_owin.km, main="ALJUNIED")
plot(listings_bs_owin.km, main="BALESTIER")

par(mfrow=c(1,2), mai=c(0.1,0.1,0.1,0.1))
plot(listings_la_owin.km, main="LAVENDER")
plot(listings_tj_owin.km, main="TANJONG PAGAR")

7.12 Plot room listings points by fixed bandwidth KDE for planned subzones

7.12.1 Aljunied subzone (150m)

par(mfrow=c(2,2), mai=c(0.2,0.2,0.2,0.2))

kde_listings_apt_aj_150 <- density(listings_apt_aj_owin.km, sigma=0.15, edge=TRUE, kernel="gaussian")
plot(kde_listings_apt_aj_150, main="Aljunied Entire home/apt")
contour(kde_listings_apt_aj_150, add=TRUE)

kde_listings_hotel_aj_150 <- density(listings_hotel_aj_owin.km, sigma=0.15, edge=TRUE, kernel="gaussian")
plot(kde_listings_hotel_aj_150, main="Aljunied Hotel Room")
contour(kde_listings_hotel_aj_150, add=TRUE)

kde_listings_private_aj_150 <- density(listings_private_aj_owin.km, sigma=0.15, edge=TRUE, kernel="gaussian")
plot(kde_listings_private_aj_150, main="Aljunied Private Room")
contour(kde_listings_private_aj_150, add=TRUE)

kde_listings_shared_aj_150 <- density(listings_shared_aj_owin.km, sigma=0.15, edge=TRUE, kernel="gaussian")
plot(kde_listings_shared_aj_150, main="Aljunied Shared Room")
contour(kde_listings_shared_aj_150, add=TRUE)

7.12.1.1 Plot Aljunied subzone owin object for comparison

par(mfrow=c(2,2), mai=c(0.1,0.1,0.1,0.1))
plot(listings_apt_aj_owin.km, main="Entire home/apt")
plot(listings_hotel_aj_owin.km, main="Hotel room")
plot(listings_private_aj_owin.km, main="Private room")
plot(listings_shared_aj_owin.km, main="Shared room")

7.12.2 Balestier subzone (150m)

par(mfrow=c(2,2), mai=c(0.2,0.2,0.2,0.2))

kde_listings_apt_bs_150 <- density(listings_apt_bs_owin.km, sigma=0.15, edge=TRUE, kernel="gaussian")
plot(kde_listings_apt_bs_150, main="Balestier Entire home/apt")
contour(kde_listings_apt_bs_150, add=TRUE)

kde_listings_hotel_bs_150 <- density(listings_hotel_bs_owin.km, sigma=0.15, edge=TRUE, kernel="gaussian")
plot(kde_listings_hotel_bs_150, main="Balestier Hotel Room")
contour(kde_listings_hotel_bs_150, add=TRUE)

kde_listings_private_bs_150 <- density(listings_private_bs_owin.km, sigma=0.15, edge=TRUE, kernel="gaussian")
plot(kde_listings_private_bs_150, main="Balestier Private Room")
contour(kde_listings_private_bs_150, add=TRUE)

kde_listings_shared_bs_150 <- density(listings_shared_bs_owin.km, sigma=0.15, edge=TRUE, kernel="gaussian")
plot(kde_listings_shared_bs_150, main="Balestier Shared Room")
contour(kde_listings_shared_bs_150, add=TRUE)

7.12.2.1 Plot Balestier subzone owin object for comparison

par(mfrow=c(2,2), mai=c(0.1,0.1,0.1,0.1))
plot(listings_apt_bs_owin.km, main="Entire home/apt")
plot(listings_hotel_bs_owin.km, main="Hotel room")
plot(listings_private_bs_owin.km, main="Private room")
plot(listings_shared_bs_owin.km, main="Shared room")

7.12.3 Lavender subzone (100m)

par(mfrow=c(2,2), mai=c(0.2,0.2,0.2,0.2))

kde_listings_apt_la_100 <- density(listings_apt_la_owin.km, sigma=0.1, edge=TRUE, kernel="gaussian")
plot(kde_listings_apt_la_100, main="Lavender Entire home/apt")
contour(kde_listings_apt_la_100, add=TRUE)

kde_listings_hotel_la_100 <- density(listings_hotel_la_owin.km, sigma=0.1, edge=TRUE, kernel="gaussian")
plot(kde_listings_hotel_la_100, main="Lavender Hotel Room")
contour(kde_listings_hotel_la_100, add=TRUE)

kde_listings_private_la_100 <- density(listings_private_la_owin.km, sigma=0.1, edge=TRUE, kernel="gaussian")
plot(kde_listings_private_la_100, main="Lavender Private Room")
contour(kde_listings_private_la_100, add=TRUE)

kde_listings_shared_la_100 <- density(listings_shared_la_owin.km, sigma=0.1, edge=TRUE, kernel="gaussian")
plot(kde_listings_shared_la_100, main="Lavender Shared Room")
contour(kde_listings_shared_la_100, add=TRUE)

7.12.3.1 Plot Lavender subzone owin object for comparison

par(mfrow=c(2,2), mai=c(0.1,0.1,0.1,0.1))
plot(listings_apt_la_owin.km, main="Entire home/apt")
plot(listings_hotel_la_owin.km, main="Hotel room")
plot(listings_private_la_owin.km, main="Private room")
plot(listings_shared_la_owin.km, main="Shared room")

7.12.4 Tanjong Pagar subzone (100m)

par(mfrow=c(2,2), mai=c(0.2,0.2,0.2,0.2))

kde_listings_apt_tj_100 <- density(listings_apt_tj_owin.km, sigma=0.1, edge=TRUE, kernel="gaussian")
plot(kde_listings_apt_tj_100, main="Tanjong Pagar Entire home/apt")
contour(kde_listings_apt_tj_100, add=TRUE)

kde_listings_hotel_tj_100 <- density(listings_hotel_tj_owin.km, sigma=0.1, edge=TRUE, kernel="gaussian")
plot(kde_listings_hotel_tj_100, main="Tanjong Pagar Hotel Room")
contour(kde_listings_hotel_tj_100, add=TRUE)

kde_listings_private_tj_100 <- density(listings_private_tj_owin.km, sigma=0.1, edge=TRUE, kernel="gaussian")
plot(kde_listings_private_tj_100, main="Tanjong Pagar Private Room")
contour(kde_listings_private_tj_100, add=TRUE)

kde_listings_shared_tj_100 <- density(listings_shared_tj_owin.km, sigma=0.1, edge=TRUE, kernel="gaussian")
plot(kde_listings_shared_tj_100, main="Tanjong Pagar Shared Room")
contour(kde_listings_shared_tj_100, add=TRUE)

7.12.4.1 Plot Tanjong Pajar subzone owin object for comparison

par(mfrow=c(2,2), mai=c(0.1,0.1,0.1,0.1))
plot(listings_apt_tj_owin.km, main="Entire home/apt")
plot(listings_hotel_tj_owin.km, main="Hotel room")
plot(listings_private_tj_owin.km, main="Private room")
plot(listings_shared_tj_owin.km, main="Shared room")

The possible factors that determine the spatial patterns observed are as follows:
1) The number of listings from the various Airbnb host. In the initial analysis of the listings dataframe, Entire home/apt and private room are the top 2 room type compared to the private and shared room.

2) The number of Airbnb listings locations at a specific longlat. In the initial analysis of the listings dataframe, there are multiple listings in each specifc longlat which would be a facator as well.

3) The area size of each subzone the largest area size is Aljunied, followed by Balestier, Lavender to the small area size Tanjong Pagar, so clustering or dispersed of Airbnb listings would likely be a factor.

4) Lastly, from the initial analysis of the listings dataframe, it indicates that Central Region has the most Airbnb listings (6,252) than other neighbourhoods. Also, Aljunied, Balestier, Lavender, and Tanjong Pagar subzones are close to the Central Region which could be a factor of the observed spatial patterns.