Introduction: This is a continuation of the Luggage Tourism graphic and analysis for my Business Analytics class. While all this information is designed to compliment a larger presentation, all the work her was done solely by me as the team’s Financial and Analytic Lead. For the Inmyeonjo business project, I created several visualizations to support the business analysis. These include doughnut plots for costs, maps showing location coverage for Inmyeonjo and competitors, and a cumulative payback graph to track financial progress. Together, these visualizations provide a clear overview of the company’s operations and finances.
First, I load in all the necessary libraries for this project
library(ggplot2)library(leaflet)
Warning: package 'leaflet' was built under R version 4.4.1
library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library(scales)library(ggrepel)
Warning: package 'ggrepel' was built under R version 4.4.1
Warning: package 'knitr' was built under R version 4.4.1
library(DT)library(kableExtra)
Attaching package: 'kableExtra'
The following object is masked from 'package:dplyr':
group_rows
I used ggplot2 and dplyr to create a donut chart visualizing the startup costs for Inmyeonjo. I built a data frame with cost categories and amounts, calculated each category’s fraction of the total to determine the start and end positions for the chart segments, and generated internal labels showing dollar amounts. The chart displays the donut with internal labels and an external legend for category names, and I end off by savin the chart as a PNG.
I used ggplot2 and dplyr to create a second doughnut chart showing the annual employee cost breakdown for Inmyeonjo. I built a data frame with employee roles and costs, calculated each role’s percentage of the total, and added labels showing these percentages. The chart displays the doughnut with internal labels and an external legend, and I also saved the chart as a PNG file for use outside R.
I loaded the T_Luggage dataset and used Leaflet to create an interactive map of key T-Luggage locations. I defined a color palette by location type, made airports visually larger, added popups for each location, and included a legend to distinguish location types. The resulting map allows easy visualization of T-Luggage operations across the city.Finally, I saved the map as both an HTML file and a PNG image so it could be shared or included in reports.
I loaded the LuggaeAgent data set and used Leaflet to create an interactive map showing key LuggAgent operation locations, including an airport. I defined a color palette by location type, added circle markers (with larger markers for airports), included popups for each location, and added a legend. I embedded a map title (“LuggAgent Operations Map”) in the top-left corner using addControl(). Finally, I saved the map as both an HTML file and a PNG image for easy sharing and reporting.
I created an interactive map for Imnyeonjo using Leaflet. I loaded the Hotspots2.csv dataset, which contains key locations for the business, and assigned each location type a distinct color using a palette of seven colors. Compared to the previous maps (T-Luggage and LuggAgent), Imnyeonjo has a wider variety of location types and more options overall, providing a more comprehensive view of potential service points.
This code compares the location coverage of three providers—Imnyeonjo (IM), LuggAgent (LA), and T-Luggage (TLug)—on a single interactive map. Each dataset is standardized to use Lng and Lat columns and assigned a Provider label. Small random jitters are added to latitude and longitude to separate overlapping points visually. The datasets are then combined, and a Leaflet map is created with colored markers for each provider (red for IM, purple for LA, blue for TLug). In addition popups show the location name and provider. A legend and a map title are added, and the final map is displayed, then saved as both an HTML file and a PNG image. This visualization makes it easy to see which provider has the most locations and how their coverage overlaps geographically.
IM <- IM %>%rename(Lng = Lng, Lat = Lat) LA <- LA %>%rename(Lng = Lng, Lat = Lat) TLug <- TLug %>%rename(Lng = Lng, Lat = Lat) IM$Provider <-"Imnyeonjo"LA$Provider <-"LuggAgent"TLug$Provider <-"T-Luggage"add_jitter <-function(df){ df %>%mutate(Lng_jitter = Lng +runif(n(), -0.001, 0.001),Lat_jitter = Lat +runif(n(), -0.001, 0.001) )}IM <-add_jitter(IM)LA <-add_jitter(LA)TLug <-add_jitter(TLug)all_data <-bind_rows(IM, LA, TLug)palette <-colorFactor(palette =c("red", "purple", "blue"),domain = all_data$Provider)map_combined <-leaflet(all_data) %>%setView(lng =126.9971, lat =37.5503, zoom =11) %>%addProviderTiles("Esri.WorldStreetMap") %>%addCircleMarkers(lng =~Lng_jitter,lat =~Lat_jitter,radius =6,color ="black",weight =1,fillColor =~palette(Provider),fillOpacity =0.8,popup =~paste0(Name, "<br>Provider: ", Provider) ) %>%addLegend("topright",pal = palette,values =~Provider,title ="Provider",opacity =1 ) %>%addControl("<b>Comparison of Location Coverage</b>", position ="topleft")map_combined
I created a data frame that organizes key financial metrics for the business, including daily, monthly, and yearly revenue, expenses, corporate tax, net profit after tax, along with their corresponding dollar amounts.
I used ggplot2 to create a bar chart comparing key revenue and expense categories. The plot displays the dollar amounts for each category, and uses a clean minimal theme to clearly highlight differences between revenues and expenses.
ggplot(financial_data[1:4,], aes(x = Category, y = Amount, fill = Category)) +geom_bar(stat ="identity") +theme_minimal() +labs(title ="Revenue vs Expenses Comparison", x ="Category", y ="Amount (USD)") +scale_fill_manual(values =c("lightblue", "lightgreen", "lightyellow", "lightcoral")) +theme(axis.text.x =element_text(angle =45, hjust =1))
I created a line chart showing monthly net profit over a 24-month period using ggplot2. The plot displays a constant net profit trend, highlights the break-even month with a dashed vertical line, and includes an annotation to clearly label the break-even point.
months <-1:24net_profit <-rep(49928, 24) break_even_month <-20net_profit_data <-data.frame(Month = months, Net_Profit = net_profit)ggplot(net_profit_data, aes(x = Month, y = Net_Profit)) +geom_line(color ="blue", size =1) +geom_vline(xintercept = break_even_month, color ="red", linetype ="dashed") +labs(title ="Monthly Net Profit with Break-Even Point", x ="Months", y ="Net Profit (USD)") +theme_minimal() +annotate("text", x = break_even_month +1, y =max(net_profit) *0.9, label ="Break-Even Point", color ="red", angle =0)
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
I calculated cumulative payback over 24 months by summing monthly repayments and visualized it with a line graph in ggplot2. The chart shows how payback grows over time, includes a dashed line for the total payback target, and uses an annotation to highlight when the business approaches full investment recovery.This visualization highlights the timeline and feasibility of recovering the initial investment, making it a key tool for evaluating financial sustainability and break-even progress.
cumulative_payback <-cumsum(rep(49500, 24)) payback_data <-data.frame(Month = months, Cumulative_Payback = cumulative_payback)ggplot(payback_data, aes(x = Month, y = Cumulative_Payback)) +geom_line(color ="green", size =1) +geom_hline(yintercept =995273, color ="red", linetype ="dashed") +labs(title ="Cumulative Payback Over Time", x ="Months", y ="Cumulative Payback (USD)") +theme_minimal() +annotate("text", x =23, y =995273+50000, label ="Total Payback Target", color ="red", angle =0)
I created an interactive table using DT to display Inmyeonjo’s financial data, allowing users to sort, search, and page through the summary with a clear caption for context.
datatable(financial_data, options =list(pageLength =5), caption ="Financial Summary for Inmyeonjo")
I created a financial summary table for Inmyeonjo using kable and kableExtra, formatting the header and highlighting revenue and profit in green, while emphasizing expenses, taxes, and total payback in red to clearly show gains and losses.