Dataset Preparation

istanbul_property <- read_xlsx("/Users/Toshiba/Desktop/Big Data Analytics/MEF/Data Analytics Essentials/EVDS_istanbul_property_data.xlsx", n_max = 130)

istanbul_prop <- istanbul_property %>%
  select(date = "Tarih", total_sales = "TP AKONUTSAT1 T40", mortgage_sales = "TP AKONUTSAT2 T40", first_hand_sales = "TP AKONUTSAT3 T40", second_hand_sales = "TP AKONUTSAT4 T40", foreign_sales = "TP DISKONSAT ISTANBUL", newhouse_priceindex = "TP HEDONIKYKFE IST", price_index = "TP HKFE02", unit_price = "TP TCBF02 ISTANBUL")

Total Sales between 2013 - 2019

We can clearly observe that total number of sales has a slightly increasing trend despite the fluctuation in some periods.

istanbul_prop_year <- istanbul_prop %>%
  group_by(year = substr(date, 1, 4)) %>%
  filter(year < 2020 & year > 2012) %>%
  summarize(sum_sales = sum(total_sales)) 
## `summarise()` ungrouping output (override with `.groups` argument)
ggplot(istanbul_prop_year, aes(x = year, y = sum_sales, group = 1)) + 
  geom_line() + 
  labs(x = "Year", y = "Total Number of Sales")

Sales in 2020 Until September

We have data until September 2020, therefore a new graph that is independent from the previous one is created. It can be observed that in 2020 after March when the first COVID-19 case is observed in Turkey, it cut down the sales of properties for 2-month-period when serious precautions were taken by the government. However, after that period, the property sales went up again regardless of COVID-19.

istanbul_prop_month <- istanbul_prop %>%
  group_by(year = substr(date, 1, 4), month = substr(date, 6,7)) %>%
  filter(year == 2020) %>%
  summarize(sum_sales_2020 = sum(total_sales)) %>%
  ungroup()
## `summarise()` regrouping output by 'year' (override with `.groups` argument)
ggplot(istanbul_prop_month, aes(x = month , y = sum_sales_2020, group = 1)) + 
  geom_line() + 
  labs(x = "Month", y = "Total Number of Sales")