#Splitting Tarih column of data to year and month in order to use further operations
setDT(data)[, paste0("Tarih", 1:2) := tstrsplit(Tarih, "-")]
by_year <- data %>% group_by(Tarih1)
ggplot(by_year %>% summarise(
`TP TCBF02 ISTANBUL` = mean(`TP TCBF02 ISTANBUL`)
), aes(y=`TP TCBF02 ISTANBUL`, x = Tarih1))+ geom_bar(stat='identity')+ labs(x="Year", y="Istanbul Housing Unit Prices - TL/m^2", color="Hour of Day", title = "Average Housing Unit Prices in Istanbul on a Yearly basis")
## `summarise()` ungrouping output (override with `.groups` argument)
## Warning: Removed 1 rows containing missing values (position_stack).
ggplot(by_year %>% summarise(
`TP DISKONSAT ISTANBUL` = mean(`TP DISKONSAT ISTANBUL`)
), aes(y=`TP DISKONSAT ISTANBUL`, x = Tarih1))+ geom_bar(stat='identity') + labs(x="Year", y="Housing Sales to Foreigners", color="Hour of Day", title = "Average Number of Houses Sold to Foreigners on a Yearly Basis")
## `summarise()` ungrouping output (override with `.groups` argument)
## Warning: Removed 3 rows containing missing values (position_stack).