#R codes ##Data Loading
#Profit&Loss A/c DATA
# Load the readxl package
library(readxl)
## Warning: package 'readxl' was built under R version 4.4.3
library(gridExtra)
## Warning: package 'gridExtra' was built under R version 4.4.3
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.4.3
#--------------------------------------
allcargo_pl <- read_excel("D:/FA using R/Project/Process/allcargo_pl.xlsx")
alcargo_bs <- read_excel("D:/FA using R/Project/Process/alcargo_bs.xlsx")
allcargo_cfs <- read_excel("D:/FA using R/Project/Process/allcargo_cfs.xlsx")
allcargo_pl<-as.data.frame(allcargo_pl)
# Clean column names
colnames(allcargo_pl) <- make.names(colnames(allcargo_pl))
colnames(allcargo_pl) <- trimws(colnames(allcargo_pl))
#-----------------------------------
# Reshaping the data to long format using reshape function
allcargo_pl_long <- reshape(allcargo_pl,
varying = c("X2024", "X2023", "X2022", "X2021", "X2020"),
v.names = "Amount",
timevar = "Year",
times = c("2024","2023","2022","2021", "2020"),
direction = "long")
#----------------------------------
# Reset row names if necessary
rownames(allcargo_pl_long) <- NULL
#----------------------------------------------------------------------
#----------------------------------------------------------------------
#Balance sheet
alcargo_bs<-as.data.frame(alcargo_bs)
# Clean column names (if needed)
colnames(alcargo_bs) <- make.names(colnames(alcargo_bs))
colnames(alcargo_bs) <- trimws(colnames(alcargo_bs))
#-----------------------------------
# Reshaping the data to long format using reshape function
alcargo_bs_long <- reshape(alcargo_bs,
varying = c("X2024", "X2023", "X2022", "X2021", "X2020"),
v.names = "Amount",
timevar = "Year",
times = c("2024","2023","2022","2021", "2020"),
direction = "long")
#----------------------------------
# Reset row names if necessary
rownames(alcargo_bs_long) <- NULL
#--------------------------------------------------------------------------------
#Cash flow statement
allcargo_cfs<-as.data.frame(allcargo_cfs)
# Clean column names (if needed)
colnames(allcargo_cfs) <- make.names(colnames(allcargo_cfs))
colnames(allcargo_cfs) <- trimws(colnames(allcargo_cfs))
#-----------------------------------
# Reshaping the data to long format using reshape function
allcargo_cfs_long <- reshape(allcargo_cfs,
varying = c("X2024", "X2023", "X2022", "X2021", "X2020"),
v.names = "Amount",
timevar = "Year",
times = c("2024","2023","2022","2021", "2020"),
direction = "long")
#----------------------------------
# Reset row names if necessary
rownames(allcargo_cfs_long) <- NULL
#---------------------------------
#Split item 1
b1_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="RevfromOpr",])
p1_cargo=ggplot(b1_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Revenue From Operations",
caption = "Cleaned by Team",
subtitle="Allcargo logistics limited (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(1000, 4000), # Set y-axis limits
breaks = seq(1000, 4000, by = 1000), # Set the breaks on the y-axis
labels = seq(1000, 4000, by = 1000)) # Label the y-axis with values from 1000 to 4000
grid.arrange(p1_cargo)
#----------------------------------------
#Split item 2
b2_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "ExciseServiceTax",])
#-----------------------------------
#Split item 3
b3_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="revfromopr_net",])
p3_cargo=ggplot(b3_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Revenue From Operations (NET)",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(1000, 4000), # Set y-axis limits
breaks = seq(1000, 4000, by = 1000), # Set the breaks on the y-axis
labels = seq(1000, 4000, by = 1000))
grid.arrange(p3_cargo)
#-----------------------------------
#Split item 4
b4_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "otherOprRev",])
p4_cargo=ggplot(b4_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Other Operating Revenues",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(10, 80), # Set y-axis limits
breaks = seq(10,80, by =10), # Set the breaks on the y-axis
labels = seq(10,80,by =10))
grid.arrange(p4_cargo)
#-----------------------------------
#Calculation of Total Operating Revenue using user-defined function
alcargo_pl_longT1=allcargo_pl_long[allcargo_pl_long$ITEMS %in% c("revfromopr_net","otherOprRev"),]
by(alcargo_pl_longT1$Amount,
alcargo_pl_longT1$Year, sum)
## alcargo_pl_longT1$Year: 2020
## [1] 1619.31
## ------------------------------------------------------------
## alcargo_pl_longT1$Year: 2021
## [1] 1970.43
## ------------------------------------------------------------
## alcargo_pl_longT1$Year: 2022
## [1] 3432.62
## ------------------------------------------------------------
## alcargo_pl_longT1$Year: 2023
## [1] 2721.84
## ------------------------------------------------------------
## alcargo_pl_longT1$Year: 2024
## [1] 1633.29
result=as.list(by(alcargo_pl_longT1$Amount,
alcargo_pl_longT1$Year, sum))
res1=unlist(result)
Total_operating_revenue=data.frame(Year=names(res1),
Total=unname(res1))
pT1_cargo=ggplot(Total_operating_revenue,aes(x=Year,y=Total))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Total, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Total Operating Revenue",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Total), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(1000,4000), # Set y-axis limits
breaks = seq(1000,4000, by =500), # Set the breaks on the y-axis
labels = seq(1000,4000,by =500))
grid.arrange(pT1_cargo)
#-----------------------------------
#Split item 5
b5_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "otherInc",])
#-----------------------------------
#Calculation of Total Income
alcargo_pl_longT2=allcargo_pl_long[allcargo_pl_long$ITEMS %in% c("revfromopr_net","otherOprRev","otherInc"),]
by(alcargo_pl_longT2$Amount,
alcargo_pl_longT2$Year, sum)
## alcargo_pl_longT2$Year: 2020
## [1] 1735.4
## ------------------------------------------------------------
## alcargo_pl_longT2$Year: 2021
## [1] 2154.12
## ------------------------------------------------------------
## alcargo_pl_longT2$Year: 2022
## [1] 3676.65
## ------------------------------------------------------------
## alcargo_pl_longT2$Year: 2023
## [1] 2817.63
## ------------------------------------------------------------
## alcargo_pl_longT2$Year: 2024
## [1] 1856.82
result=as.list(by(alcargo_pl_longT2$Amount,
alcargo_pl_longT2$Year, sum))
res2=unlist(result)
Total_revenue=data.frame(Year=names(res2),
Total=unname(res2))
pT2_cargo=ggplot(Total_revenue,aes(x=Year,y=Total))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Total, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Total Revenue",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Total), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(1000,4000), # Set y-axis limits
breaks = seq(1000,4000, by =500), # Set the breaks on the y-axis
labels = seq(1000,4000,by =500))
grid.arrange(pT2_cargo)
#-----------------------------------------------
#Split item 6
b6_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="CostOfMat_Consumed",])
#----------------------------------------
#Split item 7
b7_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="CostOfPowerPurchased",])
#-----------------------------------
#Split item 8
b8_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="PurchaseOfStock_In_Trade",])
#-----------------------------------
#Split item 9
b9_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="CostOfFuel",])
#-----------------------------------
#Split item 10
b10_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "Opr_and_dir_Exp",])
p10_cargo=ggplot(b10_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Operating and direct expenses",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(1000, 4000), # Set y-axis limits
breaks = seq(1000,4000, by =1000), # Set the breaks on the y-axis
labels = seq(1000,4000,by =1000))
grid.arrange(p10_cargo)
#-----------------------------------
#Split item 11
b11_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="ChangesInInven",])
#-----------------------------------
#Split item 12
b12_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "EmployeeBenefitExp",])
p12_cargo=ggplot(b12_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Employee Benefit Expenses",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 200), # Set y-axis limits
breaks = seq(100,200, by =10), # Set the breaks on the y-axis
labels = seq(100,200,by =10))
grid.arrange(p12_cargo)
#-----------------------------------
#Split item 13
b13_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "FinCosts",])
p13_cargo=ggplot(b13_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Financial Costs",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 100), # Set y-axis limits
breaks = seq(10,100, by =10), # Set the breaks on the y-axis
labels = seq(10,100,by =10))
grid.arrange(p13_cargo)
#-----------------------------------
#Split item 14
b14_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="ProvisionsandContingencies",])
#-----------------------------------
#Split item 15
b15_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "DepAndAmortExp",])
p15_cargo=ggplot(b15_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Depreciation And Amortisation Expenses",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 150), # Set y-axis limits
breaks = seq(10,150, by =10), # Set the breaks on the y-axis
labels = seq(10,150,by =10))
grid.arrange(p15_cargo)
#-----------------------------------
#Split item 16
b16_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "OtherExp",])
p16_cargo=ggplot(b16_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Other Expenses",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 150), # Set y-axis limits
breaks = seq(80,150, by =10), # Set the breaks on the y-axis
labels = seq(80,150,by =10))
grid.arrange(p16_cargo)
#-----------------------------------
#Split item 17
b17_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="InterUnit_Segment_DivisionTransfer",])
#-----------------------------------
#Split item 18
b18_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="AmountsTransferToCapiAcc",])
#-----------------------------------
#Split item 19
b19_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="Transferto_FromInvestment_FixedAssets_Others",])
#-----------------------------------
#Calculation of Total Expenses
alcargo_pl_longT3=allcargo_pl_long[allcargo_pl_long$ITEMS %in% c("Opr_and_dir_Exp","EmployeeBenefitExp","FinCosts","DepAndAmortExp","OtherExp"),]
by(alcargo_pl_longT3$Amount,
alcargo_pl_longT3$Year, sum)
## alcargo_pl_longT3$Year: 2020
## [1] 1623
## ------------------------------------------------------------
## alcargo_pl_longT3$Year: 2021
## [1] 1951.57
## ------------------------------------------------------------
## alcargo_pl_longT3$Year: 2022
## [1] 3304.48
## ------------------------------------------------------------
## alcargo_pl_longT3$Year: 2023
## [1] 2597.54
## ------------------------------------------------------------
## alcargo_pl_longT3$Year: 2024
## [1] 1650.74
result=as.list(by(alcargo_pl_longT3$Amount,
alcargo_pl_longT3$Year, sum))
res3=unlist(result)
Total_expenses=data.frame(Year=names(res3),
Total=unname(res3))
pT3_cargo=ggplot(Total_expenses,aes(x=Year,y=Total))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Total, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Total Expenses",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Total), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(1000,4000), # Set y-axis limits
breaks = seq(1000,4000, by =500), # Set the breaks on the y-axis
labels = seq(1000,4000,by =500))
grid.arrange(pT3_cargo)
#-----------------------------------
#Split item 20
b20_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "PLBeforeExceptional_ExtraOrdinaryItemsAndTax",])
p20_cargo=ggplot(b20_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Profit/Loss Before Exceptional, ExtraOrdinary Items And Tax",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 400), # Set y-axis limits
breaks = seq(0,400, by =100), # Set the breaks on the y-axis
labels = seq(0,400,by =100))
grid.arrange(p20_cargo)
#-----------------------------------
#Split item 21
b21_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "ExceptionalItems",])
p21_cargo=ggplot(b21_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Exceptional Items",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(-10, 200), # Set y-axis limits
breaks = seq(-10,160, by =10), # Set the breaks on the y-axis
labels = seq(-10,160,by =10))
grid.arrange(p21_cargo)
#-----------------------------------
#Calculation of Profit/loss before tax
alcargo_pl_longT4=allcargo_pl_long[allcargo_pl_long$ITEMS %in% c("PLBeforeExceptional_ExtraOrdinaryItemsAndTax","ExceptionalItems"),]
by(alcargo_pl_longT4$Amount,
alcargo_pl_longT4$Year, sum)
## alcargo_pl_longT4$Year: 2020
## [1] 266.04
## ------------------------------------------------------------
## alcargo_pl_longT4$Year: 2021
## [1] 199.05
## ------------------------------------------------------------
## alcargo_pl_longT4$Year: 2022
## [1] 426.28
## ------------------------------------------------------------
## alcargo_pl_longT4$Year: 2023
## [1] 259.96
## ------------------------------------------------------------
## alcargo_pl_longT4$Year: 2024
## [1] 231.43
result=as.list(by(alcargo_pl_longT4$Amount,
alcargo_pl_longT4$Year, sum))
res4=unlist(result)
Profit_loss_before_tax=data.frame(Year=names(res4),
Total=unname(res4))
pT4_cargo=ggplot(Profit_loss_before_tax,aes(x=Year,y=Total))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Total, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Profit/Loss Before Tax",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Total), vjust = -1, color = "black")+
scale_y_continuous(
limits = c(100,500), # Set y-axis limits
breaks = seq(100,500, by =100), # Set the breaks on the y-axis
labels = seq(100,500,by =100))
grid.arrange(pT4_cargo)
#-----------------------------------
#Split item 22
b22_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "CurrentTax",])
p22_cargo=ggplot(b22_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Current Tax",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 120), # Set y-axis limits
breaks = seq(0,150, by =10), # Set the breaks on the y-axis
labels = seq(0,150,by =10))
grid.arrange(p22_cargo)
#-----------------------------------
#Split item 23
b23_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="MAT_CreditEntitlement",])
#-----------------------------------
#Split item 24
b24_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "DeferredTax",])
p24_cargo=ggplot(b24_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Deferred Tax",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(-50, 50), # Set y-axis limits
breaks = seq(-50,50, by =10), # Set the breaks on the y-axis
labels = seq(-50,50,by =10))
grid.arrange(p24_cargo)
#-----------------------------------
#Split item 25
b25_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="TaxForEarlierYears",])
#-----------------------------------
#Calculation for Total Tax Expenses
alcargo_pl_longT5=allcargo_pl_long[allcargo_pl_long$ITEMS %in% c("CurrentTax","DeferredTax"),]
by(alcargo_pl_longT5$Amount,
alcargo_pl_longT5$Year, sum)
## alcargo_pl_longT5$Year: 2020
## [1] 46.29
## ------------------------------------------------------------
## alcargo_pl_longT5$Year: 2021
## [1] 7.7
## ------------------------------------------------------------
## alcargo_pl_longT5$Year: 2022
## [1] 61.1
## ------------------------------------------------------------
## alcargo_pl_longT5$Year: 2023
## [1] 57.33
## ------------------------------------------------------------
## alcargo_pl_longT5$Year: 2024
## [1] 30.83
result=as.list(by(alcargo_pl_longT5$Amount,
alcargo_pl_longT5$Year, sum))
res5=unlist(result)
Total_Tax_Expenses=data.frame(Year=names(res5),
Total=unname(res5))
pT5_cargo=ggplot(Total_Tax_Expenses,aes(x=Year,y=Total))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Total, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Total Tax Expenses",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Total), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0,100), # Set y-axis limits
breaks = seq(0,100, by =10), # Set the breaks on the y-axis
labels = seq(0,100,by =10))
grid.arrange(pT5_cargo)
#-----------------------------------
#Split item 26
b26_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="PL_AfterTaxAndBeforeExtraOrdinaryItems",])
p26_cargo=ggplot(b26_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Profit/Loss After Tax And Before ExtraOrdinary Items",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 400), # Set y-axis limits
breaks = seq(100,400, by =100), # Set the breaks on the y-axis
labels = seq(100,400,by =100))
grid.arrange(p26_cargo)
#-----------------------------------
#Split item 27
b27_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "PL_FromContinuingOperations",])
p27_cargo=ggplot(b27_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Profit/Loss From Continuing Operations",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 400), # Set y-axis limits
breaks = seq(100,400, by =100), # Set the breaks on the y-axis
labels = seq(100,400,by =100))
grid.arrange(p27_cargo)
#-----------------------------------
#Split item 28
b28_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="PL_FromDiscontinuingOperations",])
#-----------------------------------
#Split item 29
b29_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="TotalTaxExpensesDiscontinuingOperations",])
#-----------------------------------
#Split item 30
b30_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "NetProfitLoss_FromDiscontinuingOperations",])
p30_cargo=ggplot(b30_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in cr's",
title="Net Profit & Loss From Discontinuing Operations",
subtitle="ALLCARGO LOGISTICS (2020 - 2024)",
caption = "Cleaned by TEAM")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(-10, 10), # Set y-axis limits
breaks = seq(-10, 10, by = 2), # Set the breaks on the y-axis
labels = seq(-10, 10, by = 2))
grid.arrange(p30_cargo)
#-----------------------------------------------
#Calculation for Profit/loss for the period
alcargo_pl_longT6=allcargo_pl_long[allcargo_pl_long$ITEMS %in% c("PL_AfterTaxAndBeforeExtraOrdinaryItems","PL_FromDiscontinuingOperations"),]
by(alcargo_pl_longT6$Amount,
alcargo_pl_longT6$Year, sum)
## alcargo_pl_longT6$Year: 2020
## [1] 219.75
## ------------------------------------------------------------
## alcargo_pl_longT6$Year: 2021
## [1] 191.35
## ------------------------------------------------------------
## alcargo_pl_longT6$Year: 2022
## [1] 367.16
## ------------------------------------------------------------
## alcargo_pl_longT6$Year: 2023
## [1] 203.34
## ------------------------------------------------------------
## alcargo_pl_longT6$Year: 2024
## [1] 202.98
result=as.list(by(alcargo_pl_longT6$Amount,
alcargo_pl_longT6$Year, sum))
res6=unlist(result)
Profit_Loss_For_The_Period=data.frame(Year=names(res6),
Total=unname(res6))
pT6_cargo=ggplot(Profit_Loss_For_The_Period,aes(x=Year,y=Total))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Total, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Profit/loss for the period",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Cleaned by Team")+
geom_text(aes(label = Total), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100,400), # Set y-axis limits
breaks = seq(100,400, by =100), # Set the breaks on the y-axis
labels = seq(100,400,by =100))
grid.arrange(pT6_cargo)
#-----------------------------------------------
#Split item 31
b31_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "BasicEPS",])
p31_cargo=ggplot(b31_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in cr's",
title="Basic EPS (Rs.)",
subtitle="ALLCARGO LOGISTICS (2020 - 2024)",
caption = "Cleaned by TEAM")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 20), # Set y-axis limits
breaks = seq(0, 20, by = 2), # Set the breaks on the y-axis
labels = seq(0, 20, by = 2))
grid.arrange(p31_cargo)
#-----------------------------------------------
#Split item 32
b32_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "DilutedEPS",])
p32_cargo=ggplot(b32_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in cr's",
title="Diluted EPS (Rs.)",
subtitle="ALLCARGO LOGISTICS limited (2020 - 2024)",
caption = "Cleaned by TEAM")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 20), # Set y-axis limits
breaks = seq(0, 20, by = 2), # Set the breaks on the y-axis
labels = seq(0, 20, by = 2))
grid.arrange(p32_cargo)
#-----------------------------------
#Split item 33
b33_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="ImportedRawMaterials",])
#-----------------------------------
#Split item 34
b34_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="IndigenousRawMaterials",])
#-----------------------------------
#Split item 35
b35_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="ImportedStoresAndSpares",])
#-----------------------------------
#Split item 36
b36_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="IndigenousStoresAndSpares",])
#-----------------------------------
#Split item 37_
b37_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "EquityShareDividend",])
p37_cargo=ggplot(b37_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in cr's",
title="Equity Share Dividend",
subtitle="ALLCARGO LOGISTICS (2020 - 2024)",
caption = "Cleaned by TEAM")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(-10,100), # Set y-axis limits
breaks = seq(-10,100, by = 10), # Set the breaks on the y-axis
labels = seq(-10,100, by = 10))
grid.arrange(p37_cargo)
#-----------------------------------
#Split item 38
b38_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS == "TaxOnDividend",])
p38_cargo=ggplot(b38_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in cr's",
title="Tax On Dividend",
caption = "Cleaned by TEAM",
subtitle="ALLCARGO LOGISTICS (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 20), # Set y-axis limits
breaks = seq(0, 20, by = 2), # Set the breaks on the y-axis
labels = seq(0, 20, by = 2)) # Label the y-axis with values from 50 to 80
grid.arrange(p38_cargo)
#-----------------------------------
#Split item 39
b39_cargo=as.data.frame(allcargo_pl_long[allcargo_pl_long$ITEMS=="EquityDividendRate",])
p39_cargo=ggplot(b39_cargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in cr's",
title="Equity Dividend Rate (%)",
caption = "Cleaned by TEAM",
subtitle="ALLCARGO LOGISTICS (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0,200), # Set y-axis limits
breaks = seq(0,200, by = 20), # Set the breaks on the y-axis
labels = seq(0,200, by = 20)) # Label the y-axis with values from 50 to 80
grid.arrange(p39_cargo)
#BALANCE SHEET DATA
#----------------------------------
bs1_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="Eq_ShareCap",])
p1_alcargo=ggplot(bs1_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Equity Share Capital",
caption = "Created by Team Logistics",
subtitle="Allcargo logistics limited (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 200), # Set y-axis limits
breaks = seq(0, 200, by = 50), # Set the breaks on the y-axis
labels = seq(0, 200, by = 50)) # Label the y-axis with values from 50 to 80
grid.arrange(p1_alcargo)
#----------------------------------
#Split item 2
bs2_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="Pref_Share_Cap",])
#----------------------------------
#Find the Total share capital from
tot_sh_cap_alcargo_bs=rbind(bs1_alcargo,bs2_alcargo)
tot_sh_cap_alcargo_bs=aggregate(Amount ~ Year ,
data = tot_sh_cap_alcargo_bs,
FUN = sum)
pTot1_cargo=ggplot(tot_sh_cap_alcargo_bs,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="TOTAL SHARE CAPITAL ",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0,200), # Set y-axis limits
breaks = seq(0,200, by =20), # Set the breaks on the y-axis
labels = seq(0,200,by =20))
grid.arrange(pTot1_cargo)
#----------------------------------
#Split item 3
bs3_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="Revaluation_Reserv",])
#----------------------------------
#Split item 4
bs4_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="ReserveandSurplus",])
p4_alcargo=ggplot(bs4_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Reserve and Surplus",
caption = "Created by Team Logistics",
subtitle="Allcargo logistics limited (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(500, 2000), # Set y-axis limits
breaks = seq(500, 2000, by = 500), # Set the breaks on the y-axis
labels = seq(500, 2000, by = 500)) # Label the y-axis with values from 50 to 80
grid.arrange(p4_alcargo)
#----------------------------------
#Split item 5
bs5_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="EmployeesStockOptions",])
#----------------------------------
#Split item 6
bs6_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="MoneyReceivedAgainst_ShWarrant",])
#----------------------------------
#Split item 7
bs7_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="Eq_Sh_ApplicationMoney",])
#---------------------------------
#Split item 8
bs8_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="Hybrid_Debt_OtherSecuritie",])
#----------------------------------------
#Split item 9
bs9_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Sh_Cap_Suspense",])
#----------------------------------------
#Split item 10
bs10_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Lg_TM_Borrowing",])
p10_alcargo=ggplot(bs10_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Long Term Borrowings",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 500), # Set y-axis limits
breaks = seq(100, 500, by = 100), # Set the breaks on the y-axis
labels = seq(100, 500, by = 100))
grid.arrange(p10_alcargo)
#-----------------------------------
#Split item 11
bs11_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Deferred_Tax_Liabilities_Net",])
#-----------------------------------
#Split item 12
bs12_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Oth_Lg_Tm_Liab",])
p12_alcargo=ggplot(bs12_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Other Long Term Liabilities",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 100), # Set y-axis limits
breaks = seq(0, 100, by =10), # Set the breaks on the y-axis
labels = seq(0, 100,by =10))
grid.arrange(p12_alcargo)
#-----------------------------------
#Split item 13
bs13_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Lg Tm Provisions",])
#Split item 14
bs14_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Sh_TM_Borrowings",])
p14_alcargo=ggplot(bs14_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Short Term Borrowings",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 500), # Set y-axis limits
breaks = seq(0, 500, by =50), # Set the breaks on the y-axis
labels = seq(0, 500,by =50))
grid.arrange(p14_alcargo)
#-----------------------------------
#Split item 15
bs15_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Trade_Payables",])
p15_alcargo=ggplot(bs15_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Trade Payables",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 600), # Set y-axis limits
breaks = seq(100, 600, by =100), # Set the breaks on the y-axis
labels = seq(100, 600,by =100))
grid.arrange(p15_alcargo)
#---------------------------------
#Split item 16
bs16_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="Oth_CurR_Liab",])
p16_alcargo=ggplot(bs16_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Other Current Liabilities",
caption = "Created by Team Logistics",
subtitle="Allcargo Logistics limited (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 500), # Set y-axis limits
breaks = seq(100, 500, by = 100), # Set the breaks on the y-axis
labels = seq(100, 500, by = 100)) # Label the y-axis with values from 50 to 80
grid.arrange(p16_alcargo)
#----------------------------------------
#Split item 17
bs17_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Sh_Tm_Provi",])
#-----------------------------------
#Split item 18
bs18_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Tan_Asset",])
p18_alcargo=ggplot(bs18_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Tangible Assets",
subtitle="Allcargo Logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(50, 750), # Set y-axis limits
breaks = seq(50, 750, by = 100), # Set the breaks on the y-axis
labels = seq(50, 750, by = 100))
grid.arrange(p18_alcargo)
#-----------------------------------
#Split item 19
bs19_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Intan_Asset",])
p19_alcargo=ggplot(bs19_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Intangible Assets",
subtitle="Allcargo Logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 3), # Set y-axis limits
breaks = seq(0, 3, by = 0.5), # Set the breaks on the y-axis
labels = seq(0, 3, by = 0.5))
grid.arrange(p19_alcargo)
#-----------------------------------
#Split item 20
bs20_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Cap_Work_In_Progress",])
p20_alcargo=ggplot(bs20_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Capital Work-In-Progress",
subtitle="Allcargo Logistics limited(2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(1, 20), # Set y-axis limits
breaks = seq(1, 20, by = 1), # Set the breaks on the y-axis
labels = seq(1, 20, by = 1))
grid.arrange(p20_alcargo)
#---------------------------------
#Split item 21
bs21_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="Intang_Asset_Under_Development",])
p21_alcargo=ggplot(bs21_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Intangible Assets Under Developments",
caption = "Created by Team Logistics",
subtitle="Allcargo Logistics limited (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 1), # Set y-axis limits
breaks = seq(0, 1, by = 0.5), # Set the breaks on the y-axis
labels = seq(0, 1, by = 0.5)) # Label the y-axis with values from 50 to 80
grid.arrange(p21_alcargo)
#----------------------------------------
#Split item 22
bs22_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Oth_Asset",])
#-----------------------------------
#Split item 23
bs23_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "FD_Asset",])
p23_alcargo=ggplot(bs23_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Fixed Assets",
subtitle="Allcargo Logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(50, 750), # Set y-axis limits
breaks = seq(50, 750, by = 50), # Set the breaks on the y-axis
labels = seq(50, 750, by = 50))
grid.arrange(p23_alcargo)
#-----------------------------------
#Split item 24
bs24_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Non_Curr_Invest",])
p24_alcargo=ggplot(bs24_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in 00's",
title="Non-Current Investments",
subtitle="Allcargo Logistics limited(2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black")+ # Display numbers above points
scale_y_continuous(
limits = c(500, 2000), # Set y-axis limits
breaks = seq(500, 2000, by = 500), # Set the breaks on the y-axis
labels = seq(500, 2000, by = 500))
grid.arrange(p24_alcargo)
#-----------------------------------
#Split item 25
bs25_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "DeferredTaxAsset_Net",])
p25_alcargo=ggplot(bs25_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Deferred Tax Assets [Net]",
subtitle=" Allcargo Logistics limited(2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(10, 100), # Set y-axis limits
breaks = seq(10, 100, by = 10), # Set the breaks on the y-axis
labels = seq(10, 100, by = 10))
grid.arrange(p25_alcargo)
#-----------------------------------
#Split item 26
bs26_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Lg_Tm_LoansAndAdvanc",])
p26_alcargo=ggplot(bs26_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Long Term Loans and Advances",
subtitle=" Allcargo Logistics limited(2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 300), # Set y-axis limits
breaks = seq(0, 300, by =50 ), # Set the breaks on the y-axis
labels = seq(0, 300, by = 50))
grid.arrange(p26_alcargo)
#-----------------------------------
#Split item 27
bs27_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Oth_Non_Curr_ Asset",])
p27_alcargo=ggplot(bs27_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Other Non CUrrent Asset",
subtitle=" Allcargo Logistics limited(2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(10, 100), # Set y-axis limits
breaks = seq(10, 100, by = 10), # Set the breaks on the y-axis
labels = seq(10, 100, by = 10))
grid.arrange(p27_alcargo)
#-----------------------------------
#Split item 28
bs28_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Curr_Invest",])
p28_alcargo=ggplot(bs28_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Current Investment",
subtitle=" Allcargo Logistics limited(2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 200), # Set y-axis limits
breaks = seq(0, 200, by = 10), # Set the breaks on the y-axis
labels = seq(0, 200, by = 10))
grid.arrange(p28_alcargo)
#-----------------------------------
#Split item 29
bs29_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Inventories",])
p29_alcargo=ggplot(bs29_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Inventories",
subtitle=" Allcargo Logistics limited(2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 200), # Set y-axis limits
breaks = seq(0, 200, by = 10), # Set the breaks on the y-axis
labels = seq(0, 200, by = 10))
grid.arrange(p29_alcargo)
#---------------------------------------
#Split item 30
bs30_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Trade_Receiva",])
p30_alcargo=ggplot(bs30_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Trade Receivables",
subtitle="alcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 700), # Set y-axis limits
breaks = seq(100,700, by = 100), # Set the breaks on the y-axis
labels = seq(100,700, by = 100))
grid.arrange(p30_alcargo)
#---------------------------------------
#Split item 31
bs31_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "CashAndCash_Equi",])
p31_alcargo=ggplot(bs31_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Cash And Cash Equivalents",
subtitle="alcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 100), # Set y-axis limits
breaks = seq(0, 100, by = 20), # Set the breaks on the y-axis
labels = seq(0,100, by = 20))
grid.arrange(p31_alcargo)
#---------------------------------------
#Split item 32
bs32_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Sh_Tm_LoansAnd Advanc",])
p32_alcargo=ggplot(bs32_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Short Term Loans And Advances",
subtitle="alcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 10), # Set y-axis limits
breaks = seq(0, 10, by = 1), # Set the breaks on the y-axis
labels = seq(0,10, by = 1))
grid.arrange(p32_alcargo)
#---------------------------------------
#Split item 33
bs33_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Oth_Curr_Assets",])
p33_alcargo=ggplot(bs33_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Other Current Assets",
subtitle="alcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 500), # Set y-axis limits
breaks = seq(0, 500, by = 100), # Set the breaks on the y-axis
labels = seq(0,500, by = 100))
grid.arrange(p33_alcargo)
#----------------------------------------
#Alternate way for sum
#Find the Total current asset from
tot_curr_asset_alcargo_bs=rbind(bs28_alcargo,bs29_alcargo,bs30_alcargo,bs31_alcargo,bs32_alcargo,bs33_alcargo)
tot_curr_asset_alcargo_bs=aggregate(Amount ~ Year ,
data = tot_curr_asset_alcargo_bs,
FUN = sum)
#----------------------------------------
#Split item 34
bs34_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Contingent_Liab",])
p34_alcargo=ggplot(bs34_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Contingent Liabilities",
subtitle="alcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 1200), # Set y-axis limits
breaks = seq(0, 1200, by = 200), # Set the breaks on the y-axis
labels = seq(0,1200, by = 200))
grid.arrange(p34_alcargo)
#----------------------------------------
#Split item 35
bs35_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Raw_Materia",])
#----------------------------------------
#Split item 36
bs36_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Stores_SparesAndLoose_Tools",])
#----------------------------------------
#Split item 37
bs37_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Trade_Other_Goods",])
#----------------------------------------
#Split item 38
bs38_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Capi_Goods",])
#----------------------------------------
#Split item 39
bs39_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Expendi_In_Foreign_Currency",])
p39_alcargo=ggplot(bs39_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Expenditure In Foreign Currency",
subtitle="alcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 1000), # Set y-axis limits
breaks = seq(0, 1000, by = 100), # Set the breaks on the y-axis
labels = seq(0,1000, by = 100))
grid.arrange(p39_alcargo)
#----------------------------------------
#Split item 40
bs40_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items == "Oth_Earni",])
p40_alcargo=ggplot(bs40_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Other Earnings",
subtitle="alcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 800), # Set y-axis limits
breaks = seq(100, 800, by = 100), # Set the breaks on the y-axis
labels = seq(100, 800, by = 100))
grid.arrange(p40_alcargo)
#----------------------------------------
#Split item 41
bs41_alcargo=as.data.frame(alcargo_bs_long[alcargo_bs_long$Items=="Bonus_Equ_Sh_Cap",])
p41_alcargo=ggplot(bs41_alcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Bonus Equity Share Capital",
caption = "Created by Team Logistics",
subtitle="alcargo logistics limited (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 200), # Set y-axis limits
breaks = seq(0, 200, by = 20), # Set the breaks on the y-axis
labels = seq(0, 200, by = 20)) # Label the y-axis with values from 0 to 200
grid.arrange(p41_alcargo)
#Cash flow statement DATA
#---------------------------------
#Split item 1
c1_allcargo=as.data.frame(allcargo_cfs_long[allcargo_cfs_long$items=="npbt",])
p1_allcargo=ggplot(c1_allcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Net Profit Before Tax",
caption = "Created by Team Logistics",
subtitle="Allcargo logistics limited (2020 - 2024)")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(100, 500), # Set y-axis limits
breaks = seq(100, 500, by = 100), # Set the breaks on the y-axis
labels = seq(100, 500, by = 100)) # Label the y-axis with values from 100 to 500
grid.arrange(p1_allcargo)
#----------------------------------------
#Split item 2
c2_allcargo=as.data.frame(allcargo_cfs_long[allcargo_cfs_long$items == "NetCashFromOperActiv",])
p2_allcargo=ggplot(c2_allcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Net Cash From Operating Activities",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(-200, 500), # Set y-axis limits
breaks = seq(-200, 500, by = 100), # Set the breaks on the y-axis
labels = seq(-200, 500, by = 100))
grid.arrange(p2_allcargo)
#-----------------------------------
#Split item 3
c3_allcargo=as.data.frame(allcargo_cfs_long[allcargo_cfs_long$items == "NetCashfromInvestingActiv",])
p3_allcargo=ggplot(c3_allcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Net Cash(used in)/from Investing Activities",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(-600, 300), # Set y-axis limits
breaks = seq(-600, 300, by =100), # Set the breaks on the y-axis
labels = seq(-600, 300,by =100))
grid.arrange(p3_allcargo)
#-----------------------------------
#Split item 4
c4_allcargo=as.data.frame(allcargo_cfs_long[allcargo_cfs_long$items == "NetCashfromFinActiv",])
p4_allcargo=ggplot(c4_allcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Net Cash(used in)/from Financing Activities",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(-500, 400), # Set y-axis limits
breaks = seq(-500, 400, by =100), # Set the breaks on the y-axis
labels = seq(-500, 400,by =100))
grid.arrange(p4_allcargo)
#-----------------------------------
#Split item 5
c5_allcargo=as.data.frame(allcargo_cfs_long[allcargo_cfs_long$items == "Netdec_inc_In_CashandCashEquiv",])
p5_allcargo=ggplot(c5_allcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Net (decrease)/increase In Cash and Cash Equivalents",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(-60, 100), # Set y-axis limits
breaks = seq(-60, 100, by =20), # Set the breaks on the y-axis
labels = seq(-60, 100,by =20))
grid.arrange(p5_allcargo)
#-----------------------------------
#Split item 6
c6_allcargo=as.data.frame(allcargo_cfs_long[allcargo_cfs_long$items == "Op_Cash_CashEquiv",])
p6_allcargo=ggplot(c6_allcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Opening Cash & Cash Equivalents",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 100), # Set y-axis limits
breaks = seq(0, 100, by =10), # Set the breaks on the y-axis
labels = seq(0, 100,by =10))
grid.arrange(p6_allcargo)
#-----------------------------------
#Split item 7
c7_allcargo=as.data.frame(allcargo_cfs_long[allcargo_cfs_long$items == "Cl_Cash_Cash Equiv",])
p7_allcargo=ggplot(c7_allcargo,aes(x=Year,y=Amount))+
geom_point(col="red",size=5)+
geom_line(aes(x=Year,Amount, group=1),
col="blue",
linewidth=2)+
labs(x="Year",y="Amount in Cr's",
title="Closing Cash & Cash Equivalents",
subtitle="Allcargo logistics limited (2020 - 2024)",
caption = "Created by Team Logistics")+
geom_text(aes(label = Amount), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 100), # Set y-axis limits
breaks = seq(0, 100, by =10), # Set the breaks on the y-axis
labels = seq(0, 100,by =10))
grid.arrange(p7_allcargo)
#—————————————— #Calculation of RATIOS #Activity ratio
#1 Trade Receivable turnover ratio
#Define groups from the items
num <- c("revfromopr_net")
den <- c("Trade_Receiva")
#Finding the sum of items in each group year wise
sum_num = tapply(allcargo_pl_long$Amount[allcargo_pl_long$ITEMS %in% num], allcargo_pl_long$Year[allcargo_pl_long$ITEMS %in% num], sum)
sum_den = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% den], alcargo_bs_long$Year[alcargo_bs_long$Item %in% den], mean)
#Finding the ratio of sum in each group - year wise
trade_receivable_turnover_ratio <- sum_num / sum_den
#creating dataframe
r1_ratio <- data.frame(
Year = names(trade_receivable_turnover_ratio),
Ratio = as.numeric(trade_receivable_turnover_ratio))
r1_ratio$Year <- as.numeric(r1_ratio$Year)
ggplot(r1_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "Trade Receivable Turnover Ratio",
title = "Trade Receivable Turnover Ratio Over Years")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black")+ # Display numbers above points
scale_y_continuous(
limits = c(0, 10), # Set y-axis limits
breaks = seq(0, 10, by =1), # Set the breaks on the y-axis
labels = seq(0, 10,by =1))
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
#--------------------------------------------
#2 Fixed Asset turnover ratio
#Define groups from the items
nr <- c("revfromopr_net")
dr <- c("FD_Asset")
#Finding the sum of items in each group year wise
sum_nr = tapply(allcargo_pl_long$Amount[allcargo_pl_long$ITEMS %in% nr], allcargo_pl_long$Year[allcargo_pl_long$ITEMS %in% nr], sum)
sum_dr = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% dr], alcargo_bs_long$Year[alcargo_bs_long$Item %in% dr], mean)
#Finding the ratio of sum in each group - year wise
fixed_asset_turnover_ratio <- sum_nr / sum_dr
#creating dataframe
r2_ratio <- data.frame(
Year = names(fixed_asset_turnover_ratio),
Ratio = as.numeric(fixed_asset_turnover_ratio))
r2_ratio$Year <- as.numeric(r2_ratio$Year)
ggplot(r2_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "Fixed Asset Turnover Ratio",
title = "Fixed Asset Turnover Ratio Over Years")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 36), # Set y-axis limits
breaks = seq(0, 36, by =2), # Set the breaks on the y-axis
labels = seq(0, 36,by =2))
#--------------------------------------------
#3 Total Asset turnover ratio
#Define groups from the items
nr1 <- c("revfromopr_net")
dr1 <- c("Tan_Asset","Intan_Asset","Cap_Work_In_Progress","Non_Curr_Invest","DeferredTaxAsset_Net","Lg_Tm_LoansAndAdvanc","Oth_Non_Curr_ Asset","Curr_Invest","Inventories","Trade_Receiva","CashAndCash_Equi","Sh_Tm_LoansAnd Advanc","Oth_Curr_Assets")
#Finding the sum of items in each group year wise
sum_nr1 = tapply(allcargo_pl_long$Amount[allcargo_pl_long$ITEMS %in% nr1], allcargo_pl_long$Year[allcargo_pl_long$ITEMS %in% nr1], sum)
sum_dr1 = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% dr1], alcargo_bs_long$Year[alcargo_bs_long$Item %in% dr1], sum)
#Finding the ratio of sum in each group - year wise#Finding the ratio of sum in each group - year wisesum
total_asset_turnover_ratio <- sum_nr1 / sum_dr1
#creating dataframe
r3_ratio <- data.frame(
Year = names(total_asset_turnover_ratio),
Ratio = as.numeric(total_asset_turnover_ratio))
r3_ratio$Year <- as.numeric(r3_ratio$Year)
ggplot(r3_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "Total Asset turnover ratio",
title = "Total Asset turnover ratio Over Years")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black")+ # Display numbers above points
scale_y_continuous(
limits = c(0, 2), # Set y-axis limits
breaks = seq(0, 2, by =0.10), # Set the breaks on the y-axis
labels = seq(0, 2,by =0.10))
#Liquidity Ratio
#--------------------------------------------
#4 Current ratio
#Define groups from the items
current_assets <- c("Curr_Invest","Inventories","Trade_Receiva","CashAndCash_Equi","Sh_Tm_LoansAnd Advanc","Oth_Curr_Assets")
current_liabilities <- c("Sh_TM_Borrowings","Trade_Payables","Oth_CurR_Liab","Sh_Tm_Provi")
#Finding the sum of items in each group year wise
sum_current_assets = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% current_assets], alcargo_bs_long$Year[alcargo_bs_long$Item %in% current_assets], sum)
sum_current_liabilities = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% current_liabilities], alcargo_bs_long$Year[alcargo_bs_long$Item %in% current_liabilities], sum)
#Finding the ratio of sum in each group - yearwise
current_ratio <- sum_current_assets / sum_current_liabilities
#creating dataframe
r4_ratio <- data.frame(
Year = names(current_ratio),
Ratio = as.numeric(current_ratio))
r4_ratio$Year <- as.numeric(r4_ratio$Year)
ggplot(r4_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "Current ratio",
title = "Current ratio for the years")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black")+ # Display numbers above points
scale_y_continuous(
limits = c(0, 2), # Set y-axis limits
breaks = seq(0, 2, by =0.10), # Set the breaks on the y-axis
labels = seq(0, 2,by =0.10))
#--------------------------------------------
#5 Quick Ratio== (cash+short-term Marketable Investment+ receivables) / current liabilities
allcargo_pl_longq_r<-data.frame(year = c(2020,2021,2022,2023,2024),
CashAndCash_Equi=c(48.38,41.06,76.71,82.4,19.63),
Curr_Invest=c(5.02,29.03,134.69,169.85,0),
Trade_Receiva=c(314.11,558,633.32,315.27,454.04),
tot_curr_liab=c(897.73,1223.54,1201.60,592.74,799.98))
#calculate cash and sh_t investment
allcargo_pl_longq_r$cash_and_sh_invest_rec <- allcargo_pl_longq_r$CashAndCash_Equi+allcargo_pl_longq_r$Curr_Invest+allcargo_pl_longq_r$Trade_Receiva
#calculate cash ratio
Quick_ratio <-(allcargo_pl_longq_r$cash_and_sh_invest_rec / allcargo_pl_longq_r$tot_curr_liab)
# Create a dataframe for Quick Ratio
r5_allcargo_long<- data.frame(Year = allcargo_pl_longq_r$year, Ratio = Quick_ratio)
# Create ggplot for Quick Ratio
rp5_allcargo <- ggplot(r5_allcargo_long, aes(x = Year, y = Ratio)) +
geom_point(color = "red", size = 5) +
geom_line(aes(group = 1), color = "blue", linewidth = 2) +
labs(x = "Year", y = "Quick Ratio",
title = "Quick Ratio Over the Years",
subtitle = "allcargo Logistics Limited (2020 - 2024)",
caption = "Created by Pavan") +
geom_text(aes(label = round(Ratio, 2)), vjust = -1, color = "black")+ # Display rounded values
scale_y_continuous(
limits = c(0, 1.5), # Set y-axis limits
breaks = seq(0, 1.5, by = 0.5), # Set y-axis breaks
labels = seq(0, 1.5, by = 0.5) # Label y-axis
)
# Print the plot
print(rp5_allcargo)
#--------------------------------------------
#6 Cash ratio
#Cash Ratio = (cash+short-term Marketable Investment) / current liabilities
allcargo_pl_longc_r<-data.frame(year = c(2020,2021,2022,2023,2024),
CashAndCash_Equi=c(48.38,41.06,76.71,82.4,19.63),
Curr_Invest=c(5.02,29.03,134.69,169.85,0),
tot_curr_liab=c(897.73,1223.54,1201.60,592.74,799.98))
#calculate cash and sh_t investment
allcargo_pl_longc_r$cash_and_sh_investment <- allcargo_pl_longc_r$CashAndCash_Equi+allcargo_pl_longc_r$Curr_Invest
#calculate cash ratio
cash_ratio <- (allcargo_pl_longc_r$cash_and_sh_investment / allcargo_pl_longc_r$tot_curr_liab)
# Create a dataframe for Cash Ratio
r6_allcargo_long<- data.frame(Year = allcargo_pl_longq_r$year, Ratio = cash_ratio)
# Create ggplot for Cash Ratio
rp6_allcargo <- ggplot(r6_allcargo_long, aes(x = Year, y = Ratio)) +
geom_point(color = "red", size = 5) +
geom_line(aes(group = 1), color = "blue", linewidth = 2) +
labs(x = "Year", y = "Cash Ratio",
title = "Cash Ratio Over the Years",
subtitle = "allcargo Logistics Limited (2020 - 2024)",
caption = "Created by Pavan") +
geom_text(aes(label = round(Ratio, 2)), vjust = -1, color = "black")+ # Display rounded values
scale_y_continuous(
limits = c(0, 0.5), # Set y-axis limits
breaks = seq(0, 0.5, by = 0.5), # Set y-axis breaks
labels = seq(0, 0.5, by = 0.5) # Label y-axis
)
# Print the plot
print(rp6_allcargo)
#Solvency Ratios #Debt Ratios
#--------------------------------------------
#7 Debt-to-Asset ratio
#Define groups from the items
total_debt <- c("Lg_TM_Borrowing","Sh_TM_Borrowings")
total_asset <- c("Tan_Asset","Intan_Asset","Cap_Work_In_Progress","Non_Curr_Invest","DeferredTaxAsset_Net","Lg_Tm_LoansAndAdvanc","Oth_Non_Curr_ Asset","Curr_Invest","Inventories","Trade_Receiva","CashAndCash_Equi","Sh_Tm_LoansAnd Advanc","Oth_Curr_Assets")
#Finding the sum of items in each group year wise
sum_total_debt = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% total_debt], alcargo_bs_long$Year[alcargo_bs_long$Item %in% total_debt], sum)
sum_total_asset = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% total_asset], alcargo_bs_long$Year[alcargo_bs_long$Item %in% total_asset], sum)
#Finding the ratio of sum in each group - yearwise
debt_asset_ratio <- sum_total_debt / sum_total_asset
#creating dataframe
r7_ratio <- (data.frame(Year=names(debt_asset_ratio),
Ratio=unname(debt_asset_ratio)))
r7_ratio$Year <- as.numeric(r7_ratio$Year)
ggplot(r7_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "Debt-to-asset ratio",
title = "Debt-to-asset ratio for the years")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 0.5), # Set y-axis limits
breaks = seq(0, 0.5, by =0.10), # Set the breaks on the y-axis
labels = seq(0, 0.5,by =0.10))
#--------------------------------------------
#8 Debt-to-Capital ratio
#Define groups from the items
total_debt <- c("Lg_TM_Borrowing","Sh_TM_Borrowings")
total_capital <- c("Lg_TM_Borrowing","Sh_TM_Borrowings","Eq_ShareCap","ReserveandSurplus")
#Finding the sum of items in each group year wise
sum_total_debt = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% total_debt], alcargo_bs_long$Year[alcargo_bs_long$Item %in% total_debt], sum)
sum_total_capital = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% total_capital], alcargo_bs_long$Year[alcargo_bs_long$Item %in% total_capital], sum)
#Finding the ratio of sum in each group - yearwise
debt_capital_ratio <- sum_total_debt / sum_total_capital
#creating dataframe
r8_ratio <- data.frame(
Year = names(debt_capital_ratio),
Ratio = as.numeric(debt_capital_ratio))
r8_ratio$Year <- as.numeric(r8_ratio$Year)
ggplot(r8_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "Debt-to-Capital ratio",
title = "Debt-to-Capital ratio")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 1), # Set y-axis limits
breaks = seq(0, 1, by =0.10), # Set the breaks on the y-axis
labels = seq(0, 1,by =0.10))
#--------------------------------------------
#9 Debt-to-equity ratio
#Define groups from the items
total_debt <- c("Lg_TM_Borrowing","Sh_TM_Borrowings")
total_sh_equity <- c("Eq_ShareCap","Bonus_Equ_Sh_Cap","Revaluation_Reserv","ReserveandSurplus")
#Finding the sum of items in each group year wise
sum_total_debt = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% total_debt], alcargo_bs_long$Year[alcargo_bs_long$Item %in% total_debt], sum)
sum_total_sh_equity = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% total_sh_equity], alcargo_bs_long$Year[alcargo_bs_long$Item %in% total_sh_equity], sum)
#Finding the ratio of sum in each group - yearwise
debt_equity_ratio <- sum_total_debt / sum_total_sh_equity
#creating dataframe
r9_ratio <- data.frame(
Year = names(debt_equity_ratio),
Ratio = as.numeric(debt_equity_ratio))
r9_ratio$Year <- as.numeric(r9_ratio$Year)
ggplot(r9_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "Debt-to-equity ratio",
title = "Debt-to-equity ratio")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 1), # Set y-axis limits
breaks = seq(0, 1, by =0.10), # Set the breaks on the y-axis
labels = seq(0, 1,by =0.10))
#--------------------------------------------
#10 Financial Leverage
#Define groups from the items
avg_total_asset <- c("Tan_Asset","Intan_Asset","Cap_Work_In_Progress","Non_Curr_Invest","DeferredTaxAsset_Net","Lg_Tm_LoansAndAdvanc","Oth_Non_Curr_ Asset","Curr_Invest","Inventories","Trade_Receiva","CashAndCash_Equi","Sh_Tm_LoansAnd Advanc","Oth_Curr_Assets")
avg_total_equity <- c("Eq_ShareCap","ReserveandSurplus")
#Finding the sum of items in each group year wise
sum_avg_total_asset = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% avg_total_asset], alcargo_bs_long$Year[alcargo_bs_long$Item %in% avg_total_asset], sum)
sum_avg_total_equity = tapply(alcargo_bs_long$Amount[alcargo_bs_long$Item %in% avg_total_equity], alcargo_bs_long$Year[alcargo_bs_long$Item %in% avg_total_equity], sum)
#Finding the ratio of sum in each group - yearwise#Finding the ratio of sum in each group - yearwisesum
financial_leverage <- sum_avg_total_asset / sum_avg_total_equity
#creating dataframe
r10_ratio <- data.frame(
Year = names(financial_leverage),
Ratio = as.numeric(financial_leverage))
r10_ratio$Year <- as.numeric(r10_ratio$Year)
ggplot(r10_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "financial_leverage",
title = "Financial Leverage")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(1, 2), # Set y-axis limits
breaks = seq(1, 2, by =0.20), # Set the breaks on the y-axis
labels = seq(1, 2,by =0.20))
#Profitability Ratios
#OPERATING PROFIT MARGIN = OPERATING PROFIT/REVENUE FROM OPERATION)*100
#11 OPERATING PROFIT = Total operating Revenue-(operating and direct expenses+Employee Benefit Expenses+depreciation+other operating cost)
allcargo_pl_long<-data.frame(year = c(2020,2021,2022,2023,2024),
Total_operating_revenue=c(1619.31, 1970.43, 3432.62, 2721.84, 1633.29),
Opr_and_dir_Exp=c(1184.83, 1534.15, 2876.27, 2310.44, 1368.54),
EmployeeBenefitExp=c(133.42, 127.74, 153.18, 156.15, 121.47),
DepAndAmortExp=c(115.05, 102.47, 90.11, 15.83, 19.15),
OtherExp=c(126.45, 126.45, 140.04, 93.92, 103.11))
#calculate operating profit
allcargo_pl_long$operating_profit <- allcargo_pl_long$Total_operating_revenue-(allcargo_pl_long$Opr_and_dir_Exp
+allcargo_pl_long$EmployeeBenefitExp
+allcargo_pl_long$DepAndAmortExp
+allcargo_pl_long$OtherExp)
#calculate operating profit margin
operating_pr_margin <- (allcargo_pl_long$operating_profit / allcargo_pl_long$Total_operating_revenue) * 100
# Create a dataframe for Opr pr margin Ratio
r11_allcargo_long<- data.frame(Year = allcargo_pl_longq_r$year, Ratio = operating_pr_margin)
# Create ggplot for Opr pr margin Ratio
rp11_allcargo <- ggplot(r11_allcargo_long, aes(x = Year, y = Ratio)) +
geom_point(color = "red", size = 5) +
geom_line(aes(group = 1), color = "blue", linewidth = 2) +
labs(x = "Year", y = "OPERATING PROFIT MARGIN",
title = "OPERATING PROFIT MARGIN Over the Years",
subtitle = "allcargo Logistics Limited (2020 - 2024)",
caption = "Created by Pavan") +
geom_text(aes(label = round(Ratio, 2)), vjust = -1, color = "black") + # Display rounded values
scale_y_continuous(
limits = c(0, 6), # Set y-axis limits
breaks = seq(0, 6, by = 1), # Set y-axis breaks
labels = seq(0, 6, by = 1) # Label y-axis
)
# Print the plot
print(rp11_allcargo)
#--------------------------------------------
#12Return-on-equity ratio
#Define groups from the items
numer <- c("PL_AfterTaxAndBeforeExtraOrdinaryItems")
numer_num <- as.numeric(numer)
## Warning: NAs introduced by coercion
denom <- c("Eq_ShareCap","ReserveandSurplus")
#Finding the sum of items in each group year wise
# Calculate sum_numer with valid items
sum_numer <- tapply(
allcargo_pl_long$Amount[allcargo_pl_long$ITEMS %in% numer],
allcargo_pl_long$Year[allcargo_pl_long$ITEMS %in% numer],
sum,
na.rm = TRUE
)
## Error in split.default(X, group): first argument must be a vector
sum_denom <- tapply(
alcargo_bs_long$Amount[alcargo_bs_long$Item %in% denom],
alcargo_bs_long$Year[alcargo_bs_long$Item %in% denom],
sum,
na.rm = TRUE )
#Finding the ratio of sum in each group - yearwise
return_on_equity_ratio <- sum_numer / sum_denom
## Error: object 'sum_numer' not found
#creating dataframe
r12_ratio <- data.frame(
Year = names(return_on_equity_ratio),
Ratio = as.numeric(return_on_equity_ratio))
## Error: object 'return_on_equity_ratio' not found
r12_ratio$Year <- as.numeric(r12_ratio$Year)
## Error: object 'r12_ratio' not found
rp12_ratio <- ggplot(r12_ratio, aes(x = Year, y = Ratio)) +
geom_point(color = "black", size = 6) +
geom_line(color = "blue", size =2) +
labs(
x = "Year",
y = "return_on_equity_ratio",
title = "Return-on-equity ratio")+
geom_text(aes(label = round(Ratio,2)), vjust = -1, color = "black") + # Display numbers above points
scale_y_continuous(
limits = c(0, 1), # Set y-axis limits
breaks = seq(0, 1, by =0.10), # Set the breaks on the y-axis
labels = seq(0, 1,by =0.10))
## Error: object 'r12_ratio' not found
grid.arrange(rp12_ratio)
## Error: object 'rp12_ratio' not found