install.packages("ggplot2")
## Installing package into '/home/rstudio-user/R/x86_64-pc-linux-gnu-library/4.2'
## (as 'lib' is unspecified)
Observations
In this data set we are given information about different stages of sales. These include closed lost, closed won, contract, deferred, demo, gain sponsorship, proposal, and qualify. Below are many graphs organizing this data in a cohesive manner.
From this data, it is noted that KJ is making the most Annual Recurring Revenue at 248,817.00 dollars. It is also evident that Jay is making the least amount of Annual Recurring Revenue at 24,200.00 dollars. Additionally, we can see Matt has lost the most amount of deaLs. Jay and Michelle have the lowest amount of closed lost and they make the least amount of Annual Recurring Revenue. Based on this, we hypothesize that in order to make a large annual recurring revenue amount, salesmen have to attempt a lot of sales, even if that means losing a lot of them. KJ has won the most deals and has the most in gain sponsorship.
install.packages("openintro")
## Installing package into '/home/rstudio-user/R/x86_64-pc-linux-gnu-library/4.2'
## (as 'lib' is unspecified)
install.packages("tidyverse")
## Installing package into '/home/rstudio-user/R/x86_64-pc-linux-gnu-library/4.2'
## (as 'lib' is unspecified)
installed.packages("readxl")
## Package LibPath Version Priority Depends Imports LinkingTo Suggests
## Enhances License License_is_FOSS License_restricts_use OS_type Archs
## MD5sum NeedsCompilation Built
library(openintro)
## Loading required package: airports
## Loading required package: cherryblossom
## Loading required package: usdata
library(tidyverse)
## ── Attaching packages
## ───────────────────────────────────────
## tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.5
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.4.1
## ✔ readr 2.1.3 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library(readxl)
library(ggplot2)
library(ggridges)
EnterpriseData <- read_excel("EnterpriseData.xlsx")
ggplot(EnterpriseData , aes(x = Annual_Recurring_Rev, y = Deal_Stage, fill = Deal_Stage, color = Deal_Stage))
geom_density_ridges(alpha = 0.5)
## geom_density_ridges: na.rm = FALSE, panel_scaling = TRUE
## stat_density_ridges: na.rm = FALSE
## position_points_sina
library(ggridges)
EnterpriseData <- read_excel("EnterpriseData.xlsx")
ggplot(EnterpriseData , aes(x = Deal_Stage, y = Deal_owner, fill = Deal_owner, color = Deal_owner))
geom_density_ridges(alpha = 0.5)
## geom_density_ridges: na.rm = FALSE, panel_scaling = TRUE
## stat_density_ridges: na.rm = FALSE
## position_points_sina
library(ggplot2)
EnterpriseData <- read_excel("EnterpriseData.xlsx")
ggplot(EnterpriseData, aes(x = Annual_Recurring_Rev, y = Deal_owner)) +
geom_violin()
## Warning: Removed 58 rows containing non-finite values (stat_ydensity).
## Warning: Groups with fewer than two data points have been dropped.
library(ggplot2)
EnterpriseData <- read_excel("EnterpriseData.xlsx")
ggplot(EnterpriseData, aes(x = Annual_Recurring_Rev, y = Deal_owner)) +
geom_violin()
## Warning: Removed 58 rows containing non-finite values (stat_ydensity).
## Warning: Groups with fewer than two data points have been dropped.
#Practice <- filter(EnterpriseData, Deal_Name == "WG")
colnames(EnterpriseData)
## [1] "Record_ID" "Deal_Name" "Deal_Stage"
## [4] "Close_Date" "Deal_owner" "Annual_Recurring_Rev"
Enterprise_opendeals <- filter(EnterpriseData, Deal_Stage == "Qualify" | Deal_Stage == "Deferred" | Deal_Stage == "Proposal" | Deal_Stage == "Contract" | Deal_Stage == "Gain Sponsership" | Deal_Stage == "Demo", Deal_owner == "KJ")
##Closed lost and won
Enterprise_Closed <- filter(EnterpriseData, Deal_Stage == "Closed lost" | Deal_Stage == "Closed won")
print(Enterprise_Closed)
## # A tibble: 235 × 6
## Record_ID Deal_Name Deal_Stage Close_Date Deal_owner Annual_Recu…¹
## <chr> <chr> <chr> <dttm> <chr> <dbl>
## 1 8667386634 MMT Closed lost 2022-06-03 08:22:00 Jay 22500
## 2 8665924620 NR Closed won 2022-06-30 10:37:00 Jay 24200
## 3 8376067927 MAG Closed lost 2022-04-21 09:43:00 Jay 30000
## 4 8051015557 IMP Closed lost 2022-05-05 11:27:00 Jay 300000
## 5 5281132294 MCC Closed lost 2022-02-01 09:19:00 Jay 100000
## 6 80536468 ADC Closed lost 2021-12-06 16:25:00 Jay 50000
## 7 6290897793 GUSI Closed lost 2022-04-28 08:43:00 Jeff 30000
## 8 5293533834 USSS Closed won 2021-05-31 18:54:00 Jeff NA
## 9 398502314 OHSU Closed won 2020-12-09 16:23:00 Jeff 260300
## 10 301167866 USSS Closed won 2021-04-15 13:13:00 Jeff 185000
## # … with 225 more rows, and abbreviated variable name ¹​Annual_Recurring_Rev
ggplot(Enterprise_Closed, aes(x = Annual_Recurring_Rev)) +
geom_histogram(binwidth = 50000)
## Warning: Removed 49 rows containing non-finite values (stat_bin).
ggplot(Enterprise_Closed, aes(x = Annual_Recurring_Rev, y = Deal_Stage, fill = Deal_Stage, color = Deal_Stage)) +
geom_density_ridges(alpha = 0.5)
## Picking joint bandwidth of 38900
## Warning: Removed 49 rows containing non-finite values (stat_density_ridges).
Enterprise_opendeals <- filter(EnterpriseData, Deal_Stage == "Qualify" | Deal_Stage == "Deferred" | Deal_Stage == "Proposal" | Deal_Stage == "Contract" | Deal_Stage == "Gain Sponsorship" | Deal_Stage == "Demo", Deal_owner == "KJ")
print(Enterprise_opendeals)
## # A tibble: 31 × 6
## Record_ID Deal_Name Deal_Stage Close_Date Deal_owner Annua…¹
## <chr> <chr> <chr> <dttm> <chr> <dbl>
## 1 10263616090 POL Qualify 2023-06-30 09:23:00 KJ 100000
## 2 10184892819 AGC Qualify 2022-12-31 12:10:00 KJ 25000
## 3 10117760550 MC Qualify 2023-06-30 14:23:00 KJ 100000
## 4 9944126474 IN Qualify 2023-03-31 11:56:00 KJ NA
## 5 9872064110 MB Qualify 2023-03-31 14:04:00 KJ NA
## 6 9494292544 CEN Demo 2023-03-31 10:24:00 KJ 110000
## 7 9413663363 ALM Proposal 2023-03-31 16:09:00 KJ 110400
## 8 8938605686 ALJ Gain Sponsorship 2022-09-30 13:30:00 KJ 14400
## 9 8738242958 COG Gain Sponsorship 2022-12-31 15:00:00 KJ 100000
## 10 8579937362 SW Demo 2023-12-31 12:34:00 KJ 100000
## # … with 21 more rows, and abbreviated variable name ¹​Annual_Recurring_Rev
##Closed lost and won
Enterprise_Closed <- filter(EnterpriseData, Deal_Stage == "Closed lost" | Deal_Stage == "Closed won")
print(Enterprise_Closed)
## # A tibble: 235 × 6
## Record_ID Deal_Name Deal_Stage Close_Date Deal_owner Annual_Recu…¹
## <chr> <chr> <chr> <dttm> <chr> <dbl>
## 1 8667386634 MMT Closed lost 2022-06-03 08:22:00 Jay 22500
## 2 8665924620 NR Closed won 2022-06-30 10:37:00 Jay 24200
## 3 8376067927 MAG Closed lost 2022-04-21 09:43:00 Jay 30000
## 4 8051015557 IMP Closed lost 2022-05-05 11:27:00 Jay 300000
## 5 5281132294 MCC Closed lost 2022-02-01 09:19:00 Jay 100000
## 6 80536468 ADC Closed lost 2021-12-06 16:25:00 Jay 50000
## 7 6290897793 GUSI Closed lost 2022-04-28 08:43:00 Jeff 30000
## 8 5293533834 USSS Closed won 2021-05-31 18:54:00 Jeff NA
## 9 398502314 OHSU Closed won 2020-12-09 16:23:00 Jeff 260300
## 10 301167866 USSS Closed won 2021-04-15 13:13:00 Jeff 185000
## # … with 225 more rows, and abbreviated variable name ¹​Annual_Recurring_Rev
ggplot(Enterprise_Closed, aes (x = Annual_Recurring_Rev,
fill = Deal_owner))+
geom_histogram(binwidth = 50000)
## Warning: Removed 49 rows containing non-finite values (stat_bin).
ggplot(Enterprise_Closed, aes (x = Annual_Recurring_Rev,
fill = Deal_Stage))+
geom_histogram(binwidth = 50000)
## Warning: Removed 49 rows containing non-finite values (stat_bin).
ggplot(Enterprise_Closed, aes (x = Annual_Recurring_Rev, y = Deal_Stage, fill = Deal_Stage, color = Deal_Stage )) +
geom_density_ridges(alpha = 0.5)
## Picking joint bandwidth of 38900
## Warning: Removed 49 rows containing non-finite values (stat_density_ridges).
#Enterprise_opendeals <- filter(Enterprise, Deal_Stage == "Deferred" | Deal_Stage == "Qualify" | Deal_Stage == "Proposal" | Deal_Stage == "Gain Sponsership" | Deal_Stage == "Demo" | Deal_owner == "KJ")
#Enterprise %>%
# select(Deal_Name, Deal_Stage, Annual_Recurring_Rev)
#Enterprise %>%
# group_by(Deal_owner) %>%
# summarize(
# avg_revenue = mean(Annual_Recurring_Rev, na.rm = TRUE)
# )