With reference to our aim, we looked into a research paper that goes in depth and analyzes the rhouse property prices has increased drastically while average income has remained unchanged. “The market is chronically undersupplied. So over the last decade its affordability has fallen the most among the cities considered in this study.”
library(readxl)
HKproperty <- read_excel("~/Desktop/DATA1001/HKproperty.xlsx")
View(HKproperty)
-Our dataset is secondary data, as it was collected from reputable real estate websites.
The limitations were the biases in the selection of our data, and the variability of our sources.
We predetermined locations that we would collect data on for both cheap and expensive housing. We were more prone to choosing properties with prices that suited our assumed knowledge of that area.
For some districts all 10 property information were chosen from one agency, while for other districts, they were collected from a different agency/multiple agencies.
This complicates our data because different agencies target customers with different budgets. For example, the property information shown on the website of an agency known for selling expensive properties will mostly likely show expensive housing instead of the general type of property within the area.
-Our dataset is reliable for our aim, we chose to focus on 6 districts(3 affluent, 3 non affluent districts)in order to provide a balanced and unbiased view on the property prices. After wrangling our data we collated total of 10 properties from each of the 6 districts we wanted to investigate. Our observations are the properties and key features of each property we established 9 variables.
# Top 5 rows of data
HKproperty=read.csv("~/Desktop/DATA1001/DATA1001_GROUP3.csv",header=T)
HKproperty <- HKproperty[1:60,]
head(HKproperty)
## Agent Type
## 1 Midland Apartment
## 2 Squarefoot Apartment
## 3 HongKongHomes Apartment
## 4 HongKongHomes Apartment
## 5 HongKongHomes Apartment
## 6 HongKongHomes Apartment
## Property
## 1 https://en.midland.com.hk/find-property-detail/Flat-2-Middle-Floor-Block-1-May-Tower-Central-Mid-Levels-Admiralty-M100001917
## 2 Estoril Court
## 3 https://www.hongkonghomes.com/en/hong-kong-property/for-sale/mid-levels-central/tregunter-tower-3/94415
## 4 https://www.hongkonghomes.com/en/hong-kong-property/for-sale/mid-levels-central/the-albany/5819
## 5 https://www.hongkonghomes.com/en/hong-kong-property/for-sale/mid-levels-central/century-tower-ii/4898
## 6 Century-tower-i/12000
## Bedrooms Bathrooms Carspots Building.age Location Price Size X
## 1 3 3.5 0 1975 Mid-Levels 93.00 2850 NA
## 2 5 3.0 1 1983 Mid-Levels 79.88 3347 NA
## 3 4 3.0 1 1993 Mid-Levels 120.00 3639 NA
## 4 2 2.0 1 1989 Mid-Levels 82.00 1755 NA
## 5 4 3.5 1 1992 Mid-Levels 135.00 3663 NA
## 6 4 5.0 2 n/a Mid-Levels 268.00 4172 NA
## Size of data
dim(HKproperty)
## [1] 60 11
## R's classification of data
class(HKproperty)
## [1] "data.frame"
## R's classification of variables
str(HKproperty)
## 'data.frame': 60 obs. of 11 variables:
## $ Agent : Factor w/ 9 levels "","28Hse","HongKongHomes",..: 5 9 3 3 3 3 3 3 3 3 ...
## $ Type : Factor w/ 4 levels "","Apartment",..: 3 3 3 3 3 2 2 2 2 2 ...
## $ Property : Factor w/ 57 levels "","140 Waterloo Road",..: 24 6 32 30 29 4 10 7 55 31 ...
## $ Bedrooms : int 3 5 4 2 4 4 4 3 3 3 ...
## $ Bathrooms : num 3.5 3 3 2 3.5 5 4 4 2 3 ...
## $ Carspots : int 0 1 1 1 1 2 2 1 1 1 ...
## $ Building.age: Factor w/ 27 levels "","1961","1963",..: 7 12 19 16 18 25 25 25 25 20 ...
## $ Location : Factor w/ 7 levels "","Kowloon Tong",..: 5 5 5 5 5 5 5 5 5 5 ...
## $ Price : num 93 79.9 120 82 135 ...
## $ Size : int 2850 3347 3639 1755 3663 4172 2828 2888 1282 2918 ...
## $ X : logi NA NA NA NA NA NA ...
sapply(HKproperty, class)
## Agent Type Property Bedrooms Bathrooms
## "factor" "factor" "factor" "integer" "numeric"
## Carspots Building.age Location Price Size
## "integer" "factor" "factor" "numeric" "integer"
## X
## "logical"
Summary:
mean(HKproperty$Price)
## [1] 36.499
36.499
## [1] 36.499
median(HKproperty$Price)
## [1] 12.8
12.8
## [1] 12.8
mean(HKproperty$Size)
## [1] 1298.85
1298.86
## [1] 1298.86
median(HKproperty$Size)
## [1] 834
834
## [1] 834
-Each row represents a particular property and each column comprise of the apartment features.
hist(HKproperty$Price)
abline(v = mean(HKproperty$Price), col = "pink")
abline(v = median(HKproperty$Price), col = "blue")
#Analysis of Graph 1 The mean is being pulled up by the expensive villa properties(outliers). - From the perspective of a purchaser, it is more useful to use the median as an indication of what sort of budget is needed to be in the market.This is because our histogram is right skewed, hence the middle data point (median line) is lower than our balancing point (mean line).
-This reflects that the properties of Mid-Levels (affluent district) have very expensive properties, and generally a purchaser with a sensible budget would not be interested in a Midlevel property.
-Our median indicates that 50% of the properties for sale are above and below 12.8 million HKD.A purchaser should be looking at properties below or around 12.8millionHKD. This is a high average considering how small the apartments are. Leading us into comparing the size of properties relative to their price.
median(HKproperty$Size)
## [1] 834
library(plotly)
p2=ggplot(HKproperty, aes(x=Size, y=Price))
p2+geom_point(aes(col=Location))
p1 = plot_ly(HKproperty, x = ~Size, y = ~Price, type = "scatter")
#Analysis of Graph 2
-The median property size of HK apartments are 834 square metres. The purchaser would be looking at spending less/around 12.8 million HKD for a 834 square metre apartment.
-Clusters of properties show buy an HK apartment between 250 - 1000 square feet you would need a budget of at least 8-10million HKD.
-Most purchasers would prefer a more cost-effective apartment within the average property price of 12million and roughly less than 1000 square feet.
median(HKproperty$Bedrooms)
## [1] 2
2
## [1] 2
The median number of Bedrooms is 2,hence 50% of the apartments have less than 2 bedrooms , which corresponds to the results from our scattergraph where the majority of properties are smaller than 1000 square feet.
median(HKproperty$Price[HKproperty$Type == "Apartment" & HKproperty$Bedrooms == "2"])
## [1] 7.8
7.8
## [1] 7.8
In summary, with the current state of HK’s property market, you are likely to purchase an apartment below or around the median price of 12.8million HKD, the property will likely have features of 2 bedrooms and a size of less than 1000 square feet.
A first time purchaser who is looking for a 2 bedroom apartment would need a budget of at least 7.8million HKD ,as indicated by our median price of HK apartments with 2 bedrooms.
On squarefoot.hk there’s a property located in Lamma Island district that is 3 bedrooms, 5.80million HKD (below median price) and 1400 square feet(twice the median average size of 834 square feet.) As a purchaser this property is of excellent value and cost efficient!
We had set the budget to 10million from answering the previous research question.
boxplot(HKproperty$Price~HKproperty$Location, main="Boxplot on property prices by location", ylab = "Price of property in millions (HKD)", xlab = "", cex.axis=0.8,las=2)
title(xlab="Locations in Hong Kong", line=5)
-We took out the “Mid levels” properties because our 2nd RQ focuses on properties within a 10million HKD budget we diregarded Midlevels for RQ2.
-All 5 district’s have a very condensed box,shows that the Property prices do not have much spread, within each district the property prices will all be around the same price.
-This is useful, because it indicates Kwai Chung as an ideal district. As a purchaser if you were to buy a property in the KwaiChung district (the most condensed plot)for any properties you would expect to pay around 6million HKD. -But in Kowloon it is not cost effective district, as you would expect to pay a bit more around 20million HKD for most apartments, and a few outliers (very expensive property). - Comparing this to the interquartile range of 18.6million HKD, a Kwai Chung property is cost efficient.
quantile(HKproperty$Price)
## 0% 25% 50% 75% 100%
## 3.000 6.385 12.800 25.000 268.000
quantile(HKproperty$Price)[4] - quantile(HKproperty$Price)[2]
## 75%
## 18.615
Interquartile range reveals that 50% of HK property costs 18.6million HKD.
We conclude that a purchaser with a budget of $10,000,000 HKD to purchase property from the following districts: Sham Shui Po, Kwai Chung, and Lamma Island.With a budget of 10million HKD, it will be the most cost effective by getting a property with 2 bedrooms, in Kwai Chung,Lamma Island and ShamShui Po.
Summary: - While the affordability on HK apartments may have fallen, purchasers with specific budget of 10,000,000 HKD are still able to find a suitable property within their budget that has 2 bedrooms and is located in a good district (Kwai Chung, Lamma Island).