Number of approved new loan commitments to owner occupier first home buyers in each state is the primary indicator of interest and ability of buying first house.


Among all the factors to answer the question “In which state should we invest more, in order to sell more home loan services?”, number of approved home loans comes first and it shows the market potential in each state. This plot can be divided into three main categories:

  1. Northern Territory, Australian Capital Territory, Tasmania and South Australia

    • These states, more or less, have the least number of home loans; while SA with annual average of 544 loan per year (in last 10 years) has always been on top of the group and NT with annual average of 68 loan per year (in the same period) has always been at the bottom.
  2. New South Wales, Queensland and Western Australia

    • The three middle states are competing and are pretty close together, but NSW with annual average of 1841 loan per year (in last 10 years) was on top of the group since Aug 2018 and WA with annual average of 1444 loan per year (in the same period) was at the bottom since Jul 2017.
  3. Victoria

    • During past 10 years, Victoria has (almost) always had the most number of home loans throughout Australia. This number is 147% bigger than average in Australia.

Data to plot this graph were collected from:

The true measure of past and current market is average monetary value of the loans in each state (number of home loans each year * average value of home loans).


Beside the number of loans in each state, the average value of the loans must be considered which mainly reflects the price of the property in each state. In this context, New South Wales has been the the most expensive state in Australia since Sep 2014 with annual average loan size of $540,000 (in past 10 years). Other states can be compared in two groups:

The importance of these data shines when they are combined with the number of loans in each state. There is a significant difference between Victoria with total loan value of $\(1.80 * 10^{13}\) (in last 10 years) and average of all states by %155.

Data to plot this graph were collected from:

Total money spent on residential construction works is a good indicator of the home loan market. This set of data confirms the previous findings.


Although the total value of residential construction works is not directly pointing to the need for loans, we still can see the market demand for money with this information and it is a good indicator of the financial movements in each state.

Data to plot this graph were collected from:

---
title: "Potential market for home loan services in Australia"
output: 
  flexdashboard::flex_dashboard:
    storyboard: true
    social: menu
    source: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(dplyr)
library(readxl)
library(sp)
library(leaflet)
library(raster)
library(ozmaps)
library(plotly)
library(dygraphs)
library(ggplot2)
```

### Number of approved new loan commitments to owner occupier first home buyers in each state is the primary indicator of interest and ability of buying first house.

```{r}

ausdf <- read.csv("New loan commitments to owner occupier first home buyers (seasonally adjusted), number, by state.csv", header = TRUE, skip = 1, nrows = 217)

NSW = ts(ausdf$NSW, start = c(2004,9), end = c(2022, 9), frequency=12)
Vic = ts(ausdf$Vic, start = c(2004,9), end = c(2022, 9), frequency=12)
Qld = ts(ausdf$Qld, start = c(2004,9), end = c(2022, 9), frequency=12)
SA = ts(ausdf$SA, start = c(2004,9), end = c(2022, 9), frequency=12)
WA = ts(ausdf$WA, start = c(2004,9), end = c(2022, 9), frequency=12)
Tas = ts(ausdf$Tas, start = c(2004,9), end = c(2022, 9), frequency=12)
NT = ts(ausdf$NT, start = c(2004,9), end = c(2022, 9), frequency=12)
ACT = ts(ausdf$ACT, start = c(2004,9), end = c(2022, 9), frequency=12)

nloan = cbind(NSW, Vic, Qld, SA, WA, Tas, NT, ACT)

dygraph(nloan, main = "Number of loan commitments to owner occupier") %>%
  dyRangeSelector(dateWindow = c("2012-09-01", "2022-09-01")) %>%
  dyHighlight(highlightCircleSize = 5, 
              highlightSeriesBackgroundAlpha = 0.2,
              hideOnMouseOut = TRUE) %>%
  dyEvent("2020-01-25", "First Covid case in Australia", labelLoc = "bottom") %>%
  dyEvent("2021-03-01", "3-year fixed rate interest reaches to minimum of 2.14%",
          labelLoc = "bottom") %>%
  dyEvent("2009-03-01", "Interest rates reach to minimum of FR = 5.6% & VR = 5.85%",
          labelLoc = "bottom")

```

***

Among all the factors to answer the question "In which state should we invest more, in order to sell more home loan services?", number of approved home loans comes first and it shows the market potential in each state. This plot can be divided into three main categories:

1. Northern Territory, Australian Capital Territory, Tasmania and South Australia
  
    + These states, more or less, have the least number of home loans; while SA with annual average of 544 loan per year (in last 10 years) has always been on top of the group and NT with annual average of 68 loan per year (in the same period) has always been at the bottom.
  
2. New South Wales, Queensland and Western Australia
  
    + The three middle states are competing and are pretty close together, but NSW with annual average of 1841 loan per year (in last 10 years) was on top of the group since Aug 2018 and WA with annual average of 1444 loan per year (in the same period) was at the bottom since Jul 2017.
  
3. Victoria
  
    + During past 10 years, Victoria has (almost) always had the most number of home loans throughout Australia. This number is 147% bigger than average in Australia. 


Data to plot this graph were collected from:

- [Australian Bureau of Statistics 2022, Lending indicators, ABS, viewed 4 December 2022, <https://www.abs.gov.au/statistics/economy/finance/lending-indicators/sep-2022>.](https://www.abs.gov.au/statistics/economy/finance/lending-indicators/sep-2022)

- [Orange Mortgage and Finance Brokers 2022, Historical home loan interest rates Australia, viewed 4 December 2022, < https://www.orangefinance.net.au/historical-interest-rates>.](https://www.orangefinance.net.au/historical-interest-rates/)

- [Parliament of Australia 2022, First confirmed case of novel coronavirus in Australia, APH, viewed 4 December 2022, <https://parlinfo.aph.gov.au/parlInfo/search/display/display.w3p;query=Id%3A%22media%2Fpressrel%2F7158085%22>.](https://parlinfo.aph.gov.au/parlInfo/search/display/display.w3p;query=Id%3A%22media%2Fpressrel%2F7158085%22)



### The true measure of past and current market is average monetary value of the loans in each state (number of home loans each year * average value of home loans).

```{r}
loansize <- read.csv("Yearly loan size.csv", header = TRUE)
ynloan <- read.csv("Yearly new loans.csv", header = TRUE)

ausum <- data.frame("State" = c("New South Wales", "Victoria",
                                "Queensland", "South Australia",
                                "Western Australia", "Tasmania",
                                "Northern Territory", "Australian Capital Territory"),
  "LY" = c(as.integer(loansize$NSW[loansize$Year==2022] *
                      ynloan$NSW[loansize$Year==2022]),
            as.integer(loansize$Vic[loansize$Year==2022] *
                      ynloan$Vic[loansize$Year==2022]),
            as.integer(loansize$Qld[loansize$Year==2022] *
                       ynloan$Qld[loansize$Year==2022]),
            as.integer(loansize$SA[loansize$Year==2022] *
                       ynloan$SA[loansize$Year==2022]),
            as.integer(loansize$WA[loansize$Year==2022] *
                       ynloan$WA[loansize$Year==2022]),
            as.integer(loansize$Tas[loansize$Year==2022] *
                       ynloan$Tas[loansize$Year==2022]),
            as.integer(loansize$NT[loansize$Year==2022] *
                       ynloan$NT[loansize$Year==2022]),
            as.integer(loansize$ACT[loansize$Year==2022] *
                       ynloan$ACT[loansize$Year==2022])),
                    "AA10" = c(as.integer(mean(loansize$NSW) * mean(ynloan$NSW)),
                               as.integer(mean(loansize$Vic) * mean(ynloan$Vic)),
                               as.integer(mean(loansize$Qld) * mean(ynloan$Qld)),
                               as.integer(mean(loansize$SA) * mean(ynloan$SA)),
                               as.integer(mean(loansize$WA) * mean(ynloan$WA)),
                               as.integer(mean(loansize$Tas) * mean(ynloan$Tas)),
                               as.integer(mean(loansize$NT) * mean(ynloan$NT)),
                               as.integer(mean(loansize$ACT) * mean(ynloan$ACT))))

ausum$hover <- with(ausum, paste(State, "<br>", "Last year ($B):", LY, "<br>",
                                 "Annual average (10 years, $B):", AA10))

aus <- ozmap("states")

cols <- colorNumeric(palette = "Reds", domain = ausum$LY)

leaflet() %>%
  addPolygons(data = aus,
              label = with(ausum, paste(State, ": Last year ($B):", LY,
                           " / Annual average (10 years, $B):", AA10)),
              popup = ausum$hover,
              stroke = TRUE,
              fillColor = cols(ausum$LY),
              fillOpacity = 0.9,
              color = "white",
              weight = 0.3) %>%
  addLegend(position = "topright",
            title = "Value of loans ($B)",
            pal = cols,
            values = ausum$LY)

```

***

Beside the number of loans in each state, the average value of the loans must be considered which mainly reflects the price of the property in each state. In this context, New South Wales has been the the most expensive state in Australia since Sep 2014 with annual average loan size of $540,000 (in past 10 years). Other states can be compared in two groups:

- Victoria and Australian Capital Territory fluctuate around the Australian annual average loan size average of \$445,000, with \$458,000 and $444,000 respectively.

- Among the other states, although Western Australia has the highest annual average loan size of $396,000, Queensland has has been on top of the last group since Mar 2019 with annual average loan size of \$388,000. Northern Territory, South Australia and Tasmania are almost going together with annual average loan size of \$380,000, \$340,000 and \$298,000 respectively.


_The importance of these data shines when they are combined with the number of loans in each state. There is a significant difference between Victoria with total loan value of \$$1.80 * 10^{13}$ (in last 10 years) and average of all states by %155._


Data to plot this graph were collected from:

- [Australian Bureau of Statistics 2022, Lending indicators, ABS, viewed 4 December 2022, <https://www.abs.gov.au/statistics/economy/finance/lending-indicators/sep-2022>.](https://www.abs.gov.au/statistics/economy/finance/lending-indicators/sep-2022)



### Total money spent on residential construction works is a good indicator of the home loan market. This set of data confirms the previous findings.

```{r}

consdata <- read.csv("Residential construction.csv", header = TRUE)
consdata$State <- factor(consdata$State, 
                         levels = c("NSW","Vic","Qld", "SA", "WA", "Tas", "NT", "ACT"),
                         labels = c("NSW","Vic","Qld", "SA", "WA", "Tas", "NT", "ACT"),
                         ordered = TRUE)

construction <- ggplot(data = consdata, aes(x = Period, y = Value, fill = State)) +
  geom_bar(stat = "identity", position = "dodge") +
  xlab("") + ylab("Value (B$)") +
  scale_fill_manual(values = c('#e41a1c','#377eb8','#4daf4a','#984ea3',
                             '#ff7f00','#ffff33','#a65628','#f781bf')) +
  scale_colour_manual(values = c('#e41a1c','#377eb8','#4daf4a','#984ea3',
                                 '#ff7f00','#ffff33','#a65628','#f781bf')) +
  theme(axis.title.y = element_text(size = 12),
        panel.grid.major.y = element_line(color = "lightgray"),
        panel.background = element_rect(fill = "white", colour = "white")) +
  labs(title = "Total value of residential construction works")

ggplotly(construction)


```

***

Although the total value of residential construction works is not directly pointing to the need for loans, we still can see the market demand for money with this information and it is a good indicator of the financial movements in each state.

- Comparing to New South Wales, Victoria has picked up in last 10 years but showing slight drop in past year. In the last year, Victoria and New South Wales possessed respectively 33.67% and 31.17% of the residential construction money in Australia.

- Queensland is improving as this state has the highest rate of population increase in Australia(abs.gov.au). Queensland share is 18.08% of all Australia.

- Western Australia, South Australia, Australian Capital Territory, Tasmania and Northern Territory are have the lowest values with WA on top of the group and NT at the bottom.

Data to plot this graph were collected from:

- [Australian Bureau of Statistics 2022, Building Activity, Australia, ABS, viewed 4 December 2022, <https://www.abs.gov.au/statistics/industry/building-and-construction/building-activity-australia/jun-2022>.](https://www.abs.gov.au/statistics/industry/building-and-construction/building-activity-australia/jun-2022)