Russian dissent
Lukoil chief, Ravil Maganov dies following “a severe illness”. - Reportedly severely falling from a window.. Not the first Ukraine war critic to meet an untimely end, but reports of dissent are growing. This is on the back of multiple generals being killed or sacked and the Ukraine retaking territory.
Aljazeera: Zelenskyy said Ukrainian forces would keep up the pressure on Russia.
“Perhaps now it seems to some of you that after a series of victories we now have a lull of sorts,” he said in his nightly video address. “But this is not a lull. This is preparation for the next series … Because Ukraine must be free – all of it.”
Ursula targets €140bn in windfall taxes
The only thing certain about the windfall taxes are that they will be contentious. The European Commissions proposals will have to be approved by member states, who having varying positions on the matter, who meet on the 30th of September. Many countries (Ireland included) will have set policy in the meantime, creating further complications.
The Commission is set to negotiate reconstruction proposals with Ukraine on the 25th of October, which will also not be without difficulty.
Xi and Modi sit down with Putin
Xi and Putins “relationship without limits” yielded its first face to face meeting since the Beijing Winter Olympics. Curiously Putin says that Xi expressed concerns over Ukraine (Reuters).
This is as Modi, Indias leader tells Putin “now is not the era of war”. - Modi has been playing both sides effectively to date. I think ultimately they will continue to align with the US. India is a member of “Quad” (Australia, Japan, USA).
Pound sinks with mixed UK data
The pound dropped to its lowest level vs the dollar since 1987. This drop came on the anniversary of Black Wednesday 1992 This was one of the days that made George Soros a legend and hit the Bank of England for billions - See that documentary for detail on that day.
UK inflation “surprised” coming in slightly lower than analyst estimates. On the other hand retail sales are down 5.4% on the year (Yahoo Finance). Meanwhile details are yet to emerge on Liz Truss’ 150-200bn pound proposed economic package.
Report of the Commission on Taxation and Welfare
Leo caught the headlines during the week with his response to a 500 page report into all things tax. Saying some of the recommendations in the report were “straight out of the Sinn Féin manifesto”. Most of the commentators who certainly have not read the full report (nor have I) have their headlines made for them with these comments. I have a feeling this will be an own goal for Leo.
The report was issued with an executive summary (still 30+ pages) but from my reading of the summary the detail required to understand the magnitude of the policies is in the full issue. Many academics and professionals made up the commission which published the report, so by comparing it to the Sinn Féin manifesto is Leo accidentially validating SF?
The budget is set for the 27th. Here is what the Independent think will feature
Elsewhere in Europe
US inflation suprises to the upside as the S&P 500 sinks
High profile market participants such as Ray Dalio estimate the market could be in for a 20% decline based on where interest rates have to go. Judging from other commentators on Bloomberg 3350-3500 on the S&P for year end seems plausible. - But then again, what do I know.
# Ensure to change CSV name to apprpriate version number / working directory
SNP <- getSymbols("^GSPC",src='yahoo',auto.assign=FALSE)
ISEQ <- getSymbols("^ISEQ",src='yahoo',auto.assign=FALSE)
SNP$Close.MA5 <- rollmean(SNP$GSPC.Close,5)
SNP$Close.MA5 <- Lag(SNP$Close.MA5,2)
SNP$Close.MA10 <- rollmean(SNP$GSPC.Close,10)
SNP$Close.MA10 <- Lag(SNP$Close.MA10,5)
ISEQ$Close.MA5 <- rollmean(ISEQ$ISEQ.Close,5)
ISEQ$Close.MA5 <- Lag(ISEQ$Close.MA5,2)
ISEQ$Close.MA10 <- rollmean(ISEQ$ISEQ.Close,10)
ISEQ$Close.MA10 <- Lag(ISEQ$Close.MA10,5)
write.csv(SNP,"SNP.N1.1.csv")
write.csv(ISEQ,"ISEQ.N1.1.csv")
SNP_Sep22 <- SNP %>%
subset(date(index(.))>= "2022-09-01")
ISEQ_Sep22 <- ISEQ %>%
subset(date(index(.))>= "2022-09-01")
SNP_YTD <- SNP %>%
subset(date(index(.))>= "2022-01-01")
ISEQ_YTD <- ISEQ %>%
subset(date(index(.))>= "2022-01-01")
SNP_end <- as.data.frame(tail(SNP_YTD,1))
ISEQ_end <- as.data.frame(tail(ISEQ_YTD,1))
Fig.SNP.YTD<-ggplot(data=SNP_YTD,aes(x=Index,y=GSPC.Close,group=1))+
geom_line(data=SNP_YTD,aes(x=Index,y=Close.MA5,group=1),alpha=0.5,colour="#9200ff")+
geom_line(data=SNP_YTD,aes(x=Index,y=Close.MA10,group=1),alpha=0.5,colour="#290047",linetype="dashed")+
geom_line(colour="#D49CFE",size=1)+
geom_text_repel(aes(label=round(GSPC.Close,digits=2)),data = SNP_YTD, size = 2.5,max.overlaps = 4,colour="#f6f7f6")+
theme_dark()+
ggtitle("S&P YTD")+
xlab("Dates")+ scale_y_continuous(sec.axis = sec_axis(~ ., breaks = SNP_end$GSPC.Close))+ theme(axis.text = element_text(size = 6))
Fig.ISEQ.YTD<-ggplot(data=ISEQ_YTD,aes(x=Index,y=ISEQ.Close,group=1))+
geom_line(data=ISEQ_YTD,aes(x=Index,y=Close.MA5,group=1),alpha=0.5,colour="#15e600")+
geom_line(data=ISEQ_YTD,aes(x=Index,y=Close.MA10,group=1),alpha=0.5,colour="#0f6606",linetype="dashed")+
geom_line(colour="#A5FE9C",size=1)+
geom_text_repel(aes(label=round(ISEQ.Close,digits=2)),data = ISEQ_YTD, size = 2.5,max.overlaps = 4,colour="#f6f7f6")+
theme_dark()+
ggtitle("ISEQ YTD")+
xlab("Dates")+ scale_y_continuous(sec.axis = sec_axis(~ ., breaks = ISEQ_end$ISEQ.Close))+ theme(axis.text = element_text(size = 6))
Fig.SNP.YTD+Fig.ISEQ.YTD+plot_layout(ncol=2)+
labs(caption = "Moving Averages: dashed line = 5 day, solid line = 10 day")
Fig.SNP.Sep<-ggplot(data=SNP_Sep22,aes(x=Index,y=GSPC.Close,group=1))+
geom_line(data=SNP_Sep22,aes(x=Index,y=Close.MA5,group=1),alpha=0.5,colour="#9200ff")+
geom_line(data=SNP_Sep22,aes(x=Index,y=Close.MA10,group=1),alpha=0.5,colour="#290047",linetype="dashed")+
geom_line(colour="#D49CFE",size=1)+
geom_text_repel(aes(label=round(GSPC.Close,digits=2)),data = SNP_Sep22, size = 2.5,max.overlaps = 4,colour="#f6f7f6")+
theme_dark()+
ggtitle("S&P Sep22")+
xlab("Dates")+ scale_y_continuous(sec.axis = sec_axis(~ ., breaks = SNP_end$GSPC.Close))+ theme(axis.text = element_text(size = 6))
Fig.ISEQ.Sep<-ggplot(data=ISEQ_Sep22,aes(x=Index,y=ISEQ.Close,group=1))+
geom_line(data=ISEQ_Sep22,aes(x=Index,y=Close.MA5,group=1),alpha=0.5,colour="#15e600")+
geom_line(data=ISEQ_Sep22,aes(x=Index,y=Close.MA10,group=1),alpha=0.5,colour="#0f6606",linetype="dashed")+
geom_line(colour="#A5FE9C",size=1)+
geom_text_repel(aes(label=round(ISEQ.Close,digits=2)),data = ISEQ_Sep22, size = 2.5,max.overlaps = 4,colour="#f6f7f6")+
theme_dark()+
ggtitle("ISEQ Sep22")+
xlab("Dates")+ scale_y_continuous(sec.axis = sec_axis(~ ., breaks = ISEQ_end$ISEQ.Close))+ theme(axis.text = element_text(size = 6))
Fig.SNP.Sep+Fig.ISEQ.Sep+plot_layout(ncol=2)+
labs(caption = "Moving Averages: dashed line = 5 day, solid line = 10 day")
Both oil and gas are off yearly highs with the former being down 28-30% approximately. Goldman said on Tuesday it expected European wholesale natural gas prices to fall from about €215 a megawatt hour to below €100 a MWh by the end of the first quarter of next year, assuming typical winter weather conditions.
BRENT <- getSymbols("BZ=F",src='yahoo',auto.assign=FALSE)
WTI <- getSymbols("CL=F",src='yahoo',auto.assign=FALSE)
NGAS <- getSymbols("NG=F",src='yahoo',auto.assign=FALSE)
write.csv(BRENT,"BRENT.N2.2.csv")
write.csv(WTI,"WTI.N2.2.csv")
write.csv(NGAS,"NGAS.N2.2.csv")
BRENT_AVG <- mean(BRENT$`BZ=F.Close`,na.rm=TRUE)
BRENT_TAIL <- tail(BRENT,1)
BRENT_CLOSE <- mean(BRENT_TAIL$`BZ=F.Close`,na.rm=TRUE)
WTI_AVG <- mean(WTI$`CL=F.Close`,na.rm=TRUE)
WTI_TAIL <- tail(WTI,1)
WTI_CLOSE <- mean(WTI_TAIL$`CL=F.Close`,na.rm=TRUE)
NGAS_AVG <- mean(NGAS$`NG=F.Close`,na.rm=TRUE)
NGAS_TAIL <- tail(NGAS,1)
NGAS_CLOSE <- mean(NGAS_TAIL$`NG=F.Close`,na.rm=TRUE)
#Oil Plots
Fig.Brent1<-ggplot(data=BRENT,aes(x=Index,y=`BZ=F.Close`,group=1))+
geom_line()+
geom_hline(yintercept=BRENT_CLOSE,alpha=0.5)+
geom_hline(yintercept=BRENT_AVG,linetype='dashed')+
theme_bw()+
ggtitle("Brent Crude Price (BZ=F)")+
ylab("Price - USD")+
xlab(NULL)+ theme(axis.text = element_text(size = 6))
Fig.WTI1<-ggplot(data=WTI,aes(x=Index,y=`CL=F.Close`,group=1))+
geom_line(colour="darkgrey")+
geom_hline(yintercept=WTI_CLOSE,colour="darkgrey",alpha=0.8)+
geom_hline(yintercept=WTI_AVG,linetype='dashed',colour="darkgrey")+
theme_bw()+
ggtitle("West Texas Intermediary (WTI) Price (CL=F)")+
ylab("Price - USD")+
xlab(NULL)+ theme(axis.text = element_text(size = 6))
#Gas Plots
Fig.NGAS1<-ggplot(data=NGAS,aes(x=Index,y=`NG=F.Close`,group=1))+
geom_line(colour="darkblue")+
geom_hline(yintercept=NGAS_CLOSE,colour="darkblue",alpha=0.5)+
geom_hline(yintercept=NGAS_AVG,linetype='dashed',colour="darkblue")+
theme_bw()+
ggtitle("Natural Gas Price (NG=F)")+
ylab("Price - USD")+
xlab("Dates")+
labs(caption = "dashed line = average, solid line = closing price")+ theme(axis.text = element_text(size = 6))
# Total Series for Energy
Fig.Energy.TS<-Fig.Brent1 + Fig.WTI1 + Fig.NGAS1 +
plot_layout(nrow=3)
BRENT_YTD <- BRENT %>%
subset(date(index(.))>= "2022-01-01")
WTI_YTD <- WTI %>%
subset(date(index(.))>= "2022-01-01")
NGAS_YTD <- NGAS %>%
subset(date(index(.))>= "2022-01-01")
BRENT_YTD_AVG <- mean(BRENT_YTD$`BZ=F.Close`,na.rm=TRUE)
BRENT_YTD_TAIL <- tail(BRENT_YTD,1)
BRENT_YTD_CLOSE <- mean(BRENT_YTD_TAIL$`BZ=F.Close`,na.rm=TRUE)
WTI_YTD_AVG <- mean(WTI_YTD$`CL=F.Close`,na.rm=TRUE)
WTI_YTD_TAIL <- tail(WTI_YTD,1)
WTI_YTD_CLOSE <- mean(WTI_YTD_TAIL$`CL=F.Close`,na.rm=TRUE)
NGAS_YTD_AVG <- mean(NGAS_YTD$`NG=F.Close`,na.rm=TRUE)
NGAS_YTD_TAIL <- tail(NGAS_YTD,1)
NGAS_YTD_CLOSE <- mean(NGAS_YTD_TAIL$`NG=F.Close`,na.rm=TRUE)
#Oil Plots
Fig.Brent2<-ggplot(data=BRENT_YTD,aes(x=Index,y=`BZ=F.Close`,group=1))+
geom_line()+
geom_hline(yintercept=BRENT_YTD_CLOSE,alpha=0.5)+
geom_hline(yintercept=BRENT_YTD_AVG,linetype='dashed')+
theme_bw()+
ggtitle("Brent Crude Price (BZ=F)")+
ylab(NULL)+
xlab(NULL)+ theme(axis.text = element_text(size = 6))
Fig.WTI2<-ggplot(data=WTI_YTD,aes(x=Index,y=`CL=F.Close`,group=1))+
geom_line(colour="darkgrey")+
geom_hline(yintercept=WTI_YTD_CLOSE,colour="darkgrey",alpha=0.8)+
geom_hline(yintercept=WTI_YTD_AVG,linetype='dashed',colour="darkgrey")+
theme_bw()+
ggtitle("West Texas Intermediary (WTI) Price (CL=F)")+
ylab(NULL)+
xlab(NULL)+ theme(axis.text = element_text(size = 6))
#Gas Plots
Fig.NGAS2<-ggplot(data=NGAS_YTD,aes(x=Index,y=`NG=F.Close`,group=1))+
geom_line(colour="darkblue")+
geom_hline(yintercept=NGAS_YTD_CLOSE,colour="darkblue",alpha=0.5)+
geom_hline(yintercept=NGAS_YTD_AVG,linetype='dashed',colour="darkblue")+
theme_bw()+
ggtitle("Natural Gas Price (NG=F)")+
ylab(NULL)+
xlab("Dates")+
labs(caption = "dashed line = average, solid line = closing price")+ theme(axis.text = element_text(size = 6))
# YTD
Fig.Energy.YTD<-Fig.Brent2 + Fig.WTI2 + Fig.NGAS2 +
plot_layout(nrow=3)
Fig.Brent1+Fig.Brent2+Fig.WTI1+Fig.WTI2+Fig.NGAS1+Fig.NGAS2+
plot_layout(nrow=3)
rm(ISEQ)
rm(ISEQ_July22)
rm(ISEQ_YTD)
rm(SNP)
rm(SNP_July22)
rm(SNP_YTD)
# Euro Area
EA.1YR <- get_data("YC.B.U2.EUR.4F.G_N_A.SV_C_YM.SR_1Y")
EA.1YR$obstime<-convert_dates(EA.1YR$obstime)
Fig_EA.1YR<-ggplot(data=EA.1YR,aes(x=obstime,y=obsvalue,group=ref_area))+
geom_line(colour="blue")+
geom_hline(yintercept = 0, linetype='dotted')+
geom_text_repel(aes(label=round(obsvalue,digits=2)),data = EA.1YR, size = 3)+
theme_bw()+
theme(legend.position = "bottom")+
ggtitle("1 Year Maturity")+
ylab("yield (%)")+
xlab(NULL)
EA.5YR <- get_data("YC.B.U2.EUR.4F.G_N_A.SV_C_YM.SR_5Y")
EA.5YR$obstime<-convert_dates(EA.5YR$obstime)
Fig_EA.5YR<-ggplot(data=EA.5YR,aes(x=obstime,y=obsvalue,group=ref_area))+
geom_line(colour="blue")+
geom_hline(yintercept = 0, linetype='dotted')+
geom_text_repel(aes(label=round(obsvalue,digits=2)),data = EA.5YR, size = 3)+
theme_bw()+
theme(legend.position = "bottom")+
ggtitle("5 Year Maturity")+
ylab("yield (%)")+
xlab(NULL)
EA.10YR <- get_data("YC.B.U2.EUR.4F.G_N_A.SV_C_YM.SR_10Y")
EA.10YR$obstime<-convert_dates(EA.10YR$obstime)
Fig_EA.10YR<-ggplot(data=EA.10YR,aes(x=obstime,y=obsvalue,group=ref_area))+
geom_line(colour="blue")+
geom_hline(yintercept = 0, linetype='dotted')+
geom_text_repel(aes(label=round(obsvalue,digits=2)),data = EA.10YR, size = 3)+
theme_bw()+
theme(legend.position = "bottom")+
ggtitle("10 Year Maturity")+
ylab("yield (%)")+
xlab(NULL)
EA.30YR <- get_data("YC.B.U2.EUR.4F.G_N_A.SV_C_YM.SR_30Y")
EA.30YR$obstime<-convert_dates(EA.30YR$obstime)
Fig_EA.30YR<-ggplot(data=EA.30YR,aes(x=obstime,y=obsvalue,group=ref_area))+
geom_line(colour="blue")+
geom_hline(yintercept = 0, linetype='dotted')+
geom_text_repel(aes(label=round(obsvalue,digits=2)),data = EA.30YR, size = 3)+
theme_bw()+
theme(legend.position = "bottom")+
ggtitle("30 Year Maturity")+
ylab("yield (%)")+
xlab(NULL)
Fig_EA.1YR+Fig_EA.5YR+Fig_EA.10YR+Fig_EA.30YR+
plot_layout(nrow=2,ncol=2)
# Generate yield curve
EA.1YR_Print<-tail(EA.1YR,1)
EA.5YR_Print<-tail(EA.5YR,1)
EA.10YR_Print<-tail(EA.10YR,1)
EA.30YR_Print<-tail(EA.30YR,1)
EA.YieldCurve <- rbind(EA.1YR_Print,EA.5YR_Print,EA.10YR_Print,EA.30YR_Print)
EA.YieldCurve$year <- sub("\\Y.*","",EA.YieldCurve$data_type_fm)
EA.YieldCurve$year <- sub(".*SR_","",EA.YieldCurve$year)
EA.YieldCurve$year <- as.numeric(EA.YieldCurve$year)
Fig_EA.YieldCurve<-ggplot(data=EA.YieldCurve,aes(x=year,y=obsvalue,group=ref_area))+
geom_line(colour="blue")+
geom_text(label=round(EA.YieldCurve$obsvalue,digits=2),vjust=-1,hjust=1,colour="blue")+
theme_bw()+
theme(legend.position = "bottom")+
ggtitle("Yield Curve")+
ylab("yield (%)")+
xlab(NULL)
Fig_EA.YieldCurve
As we’ve seen the ECB have begun to raise rates, inflation has brought on a new cycle which will likely last a number of years as they try to regain price stability. During the rate hike cycle from December 2005 inflation was far closer to 2%, not the 9.1% we see today.
A 2018 working paper commented on the period “…. increasing upside risks to price stability at medium to longer horizons towards the end of 2005. In response, the ECB started raising its policy rate as of December 2005 eventually by a total of 200 basis points to a level of 4% by the end of June 2007”. If that is anything to go by we will likely see another 2 to 2.5% increase from the ECB. This could be higher or lower depending on the economic fallout of the winter.
See the varying responsiveness of interest rates for mortgages versus the ECB deposit rate facility, the 2005-2006 cycle seen the German rate increase by 100 basis points approx. where as the Irish increased about 200 basis points, proportional to the increase from the ECB. This time around the Germans may be more responsive, whether this is due to their acute energy pressures I am not sure. There is certainly some hesitancy with the Irish banks not wanting to be the first to increase rates. However, I expect them to increase the rates this week or early next. An article in the Irish Times suggesting that the eligibility criteria is under review, and that this would be taken into consideration in their mortgage calculator by Tuesday the 20th of September.
# Load Banking & Borrowing Data from ECB: https://sdw.ecb.europa.eu/browse.do?node=9689346
## Bank interest rates - loans to households for house purchase APRC (new business)
### Pull in Ireland, check plot quickly
IE.BIR_H <- get_data("MIR.M.IE.B.A2C.A.C.A.2250.EUR.N")
IE.BIR_H$obstime<-convert_dates(IE.BIR_H$obstime)
IE.BIR_H$as.yearmon <- as.yearmon(IE.BIR_H$obstime)
# IE.BIR_H %>%
# ggplot(aes(x=obstime,y=obsvalue))+
# geom_line()
### Pull in Germay, France and Italy
DE.BIR_H <- get_data("MIR.M.DE.B.A2C.A.C.A.2250.EUR.N")
DE.BIR_H$obstime<-convert_dates(DE.BIR_H$obstime)
DE.BIR_H$as.yearmon <- as.yearmon(DE.BIR_H$obstime)
FR.BIR_H <- get_data("MIR.M.FR.B.A2C.A.C.A.2250.EUR.N")
FR.BIR_H$obstime<-convert_dates(FR.BIR_H$obstime)
FR.BIR_H$as.yearmon <- as.yearmon(FR.BIR_H$obstime)
IT.BIR_H <- get_data("MIR.M.IT.B.A2C.A.C.A.2250.EUR.N")
IT.BIR_H$obstime<-convert_dates(IT.BIR_H$obstime)
IT.BIR_H$as.yearmon <- as.yearmon(IT.BIR_H$obstime)
### Bind all
BIR_H.1 <- rbind(IE.BIR_H,DE.BIR_H,FR.BIR_H,IT.BIR_H)
BIR_H.1_end <- BIR_H.1 %>%
group_by(ref_area)%>%
slice(which.max(obstime))
IE.BIR_H_end <- IE.BIR_H %>%
group_by(ref_area)%>%
slice(which.max(obstime))
DE.BIR_H_end <- DE.BIR_H %>%
group_by(ref_area)%>%
slice(which.max(obstime))
FR.BIR_H_end <- FR.BIR_H %>%
group_by(ref_area)%>%
slice(which.max(obstime))
IT.BIR_H_end <- IT.BIR_H %>%
group_by(ref_area)%>%
slice(which.max(obstime))
###### create labels
IE.BIR_H_end$lab <- paste(as.character(IE.BIR_H_end$as.yearmon), ":", IE.BIR_H_end$obsvalue)
DE.BIR_H_end$lab <- paste(as.character(DE.BIR_H_end$as.yearmon), ":", DE.BIR_H_end$obsvalue)
FR.BIR_H_end$lab <- paste(as.character(FR.BIR_H_end$as.yearmon), ":", FR.BIR_H_end$obsvalue)
IT.BIR_H_end$lab <- paste(as.character(IT.BIR_H_end$as.yearmon), ":", IT.BIR_H_end$obsvalue)
### Plot all
Fig.Rates.1 <- BIR_H.1 %>%
ggplot(aes(x=obstime,y=obsvalue,colour=ref_area,group=ref_area))+
geom_line()+
geom_text_repel(aes(label=obsvalue),size=2.5,colour="#666666")+
geom_text_repel(aes(label=obsvalue),data=BIR_H.1_end,size=3,colour="black")+
theme_bw()+
theme(legend.position = "bottom")+
facet_wrap(~ref_area,ncol=2)+
ylab("%")+
ggtitle("Bank Interest Rates")+
labs(subtitle = "Loans to households for house purchase")
# Load Main refinancing operation/ECB Deposit facility
MRO.DF <- get_data("FM.B.U2.EUR.4F.KR.DFR.LEV")
MRO.DF$obstime<-convert_dates(MRO.DF$obstime)
MRO.DF$as.yearmon <- as.yearmon(MRO.DF$obstime)
MRO.DF_03 <- MRO.DF %>%
filter(obstime >= "2003-01-01")
MRO.DF_03_end <- MRO.DF_03 %>%
slice(which.max(obstime))
MRO.DF_03_end$lab <- paste(as.character(MRO.DF_03_end$as.yearmon), ":", MRO.DF_03_end$obsvalue)
# Generate Each Plot, title the Irish plot and add the deposit rate to each. Then create the four panels. Adding footnote to the final panel
Facet1 <- IE.BIR_H %>%
ggplot(aes(x=obstime,y=obsvalue,group=ref_area))+
geom_line(colour="darkgreen")+geom_step(data=MRO.DF_03,aes(x=obstime,y=obsvalue),linetype="dotted",alpha=0.7)+
geom_text_repel(aes(label=obsvalue),size=2.5,colour="#666666")+
geom_text_repel(aes(label=lab),data=IE.BIR_H_end,size=2.75,colour="black",fontface='bold')+
geom_text_repel(aes(label=lab),data=MRO.DF_03_end,size=2.75,colour="black",fontface='bold')+
theme_bw()+
theme(legend.position = "bottom")+
ylab("%")+
xlab(NULL)+
ggtitle("Bank Interest Rates: Loans to households for house purchase")+
labs(subtitle = "Ireland")
Facet2 <- DE.BIR_H %>%
ggplot(aes(x=obstime,y=obsvalue,group=ref_area))+
geom_line(colour="#FFCE00")+geom_step(data=MRO.DF_03,aes(x=obstime,y=obsvalue),linetype="dotted",alpha=0.7)+
geom_text_repel(aes(label=obsvalue),size=2.5,colour="#666666")+
geom_text_repel(aes(label=obsvalue),data=DE.BIR_H_end,size=2.75,colour="black",fontface='bold')+
theme_bw()+
theme(legend.position = "bottom")+
ylab(NULL)+
xlab(NULL)+
labs(subtitle = "Germany")
Facet3 <- FR.BIR_H %>%
ggplot(aes(x=obstime,y=obsvalue,group=ref_area))+
geom_line(colour="#0055A4")+geom_step(data=MRO.DF_03,aes(x=obstime,y=obsvalue),linetype="dotted",alpha=0.7)+
geom_text_repel(aes(label=obsvalue),size=2.5,colour="#666666")+
geom_text_repel(aes(label=obsvalue),data=FR.BIR_H_end,size=2.75,colour="black",fontface='bold')+
theme_bw()+
theme(legend.position = "bottom")+
ylab("%")+
xlab(NULL)+
labs(subtitle = "France")
Facet4 <- IT.BIR_H %>%
ggplot(aes(x=obstime,y=obsvalue,group=ref_area))+
geom_line(colour="#008C45")+geom_step(data=MRO.DF_03,aes(x=obstime,y=obsvalue),linetype="dotted",alpha=0.7)+
geom_text_repel(aes(label=obsvalue),size=2.5,colour="#666666")+
geom_text_repel(aes(label=obsvalue),data=IT.BIR_H_end,size=2.75,colour="black",fontface='bold')+
theme_bw()+
theme(legend.position = "bottom")+
ylab(NULL)+
xlab(NULL)+
labs(subtitle = "Italy",caption="ECB Deposit Facility = dotted line")
Facet1 + Facet2 + Facet3 + Facet4 + plot_layout(ncol=2)
GEO_Merge <- readxl::read_xlsx(path="C:\\Users\\harte\\OneDrive\\Experimental\\Newsletter\\2022-09\\N1\\HPM04_GEO.xlsx",sheet = 1)
shp <- sf::read_sf("Constituency_Boundaries_Ungeneralised___OSi_National_Electoral_Boundaries___2017.shp")
HPM09 <- cso_get_data("HPM09")
HPM09_long <- HPM09 %>%
pivot_longer(!1:2, names_to = "year_month")
rm(HPM09)
HPM09 <- HPM09_long
rm(HPM09_long)
HPM09$Month <- as.Date(paste(HPM09$year_month, "01", sep = "-"), "%YM%m-%d")
HPM09$Year <- year(HPM09$Month)
HPM04 <- cso_get_data("HPM04")
HPM04_long <- HPM04 %>%
pivot_longer(!1:5, names_to = "year_month")
rm(HPM04)
HPM04 <- HPM04_long
rm(HPM04_long)
### Date transformation
HPM04$Year <-substr(HPM04$year_month,1,4)
HPM04$Month <- sub(".* ", "", HPM04$year_month)
HPM04$Month_NR <- as.integer(factor(HPM04$Month, levels=month.name))
HPM04$Date <- as.yearmon(paste(HPM04$Year, HPM04$Month_NR), "%Y %m")
HPM04_join <- full_join(HPM04, GEO_Merge, by = "Eircode.Output")
HPM04 <- HPM04_join
rm(HPM04_join)
HPM09$Year <-substr(HPM09$year_month,1,4)
HPM09$Month <- sub(".* ", "", HPM09$year_month)
HPM09$Month_NR <- as.integer(factor(HPM09$Month, levels=month.name))
HPM09$Date <- as.yearmon(paste(HPM09$Year, HPM09$Month_NR), "%Y %m")
HPM09_1 <- HPM09 %>%
filter(Statistic == "Residential Property Price Index")%>%
filter(Type.of.Residential.Property == "National - all residential properties")
HPM09_2 <- HPM09 %>%
filter(Statistic == "Percentage Change over 12 months for Residential Property Price Index")%>%
filter(Type.of.Residential.Property == "National - all residential properties")
RPPI_tail_2 <- tail(HPM09_2,1)
RPPI_tail_2_lag <-head(tail(HPM09_2,2),1)
RRPI_Line_1 <- ggplot(data=HPM09_1, aes(x=Date, y=value, group = Type.of.Residential.Property))+
geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5, colour="#1b5545")+
labs(title = "Residential Property Price Index" ,
y="2015 = 100",
x="Month")+
geom_text_repel(aes(label=value),data = HPM09_1, size = 3)+
theme_bw()+
theme(legend.position = "bottom")+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
HPM09_1_T12 <- tail(HPM09_1,12)
RRPI_Line_2 <- ggplot(data=HPM09_1_T12, aes(x=Date, y=value, group = Type.of.Residential.Property))+
geom_line(linejoin="mitre",size = 1.25, linetype = 1,alpha = 0.5, colour="#1b5545")+
labs(title = "Residential Property Price Index" ,
subtitle = "12 Month Series",
y="2015 = 100",
x="Month")+
geom_text(aes(label=value),vjust= 1.5, hjust = 0, size=3)+
theme_bw()+
theme(legend.position = "bottom")+theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
RRPI_Line_1+RRPI_Line_2+plot_layout(ncol = 2)
HPM09_2_T24 <- tail(HPM09_2,24)
colour <- ifelse(HPM09_2_T24$value < 0,"#CC0000","#1b5545")
RPPI_Bar_2 <- ggplot(data=HPM09_2_T24, aes(x=Date, y=value, group = Type.of.Residential.Property))+
geom_col(alpha = 0.5, colour="#373634", fill = colour)+
labs(title = "Year on Year Percentage Change for Residential Property Price Index" ,
subtitle = "24 Month Series",
y="Percentage change",
x="Month")+
geom_text(aes(label=value),vjust= 1.5, size=3)+
theme_bw()+
theme(legend.position = "bottom")+
rm(HPM09)
The national house price inflation for is 13%. This represents a -1 change from which was 14%.
# Data Clean
HPM04_1A <- HPM04 %>%
filter(Statistic == "Mean Sale Price")%>%
filter(Dwelling.Status == "All Dwelling Statuses") %>%
filter(Stamp.Duty.Event == "Executions") %>%
filter(Type.of.Buyer == "All Buyer Types") %>%
filter(Eircode.Output == "All")
HPM04_1B <- HPM04 %>%
filter(Statistic == "Mean Sale Price")%>%
filter(Dwelling.Status == "All Dwelling Statuses") %>%
filter(Stamp.Duty.Event == "Executions") %>%
filter(Type.of.Buyer == "All Buyer Types") %>%
filter(Eircode.Output != "All")
HPM04_1B_Map <- na.omit(HPM04_1B)
HPM04_1B_Map<- HPM04_1B_Map %>%
group_by(Seat_Tag, Date)%>% # change to/from County / Constituency
summarise(Average_Value = mean(value))
HPM04_1B_Map$lagvalue_12mth <- Lag(HPM04_1B_Map$Average_Value,12)
HPM04_1B_Map$Diff <- HPM04_1B_Map$Average_Value - HPM04_1B_Map$lagvalue_12mth
HPM04_1B_Map$Diffpc <- HPM04_1B_Map$Diff / HPM04_1B_Map$lagvalue_12mth
HPM04_1B_Map$Diffpc<-percent(HPM04_1B_Map$Diffpc,2)
HPM04_1B_Map_July2022 <- HPM04_1B_Map%>%
filter(Date == "July 2022") # change month
shpHPM <- merge(shp,HPM04_1B_Map_July2022, by.x = "CON_SEAT_", by.y="Seat_Tag")
HPM04_1B_Map_July2022_Dub <- HPM04_1B_Map_July2022 %>%
filter(grepl('Dublin|Laoghaire|Meath|Wicklow|Kildare|Louth', Seat_Tag))
# Labs_HPI <- ED %>%
# filter(EDNAME=="Trim Urban"|EDNAME=="Navan Urban"|EDNAME=="Dunboyne"|EDNAME=="Innfield")
shpHPMDub <- merge(shp,HPM04_1B_Map_July2022_Dub, by.x = "CON_SEAT_", by.y="Seat_Tag")
# Maps
Map2_DiffpcAll <- shpHPM %>%
ggplot()+
geom_sf(aes(fill = Diffpc),colour=alpha("gray",0.4))+
scale_fill_stepsn(n.breaks = 10,
colors=c("#F92306","#FFFFFF","#0C4F00"),
limits = c(-1,1),
name = "% change")+
ggtitle('Year on Year Change by Constituency - HPM04')+
theme_void()+
theme(legend.title = element_text(size = 10),
legend.text = element_text(size = 8))+
theme(legend.position = "left")+
theme(plot.title = element_text(hjust = 1))
Map2_DiffpcDub <- shpHPMDub %>%
ggplot()+
geom_sf(aes(fill = Diffpc),colour=alpha("gray",0.4))+
geom_sf_text(aes(label=Diffpc),color="black",alpha=0.8,size=1.5)+
scale_fill_stepsn(n.breaks = 10,
colors=c("#F92306","#FFFFFF","#0C4F00"),
limits = c(-1,1),
name = "% change")+
theme_void()+
theme(legend.position = "none")
Map2_Diffpc <- Map2_DiffpcAll + Map2_DiffpcDub +
plot_layout(widths = c(2,1))
Map2_Diffpc
Average percentage change year on year is 13.85%. This was 8.62% in the Dublin constituencies.
These averages the mean value of the below:
HPM04_1B_Map_July2022%>%
kbl(caption = "Year on Year ")%>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = T)%>%
scroll_box(width = "700px", height = "300px")
Seat_Tag | Date | Average_Value | lagvalue_12mth | Diff | Diffpc |
---|---|---|---|---|---|
Carlow-Kilkenny (5) | Jul 2022 | 284872.0 | 220894.3 | 63977.67 | 28.96% |
Cavan-Monaghan (5) | Jul 2022 | 197903.0 | 161570.4 | 36332.57 | 22.49% |
Clare (4) | Jul 2022 | 235955.7 | 206092.7 | 29863.00 | 14.49% |
Cork East (4) | Jul 2022 | 267323.0 | 256206.0 | 11117.00 | 4.34% |
Cork North-Central (4) | Jul 2022 | 350839.5 | 309962.5 | 40877.00 | 13.19% |
Cork North-West (3) | Jul 2022 | 348709.2 | 239320.7 | 109388.53 | 45.71% |
Cork South-Central (4) | Jul 2022 | 330230.0 | 328309.0 | 1921.00 | 0.59% |
Cork South-West (3) | Jul 2022 | 289256.5 | 244953.5 | 44303.00 | 18.09% |
Donegal (5) | Jul 2022 | 182673.3 | 156738.0 | 25935.33 | 16.55% |
Dublin Bay North (5) | Jul 2022 | 581319.0 | 494264.3 | 87054.67 | 17.61% |
Dublin Bay South (4) | Jul 2022 | 798902.3 | 804848.3 | -5946.00 | -0.74% |
Dublin Central (4) | Jul 2022 | 309083.0 | 306544.0 | 2539.00 | 0.83% |
Dublin Fingal (5) | Jul 2022 | 466015.0 | 420827.3 | 45187.67 | 10.74% |
Dublin Mid-West (4) | Jul 2022 | 400853.5 | 370367.5 | 30486.00 | 8.23% |
Dublin North-West (3) | Jul 2022 | 458754.0 | 434262.0 | 24492.00 | 5.64% |
Dublin Rathdown (3) | Jul 2022 | 731581.0 | 687356.0 | 44225.00 | 6.43% |
Dublin South-West (5) | Jul 2022 | 572909.0 | 515215.0 | 57694.00 | 11.20% |
Dublin South Central (4) | Jul 2022 | 415488.8 | 423227.6 | -7738.80 | -1.83% |
Dublin West (4) | Jul 2022 | 418237.5 | 385500.0 | 32737.50 | 8.49% |
Dun Laoghaire (4) | Jul 2022 | 821332.5 | 721735.0 | 99597.50 | 13.80% |
Galway East (3) | Jul 2022 | 340027.0 | 228739.0 | 111288.00 | 48.65% |
Galway West (5) | Jul 2022 | 497739.0 | 265832.0 | 231907.00 | 87.24% |
Kerry (5) | Jul 2022 | 226333.2 | 222134.2 | 4199.00 | 1.89% |
Kildare North (4) | Jul 2022 | 419878.0 | 366211.0 | 53667.00 | 14.65% |
Kildare South (4) | Jul 2022 | 297297.0 | 277221.6 | 20075.40 | 7.24% |
Laois-Offaly (5) | Jul 2022 | 225580.0 | 198517.5 | 27062.50 | 13.63% |
Limerick City (4) | Jul 2022 | 261463.0 | 255035.0 | 6428.00 | 2.52% |
Limerick County (3) | Jul 2022 | 208000.0 | 196158.0 | 11842.00 | 6.04% |
Longford-Westmeath (4) | Jul 2022 | 221291.0 | 192877.0 | 28414.00 | 14.73% |
Louth (5) | Jul 2022 | 296199.5 | 269990.5 | 26209.00 | 9.71% |
Mayo (4) | Jul 2022 | 190733.7 | 166644.2 | 24089.50 | 14.46% |
Meath East (3) | Jul 2022 | 346002.4 | 317400.2 | 28602.20 | 9.01% |
Meath West (3) | Jul 2022 | 345554.0 | 308129.0 | 37425.00 | 12.15% |
Roscommon-Galway (3) | Jul 2022 | 204672.3 | 166230.7 | 38441.67 | 23.13% |
Sligo-Leitrim (4) | Jul 2022 | 168374.2 | 158717.5 | 9656.75 | 6.08% |
Tipperary (5) | Jul 2022 | 222141.2 | 184001.6 | 38139.62 | 20.73% |
Waterford (4) | Jul 2022 | 217256.7 | 243727.0 | -26470.33 | -10.86% |
Wexford (5) | Jul 2022 | 229463.2 | 227119.5 | 2343.75 | 1.03% |
Wicklow (5) | Jul 2022 | 447703.8 | 394752.0 | 52951.75 | 13.41% |
BCMS - Commencement notices taken from gov.ie. Completions and planning permissions data taken from the CSO. Commencement notices unavailable for apartments.
Regional planning permissions data from the CSO first became available from Q1 2018.
Fig1 + Fig2 + plot_layout(widths = c(1.5,1))
Commencement notices have become more noticably more volatile since 2020. Planning and completions for all units appears to be returning somewhat to trend on the left panel above. The panel on the right gives a clearer picture of the mismatch with the housing stock today.
There are too many apartment units being planned but not built, due to commercial viability they likely will never be built.
An Bord Pleanala require a certain density which means a mix of houses and apartments, the problem is the apartments are not viable in most of these areas. In areas where they are viable it’s to an institutional institutional buyer (AKA “vulture funds” if you are a dummy or a journalist/opposition politician).
An alternative is changing the design of homes to park your car in the ground floor garage and build 3 story homes not 2. The unit then coming with one or two balconies and a court yard instead of a garden. The company I work for are building some of these units in Dublin at the moment. What ever people think of the design, the current system is succeeding only to grant permission for units which will never be built. So eventually, likely very soon, some alternative(s) will be needed.
The ratio below is the number of completions relative to permissions granted for houses and apartments in a given area.
I am not sure what an ideal ratio would be , but a replacement rate is naturally 1. So those running above 1 will exhaust supply quicker and lead to a tighter market (locally). The lower end of the scale suggests there is capacity for more units to be supplied, but of course this does not mean they will be.
The headline inflation for August is 8.7%. This represents a -0.4 percentage change from July which was 9.1%.
colour_set <- ifelse(CPM01_1B$value < 0,"#CC0000","#007589")
FigCPM01_1B <- ggplot(data=CPM01_1B,aes(x=Date,y=value))+
geom_col(fill= colour_set, alpha = 0.5)+
labs(title = "CPI - CSO: CPM01", subtitle = "2020 to Date")+
xlab("Year-Month")+
ylab("Percentage Change over 12 months")+
theme_bw()+
theme(panel.border = element_rect(linetype = 1, fill = NA))+
geom_text(data=CPM01_1B,aes(label = value,
vjust= ifelse(value >=0,0.25,0.5),
hjust= ifelse(value >=0,-0.25,1)),
size = 2,
angle = 90)
FigCPM01_1B
CPM01_2A_end <- CPM01_2A %>%
group_by(Statistic)%>%
slice(which.max(Date))
CPM01_2A_end$lab <- paste(as.character(CPM01_2A_end$Date), "-", comma(CPM01_2A_end$value,digits=0))
FigCPM01_2A<- ggplot(data=CPM01_2A,aes(x=Date,y=value))+
geom_line(size = 1.15, linetype=1, alpha = 0.6, colour = "#946627")+
geom_hline(aes(yintercept=100),
colour= "#404040",
linetype = 1)+
geom_text_repel(aes(label=lab),data=CPM01_2A_end,size=3)+
labs(title = "CPI - CSO: CPM01", subtitle = "1997 to Date")+
xlab("Year-Month")+
ylab("Consumer Price Index (Base Dec 2016=100)")+theme_bw()+
theme(panel.border = element_rect(linetype = 1, fill = NA))
FigCPM01_2A
The below series is not weighted. Expect mortgage interest to increase substantially over the next 3 months. Energy prices have pulled back, as seen earlier in the oil/gas decline.
FigCPM01_2 <- ggplot(data=CPM01_2,aes(x=Date,y=value))+
geom_line(size = 1.15, linetype=1, alpha = 0.6, colour = "#946627")+
geom_hline(aes(yintercept=100),
colour= "#404040",
linetype = 1)+
theme_bw()+
labs(title = "CPI - CSO: CPM01", subtitle = "2016 to Date")+
xlab("Year-Month")+
ylab("Consumer Price Index (Base Dec 2016=100)")+
theme(panel.border = element_rect(linetype = 1, fill = NA))
FigCPM01_2
CPM03_2_end <- CPM03_2 %>%
group_by(Statistic,Selected.Sub.Indices)%>%
slice(which.max(Date))
CPM03_2_end$lab <- paste(as.character(CPM03_2_end$Date), "-", comma(CPM03_2_end$value,digits=0))
FigCPM03_2 <- ggplot(data=CPM03_2, aes(x=Date, y=value, group=Selected.Sub.Indices, colour=Selected.Sub.Indices))+
scale_colour_manual(values=c("#0389bb", "#0c122f", "#88b66c"))+
labs(title = "CPI - CSO: CPM03", subtitle = "2016 to Date, selected sub indicies")+
xlab("Year-Month")+
ylab("Consumer Price Index (Base Dec 2016=100)")+
geom_line(size = 1.05, linetype=1, alpha = 0.6)+
geom_hline(aes(yintercept=0),
colour= "#404040",
linetype = 1)+
geom_text_repel(aes(label=lab),data=CPM03_2_end,size=3)+
theme_bw()+
theme(axis.text.x = element_text(angle=0))+
theme(legend.position="bottom")+
theme(axis.text = element_text(size = rel(1)))+
theme(plot.title=(element_text(vjust =2)))+
theme(panel.border = element_rect(linetype = 1, fill = NA))
FigCPM03_2
FigCPM03_1 <- ggplot(data=CPM03_1, aes(x=Date, y=value, group=Selected.Sub.Indices, colour=Selected.Sub.Indices))+
scale_colour_manual(values=c("#0389bb", "#0c122f", "#88b66c"))+
labs(title = "CPI - CSO: CPM03", subtitle = "Historical Series, selected sub indicies")+
xlab("Year-Month")+
ylab("Percentage change year on year")+
geom_line(size = 1.05, linetype=1, alpha = 0.85)+
geom_hline(aes(yintercept=0),
colour= "#404040",
linetype = 1)+theme_bw()+
theme(axis.text.x = element_text(angle=0))+
theme(legend.position="bottom")+
theme(axis.text = element_text(size = rel(1)))+
theme(plot.title=(element_text(vjust =2)))+
theme(panel.border = element_rect(linetype = 1, fill = NA))
FigCPM03_1
This matrix is designed to illustrate what varying degrees of interest rate hikes mean for public sector workers.- Wage data from last issue.
This is gross wages so I will make a new version of this after the budget to account for the adjusted tax bands and consider any other eligibility criteria changes from the banks.
The white solid line is the max mortgage (x-axis) a couple can buy (based on job description on the top and the left). I’ve shaded 30% of their wages as black tiles as that’s ball park where it’s not affordable.
# Load Public Sector Wages
EHQ10 <- cso_get_data("EHQ10")
EHQ10 <- EHQ10 %>%
filter(Statistic=="Average Weekly Earnings") %>%
filter(Sub.Sector != "Total Public Sector including Semi State bodies")%>%
filter(Sub.Sector != "Total Public Sector excluding Semi State bodies")
EHQ10 <- EHQ10 %>%
pivot_longer(!1:2,names_to = "year_qtr")
EHQ10$Year_Q <- as.yearqtr(EHQ10$year_qtr)
EHQ10$Year <- year(EHQ10$Year_Q)
## Filter for Q2 2022
EHQ10 <- EHQ10 %>%
filter(year_qtr == "2022Q2")
## Data transformation to pair earnings
Pair <- EHQ10 %>%
select(2,4)
Pair <- Pair %>%
pivot_wider(names_from = Sub.Sector,values_from = value)
Pair$year_qtr <- "2022Q2"
EHQ10_Pair <- merge(x=EHQ10,y=Pair,by="year_qtr")
EHQ10_Pair <- EHQ10_Pair %>%
rename(Wage1 = value)
Wages <- EHQ10_Pair %>%
pivot_longer(!1:6,names_to = "Pair")
Wages <- Wages %>%
rename(Wage2 = value)
Wages$Wages <- Wages$Wage1+Wages$Wage2
# Load Template for rates and mortgage brackets
MR <- read_excel("Template Rates and Mortgage.xlsx")
MR$year_qtr <- "2022Q2"
# Merge MR & Wages
Data <- merge(x=Wages,y=MR,by="year_qtr")
Data$Cost <- Data$`30_Yr`/(Data$Wages*4)
# Plot
## base plot
options(scipen=999)
Data$Rate2 <- Data$Rate*100
Data$Cap <- ((Data$Wages*4)*12)*3.5
Plot1<- ggplot(Data,aes(x=Mortgage,y=Rate2))+
geom_raster(aes(fill=Cost))+
scale_fill_stepsn(colours = c("cyan", "black", "red"),
n.breaks=9) +
geom_vline(data=Data|>
dplyr::group_by(Sub.Sector,Pair)|> dplyr::summarise(Cap=mean(Cap)),
aes(xintercept=Cap),
alpha=0.5,
colour="#F5F9F9")+
geom_vline(xintercept = 200000,linetype=1,alpha=0.2)+
geom_vline(xintercept = 400000,linetype=1,alpha=0.2)+
geom_vline(xintercept = 600000,linetype=1,alpha=0.2)+
geom_vline(xintercept = 300000,linetype=2,alpha=0.2)+
geom_vline(xintercept = 500000,linetype=2,alpha=0.2)+
geom_vline(xintercept = 700000,linetype=2,alpha=0.2)+
scale_x_continuous(limits = c(200000,750000), expand = c(0, 0)) +
scale_y_continuous(limits = c(2.5,4.75), expand = c(0, 0)) +
theme_bw()+
xlab("Mortgage Amount (€)")+
ylab("Mortgage Rate (%)")+ theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))+
theme(legend.key.height= unit(1, 'cm'))+
theme(strip.text.x = element_text(size = 7),strip.text.y = element_text(size = 7))+
ggtitle("Public Sector Affordability - 30 Year Repayments as Percentage of Average Earnings")+
labs(caption="lines drawn at 100k increments: dotted line drawn at 300k, 500k & 700k. White line indicate cap of 3.5 times income",fill="% of Earnings")+ theme(legend.title = element_text(size = 8))
Plot2<-Plot1+facet_grid(Sub.Sector~Pair,labeller = labeller(Pair = label_wrap_gen(width = 25),Sub.Sector = label_wrap_gen(width = 15)))
Plot2
Long term downward trend in diesel evident, new vehicle registrations may be a good indication for a recession.
## Fuel Excise Clearance
FPM01 <- cso_get_data("FPM01")
FPM01 <- FPM01 %>%
pivot_longer(!1:2,names_to="year_month")
FPM01$Month <- as.Date(paste(FPM01$year_month, "01", sep = "-"), "%YM%m-%d")
FPM01$Year <- year(FPM01$Month)
##### moving average
###### 6 month
FPM01$SMA.6 <- round(SMA(FPM01$value,n=6),digits=2)
FPM01$SMA.6[FPM01$year_month=="2000M01" | FPM01$year_month=="2000M02" | FPM01$year_month=="2000M03"|FPM01$year_month=="2000M04" | FPM01$year_month=="2000M05"] <- NA
FPM01$SMA.12 <- round(SMA(FPM01$value,n=12),digits=2)
FPM01$SMA.12[FPM01$year_month=="2000M01" | FPM01$year_month=="2000M02" | FPM01$year_month=="2000M03"|FPM01$year_month=="2000M04" | FPM01$year_month=="2000M05"| FPM01$year_month=="2000M06" | FPM01$year_month=="2000M07"|FPM01$year_month=="2000M08" | FPM01$year_month=="2000M09"|FPM01$year_month=="2000M10" | FPM01$year_month=="2000M11"] <- NA
FPM01_end <- FPM01 %>%
group_by(STATISTIC,Fuel.Type)%>%
slice(which.max(Month))
FPM01_end$lab <- paste(as.character(FPM01_end$year_month), "-", comma(FPM01_end$SMA.12,digits=0))
FPM01_end_val <- FPM01_end$SMA.12
#### plot
Fig.FPM01.1<-ggplot(FPM01, aes(Month, SMA.12, group=Fuel.Type,colour=Fuel.Type,fill=Fuel.Type))+
geom_area(alpha=0.5)+
theme_bw()+
geom_text_repel(aes(label=lab),data=FPM01_end,size=3,colour="black")+
theme(legend.position = "bottom")+
ggtitle("Fuel Excise Clearance")+
ylab("million litres")+
labs(subtitle = "12 month moving average")
Fig.FPM01.2<-ggplot(FPM01, aes(Month, SMA.12, group=Fuel.Type,colour=Fuel.Type,fill=Fuel.Type))+
geom_line(alpha=0.9)+
geom_line(data=FPM01, aes(x=Month, y=SMA.6, group=Fuel.Type,colour=Fuel.Type),alpha=0.4)+
geom_line(data=FPM01, aes(x=Month, y=value, group=Fuel.Type),alpha=0.3,colour="gray")+
geom_text_repel(aes(label=SMA.12),data=FPM01_end,size=2.25,colour="black",alpha=0.9,hjust=1)+
#scale_y_continuous(sec.axis = sec_axis(~ ., breaks = FPM01_end$SMA.12))+
theme_bw()+
theme(legend.position = "none")+
ggtitle("Fuel Excise Clearance")+
ylab("million litres")+
labs(subtitle = "12 month moving average",caption = "6 month moving average also included, monthly value shown in gray")
Fig.FPM01.1
Fig.FPM01.2 + facet_wrap(~Fuel.Type,ncol=2,nrow=2)
## Vehicles
### TEM12
TEM12 <- cso_get_data("TEM12")
TEM12 <- TEM12 %>%
pivot_longer(!1:3,names_to="year_month")
TEM12$Month <- as.Date(paste(TEM12$year_month, "01", sep = "-"), "%YM%m-%d")
TEM12$Year <- year(TEM12$Month)
#### All Vehicles [(.).1], New Private Cars [(.).2]
TEM12.1 <- TEM12 %>%
filter(Type.of.Vehicle.Registration=="All Vehicles")
TEM12.1$SMA.6 <- round(SMA(TEM12.1$value,n=6),digits=2)
TEM12.1$SMA.6[TEM12.1$year_month=="2015M01" | TEM12.1$year_month=="2015M02" | TEM12.1$year_month=="2015M03"|TEM12.1$year_month=="2015M04" | TEM12.1$year_month=="2015M05"] <- NA
TEM12.1$SMA.12 <- round(SMA(TEM12.1$value,n=12),digits=2)
TEM12.1$SMA.12[TEM12.1$year_month=="2015M01" | TEM12.1$year_month=="2015M02" | TEM12.1$year_month=="2015M03"|TEM12.1$year_month=="2015M04" | TEM12.1$year_month=="2015M05"| TEM12.1$year_month=="2015M06" | TEM12.1$year_month=="2015M07"|TEM12.1$year_month=="2015M08" |TEM12.1$year_month=="2015M09"|TEM12.1$year_month=="2015M10" | TEM12.1$year_month=="2015M11"] <- NA
TEM12.2 <- TEM12 %>%
filter(Type.of.Vehicle.Registration=="New Private Cars")
TEM12.2$SMA.6 <- round(SMA(TEM12.2$value,n=6),digits=2)
TEM12.2$SMA.6[TEM12.2$year_month=="2015M01" | TEM12.2$year_month=="2015M02" | TEM12.2$year_month=="2015M03"|TEM12.2$year_month=="2015M04" | TEM12.2$year_month=="2015M05"] <- NA
TEM12.2$SMA.12 <- round(SMA(TEM12.2$value,n=12),digits=2)
TEM12.2$SMA.12[TEM12.2$year_month=="2015M01" | TEM12.2$year_month=="2015M02" | TEM12.2$year_month=="2015M03"|TEM12.2$year_month=="2015M04" | TEM12.2$year_month=="2015M05"| TEM12.2$year_month=="2015M06" | TEM12.2$year_month=="2015M07"|TEM12.2$year_month=="2015M08" |TEM12.2$year_month=="2015M09"|TEM12.2$year_month=="2015M10" | TEM12.2$year_month=="2015M11"] <- NA
#### All fuel types [(..).1], Petrol [(..).2], Diesel [(..).3], Electric [(..).4]
TEM12.1.1 <- TEM12.1 %>%
filter(Type.of.Fuel=="All fuel types")
TEM12.1.2 <- TEM12.1 %>%
filter(Type.of.Fuel=="Petrol")
TEM12.1.3 <- TEM12.1 %>%
filter(Type.of.Fuel=="Diesel")
TEM12.1.4 <- TEM12.1 %>%
filter(Type.of.Fuel=="Electric")
TEM12.2.1 <- TEM12.2 %>%
filter(Type.of.Fuel=="All fuel types")
TEM12.2.2 <- TEM12.2 %>%
filter(Type.of.Fuel=="Petrol")
TEM12.2.3 <- TEM12.2 %>%
filter(Type.of.Fuel=="Diesel")
TEM12.2.4 <- TEM12.2 %>%
filter(Type.of.Fuel=="Electric")
##### Detailed Plots
###### Petrol
# ggplot()+
# geom_line(data=TEM12.1.2,aes(x=Month,y=SMA.12),colour="darkred",size=1.25)+
# geom_line(data=TEM12.2.2,aes(x=Month,y=SMA.12),colour="navy",size=1.25)+
# geom_line(data=TEM12.1.2,aes(x=Month,y=SMA.6),colour="darkred",alpha=0.5)+
# geom_line(data=TEM12.2.2,aes(x=Month,y=SMA.6),colour="navy",alpha=0.5)+
# theme_bw()+
# ggtitle("New Licensed Vehicles - Petrol")+
# ylab("number")+
# labs(caption="red = All Vehicles, navy = Private Cars. (6 month MA included)", subtitle = "12 month moving average")
Fig.TEM12_P1<-ggplot()+
geom_line(data=TEM12.1.2[which(TEM12.1.2$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="darkred",size=1.25,alpha=0.6)+
geom_line(data=TEM12.2.2[which(TEM12.2.2$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="navy",size=1.25,alpha=0.6)+
geom_line(data=TEM12.1.2[which(TEM12.1.2$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_line(data=TEM12.2.2[which(TEM12.2.2$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.1.2[which(TEM12.1.2$Month>="2016-01-01"),],max.overlaps = 2,size=3)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.2.2[which(TEM12.2.2$Month>="2016-01-01"),],max.overlaps = 2,size=3)+
theme_bw()+
ggtitle("New Licensed Vehicles - Petrol")+
ylab("number")+
labs(caption="red = All Vehicles, navy = Private Cars. (6 month MA included)", subtitle = "12 month moving average")
Fig.TEM12_D1<-ggplot()+
geom_line(data=TEM12.1.3[which(TEM12.1.3$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="darkred",size=1.25,alpha=0.6)+
geom_line(data=TEM12.2.3[which(TEM12.2.3$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="navy",size=1.25,alpha=0.6)+
geom_line(data=TEM12.1.3[which(TEM12.1.3$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_line(data=TEM12.2.3[which(TEM12.2.3$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.1.3[which(TEM12.1.3$Month>="2016-01-01"),],max.overlaps = 4,size=3)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.2.3[which(TEM12.2.3$Month>="2016-01-01"),],max.overlaps = 4,size=3)+
theme_bw()+
ggtitle("New Licensed Vehicles - Diesel")+
ylab("number")+
labs(caption="red = All Vehicles, navy = Private Cars. (6 month MA included)", subtitle = "12 month moving average")
Fig.TEM12_E1<-ggplot()+
geom_line(data=TEM12.1.4[which(TEM12.1.4$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="darkred",size=1.25,alpha=0.6)+
geom_line(data=TEM12.2.4[which(TEM12.2.4$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="navy",size=1.25,alpha=0.6)+
geom_line(data=TEM12.1.4[which(TEM12.1.4$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_line(data=TEM12.2.4[which(TEM12.2.4$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.1.4[which(TEM12.1.4$Month>="2016-01-01"),],max.overlaps = 1,size=3)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.2.4[which(TEM12.2.4$Month>="2016-01-01"),],max.overlaps = 1,size=3)+
theme_bw()+
ggtitle("New Licensed Vehicles - Electric")+
ylab("number")+
labs(caption="red = All Vehicles, navy = Private Cars. (6 month MA included)", subtitle = "12 month moving average")
######## run facets for graphs above
Fig.TEM12_P1.A<-ggplot()+
geom_line(data=TEM12.1.2[which(TEM12.1.2$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="darkred",size=1.25,alpha=0.6)+
geom_line(data=TEM12.2.2[which(TEM12.2.2$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="navy",size=1.25,alpha=0.6)+
geom_line(data=TEM12.1.2[which(TEM12.1.2$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_line(data=TEM12.2.2[which(TEM12.2.2$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.1.2[which(TEM12.1.2$Month>="2016-01-01"),],max.overlaps = 8,size=2.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.2.2[which(TEM12.2.2$Month>="2016-01-01"),],max.overlaps = 8,size=2.5)+
theme_bw()+
ggtitle("New Licensed Vehicles - 12 month moving average")+
ylab("number")+
xlab(NULL)+
labs(subtitle = "Petrol")
Fig.TEM12_D1.A<-ggplot()+
geom_line(data=TEM12.1.3[which(TEM12.1.3$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="darkred",size=1.25,alpha=0.6)+
geom_line(data=TEM12.2.3[which(TEM12.2.3$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="navy",size=1.25,alpha=0.6)+
geom_line(data=TEM12.1.3[which(TEM12.1.3$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_line(data=TEM12.2.3[which(TEM12.2.3$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.1.3[which(TEM12.1.3$Month>="2016-01-01"),],max.overlaps = 6,size=2.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.2.3[which(TEM12.2.3$Month>="2016-01-01"),],max.overlaps = 6,size=2.5)+
theme_bw()+
ylab("number")+xlab(NULL)+
labs(subtitle = "Diesel")
Fig.TEM12_E1.A<-ggplot()+
geom_line(data=TEM12.1.4[which(TEM12.1.4$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="darkred",size=1.25,alpha=0.6)+
geom_line(data=TEM12.2.4[which(TEM12.2.4$Month>="2016-01-01"),],aes(x=Month,y=SMA.12),colour="navy",size=1.25,alpha=0.6)+
geom_line(data=TEM12.1.4[which(TEM12.1.4$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_line(data=TEM12.2.4[which(TEM12.2.4$Month>="2016-01-01"),],aes(x=Month,y=SMA.6),colour="gray",alpha=0.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.1.4[which(TEM12.1.4$Month>="2016-01-01"),],max.overlaps = 6,size=2.5)+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM12.2.4[which(TEM12.2.4$Month>="2016-01-01"),],max.overlaps = 6,size=2.5)+
theme_bw()+
ylab("number")+
labs(caption="red = All Vehicles, navy = Private Cars. (6 month MA included)", subtitle = "Electric")
Fig.TEM12_A <- Fig.TEM12_P1.A + Fig.TEM12_D1.A + Fig.TEM12_E1.A + plot_layout(nrow=2,ncol = 2)
Fig.TEM12_A
### TEM02
TEM02 <- cso_get_data("TEM02")
TEM02 <- TEM02 %>%
pivot_longer(!1:2,names_to="year_month")
TEM02$value <- as.integer(TEM02$value)
TEM02$year_month[TEM02$year_month=="2021m02"] <- "2021M02"
TEM02$Month <- as.Date(paste(TEM02$year_month, "01", sep = "-"), "%YM%m-%d")
TEM02$Year <- year(TEM02$Month)
#### Secondhand Private Cars [(.).1], New Private Cars [(.).2]
TEM02.1 <- TEM02 %>%
filter(Type.of.Vehicle.Registration=="Secondhand Private Cars")
TEM02.1$SMA.6 <- round(SMA(TEM02.1$value,n=6),digits=2)
TEM02.1$SMA.6[TEM02.1$year_month=="1965M01" | TEM02.1$year_month=="1965M02" | TEM02.1$year_month=="1965M03"|TEM02.1$year_month=="1965M04" | TEM02.1$year_month=="1965M05"] <- NA
TEM02.1$SMA.12 <- round(SMA(TEM02.1$value,n=12),digits=2)
TEM02.1$SMA.12[TEM02.1$year_month=="1965M01" | TEM02.1$year_month=="1965M02" | TEM02.1$year_month=="1965M03"|TEM02.1$year_month=="1965M04" | TEM02.1$year_month=="1965M05"| TEM02.1$year_month=="1965M06" | TEM02.1$year_month=="1965M07"|TEM02.1$year_month=="1965M08" |TEM02.1$year_month=="1965M09"|TEM02.1$year_month=="1965M10" | TEM02.1$year_month=="1965M11"] <- NA
TEM02.2 <- TEM02 %>%
filter(Type.of.Vehicle.Registration=="New Private Cars")
TEM02.2$SMA.6 <- round(SMA(TEM02.2$value,n=6),digits=2)
TEM02.2$SMA.6[TEM02.2$year_month=="1965M01" | TEM02.2$year_month=="1965M02" | TEM02.2$year_month=="1965M03"|TEM02.2$year_month=="1965M04" | TEM02.2$year_month=="1965M05"] <- NA
TEM02.2$SMA.12 <- round(SMA(TEM02.2$value,n=12),digits=2)
TEM02.2$SMA.12[TEM02.2$year_month=="1965M01" | TEM02.2$year_month=="1965M02" | TEM02.2$year_month=="1965M03"|TEM02.2$year_month=="1965M04" | TEM02.2$year_month=="1965M05"| TEM02.2$year_month=="1965M06" | TEM02.2$year_month=="1965M07"|TEM02.2$year_month=="1965M08" |TEM02.2$year_month=="1965M09"|TEM02.2$year_month=="1965M10" | TEM02.2$year_month=="1965M11"] <- NA
TEM02.A <- rbind(TEM02.1,TEM02.2)
TEM02.A_end <- TEM02.A %>%
group_by(STATISTIC,Type.of.Vehicle.Registration)%>%
slice(which.max(Month))
Fig1.TEM02<- ggplot(TEM02.A,aes(x=Month,y=SMA.12,group=Type.of.Vehicle.Registration,colour=Type.of.Vehicle.Registration))+
geom_line(size=1.25,alpha=0.6)+
scale_colour_manual(values = c("navy","purple"))+
geom_text_repel(aes(x=Month,y=SMA.12,label=SMA.12),data=TEM02.A,max.overlaps = 12,size=2.75,colour="black")+
theme_bw()+
theme(legend.position = "bottom")+
ggtitle("Vehicles Licensed for the First Time")+
ylab("number")+
labs(subtitle = "TEM02: 12 month moving average")
Fig2.TEM02<-ggplot(TEM02.A,aes(x=Month,y=SMA.6,group=Type.of.Vehicle.Registration,colour=Type.of.Vehicle.Registration))+
geom_line(size=1.25,alpha=0.6)+
scale_colour_manual(values = c("navy","purple"))+
geom_text_repel(aes(x=Month,y=SMA.6,label=SMA.6),data=TEM02.A,max.overlaps = 9,size=2.75,colour="black")+
theme_bw()+
theme(legend.position = "bottom")+
ggtitle("Vehicles Licensed for the First Time")+
ylab("number")+
labs(subtitle = "TEM02: 6 month moving average")
Fig1.TEM02 + scale_y_continuous(sec.axis = sec_axis(~ ., breaks = TEM02.A_end$SMA.12))
#facet_wrap(~Type.of.Vehicle.Registration,nrow=2)
## Indices of Total Production in Building and Construction Sector (Base 2015=100)
BEQ04 <- cso_get_data("BEQ04")
BEQ04 <- BEQ04 %>%
pivot_longer(!1:2,names_to="year_qtr")
BEQ04$Year_Q <- as.yearqtr(BEQ04$year_qtr)
BEQ04$Year <- year(BEQ04$Year_Q)
##### generate lags and percentage change
BEQ04$Lag <- Lag(BEQ04$value,1)
BEQ04$Lag[BEQ04$year_qtr=="2000Q1"]<- NA
BEQ04$Diff<- BEQ04$value-BEQ04$Lag
BEQ04$Diffpc<- ((BEQ04$value-BEQ04$Lag)/BEQ04$Lag)*100
BEQ04$Diffpc<- round(BEQ04$Diffpc,digits=2)
### subset value [(.).A] & volume [(.).B]
BEQ04.A <- BEQ04 %>%
filter(Statistic=="Value of Production Index in Building and Construction (Seasonally Adjusted)")
BEQ04.B <- BEQ04 %>%
filter(Statistic=="Volume of Production Index in Building and Construction (Seasonally Adjusted)")
##### generate lags and percentage change
# BEQ04.A$Lag <- Lag(BEQ04.A$value,1)
# BEQ04.A$Lag[BEQ04.A$year_qtr=="2000Q1"]<- NA
# BEQ04.A$Diff<- BEQ04.A$value-BEQ04.A$Lag
# BEQ04.A$Diffpc<- ((BEQ04.A$value-BEQ04.A$Lag)/BEQ04.A$Lag)*100
# BEQ04.A$Diffpc<- round(BEQ04.A$Diffpc,digits=2)
#
# BEQ04.B$Lag <- Lag(BEQ04.B$value,1)
# BEQ04.B$Lag[BEQ04.B$year_qtr=="2000Q1"]<- NA
# BEQ04.B$Diff<- BEQ04.B$value-BEQ04.B$Lag
# BEQ04.B$Diffpc<- ((BEQ04.B$value-BEQ04.B$Lag)/BEQ04.B$Lag)*100
# BEQ04.B$Diffpc<- round(BEQ04.B$Diffpc,digits=2)
### seasonally adjusted [(.)_S]
BEQ04_S <- BEQ04 %>%
filter(Statistic=="Value of Production Index in Building and Construction (Seasonally Adjusted)"|Statistic=="Volume of Production Index in Building and Construction (Seasonally Adjusted)")
Fig1.BEQ04<- ggplot(BEQ04_S,aes(x=Year_Q,y=value,group=Statistic,colour=Statistic))+
geom_line()+
theme_bw()+
geom_hline(yintercept = 100,colour="black")+
theme(legend.position = "bottom")+
ggtitle("Indices of Total Production in Building and Construction Sector")+
ylab("(2015 = 100)")
#Fig1.BEQ04 + facet_wrap(~Type.of.Building.and.Construction,nrow=5)
### subset from 2015
BEQ04_S.15 <- BEQ04_S %>%
filter(Year_Q >= "2015 Q1")
Fig2.BEQ04<-ggplot(BEQ04_S.15,aes(x=Year_Q,y=value,group=Statistic,colour=Statistic))+
geom_line(size=1.25,alpha=0.6)+
theme_bw()+
geom_hline(yintercept = 100,colour="black",alpha=0.4,linetype=2)+
geom_text_repel(aes(x=Year_Q,y=value,label=round(value,digits = 1)),data=BEQ04_S.15,max.overlaps = 6,size=2.75,colour="black")+
theme(legend.position = "none")+
ggtitle("Indices of Total Production in Building and Construction Sector")+
ylab("(2015 = 100)")+
labs(subtitle = "Orange = Value Index, Blue = Volume Index")
Fig2.BEQ04 + facet_wrap(~Type.of.Building.and.Construction,nrow=3,ncol=2)
#### subset for Residential
BEQ04_S.15.Res<- BEQ04_S.15%>%
filter(Type.of.Building.and.Construction =="Residential building")
Fig3.BEQ04 <- ggplot(BEQ04_S.15.Res,aes(x=Year_Q,y=Diffpc,group=Statistic,colour=Statistic,fill=Statistic))+
geom_col(size=1.25,alpha=0.6)+
geom_text_repel(aes(x=Year_Q,y=Diffpc,label=Diffpc),data=BEQ04_S.15.Res,colour="black",max.overlaps = 5,size=3)+
theme_bw()+
theme(legend.position = "bottom")+
ylab("% change, q on q")
Fig3.BEQ04 + facet_wrap(~Statistic,ncol=2)
colour <-ifelse(WPM28_B$value < 0,"#CC0000","#1b5545")
Fig1<-ggplot(WPM28_B, aes(x=Date, y=value, group=Type.of.Material))+
geom_col(aes(group=Type.of.Material), alpha = 0.65, colour="#373634", fill = colour)+
labs(title = "Percentage Change over 12 month in Wholesale Price Index")+
xlab("Year-Month")+
ylab("Percentage change")+
# scale_x_date(date_labels="%b-%Y",date_breaks ="3 month")+
geom_text_repel(aes(label=value),data = WPM28_B, size = 3)+
theme_bw()+
theme(axis.text.x = element_text(angle=90))+
theme(axis.text.x=element_text(size=10))+
theme(legend.position="none")+
theme(axis.text = element_text(size = rel(1)))+
theme(plot.title=(element_text(vjust =2)))+
theme(panel.border = element_rect(linetype = 1, fill = NA))
Fig1 + facet_wrap(~Type.of.Material, ncol = 3)
Black line (100) indicates 2015 as baseline
Fig2<-ggplot(WPM28_A, aes(x=Date, y=value, group=Type.of.Material, colour=Type.of.Material))+
geom_line(aes(group=Type.of.Material),size = 1.05, linetype=1, alpha = 0.65)+geom_text_repel(aes(label=value),data = WPM28_A, size = 3)+
labs(title = "Percentage Change over 12 month in Wholesale Price Index")+
xlab("Year-Month")+
ylab("2015 = 100")+
geom_hline(aes(yintercept=100),
colour= "#404040",
linetype = 1)+
# scale_x_date(date_labels="%b-%Y",date_breaks ="3 month")+
theme_bw()+
theme(axis.text.x = element_text(angle=90))+
theme(axis.text.x=element_text(size=10))+
theme(legend.position="none")+
theme(axis.text = element_text(size = rel(1)))+
theme(plot.title=(element_text(vjust =2)))+
theme(panel.border = element_rect(linetype = 1, fill = NA))
Fig2 + facet_wrap(~Type.of.Material, ncol = 3)