Observations: 0 of the 8 deals with an annual recurring revenue greater than or equal to $1,000,000 haven’t been won. The biggest deal is 2.8 million dollars, owned by Tomas, but it is only in the proposal stage. Only 3 “Closed won” deals have an annual recurring revenue greater than $500,000. 53 deals in the data set have been won, with 20 of those deals belonging to KJ. Jeff’s ratio of deals won to deals lost is 6:1.

library(ggplot2)
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.4.1 
## ✔ readr   2.1.3      ✔ forcats 0.5.2 
## ✔ purrr   0.3.5      
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(openintro)
## Loading required package: airports
## Loading required package: cherryblossom
## Loading required package: usdata
library(readxl)
EnterpriseHealth <- read_excel("EnterpriseHealth.xlsx")
Enterprise_Closed <- filter(EnterpriseHealth, DealStage == "Closed lost" | DealStage == "Closed won")
print(Enterprise_Closed)
## # A tibble: 235 × 6
##    RecordID   DealName DealStage   CloseDate           DealOwner AnnualRecurri…¹
##    <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 ¹​AnnualRecurringRev
ggplot(Enterprise_Closed, aes(x = DealOwner, fill = DealStage)) +
  geom_bar()

Enterprise_Jay <- filter(EnterpriseHealth, DealOwner == "Jay")
print(Enterprise_Jay)
## # A tibble: 14 × 6
##    RecordID    DealName DealStage        CloseDate           DealOwner AnnualR…¹
##    <chr>       <chr>    <chr>            <dttm>              <chr>         <dbl>
##  1 10279704247 MOS      Qualify          2023-04-21 16:12:00 Jay          150000
##  2 9794103143  MED      Proposal         2023-03-31 15:59:00 Jay         1000000
##  3 9434330372  CORE     Gain Sponsorship 2022-12-16 09:22:00 Jay          342500
##  4 9218714222  MON      Demo             2022-12-15 11:36:00 Jay          300000
##  5 8667386634  MMT      Closed lost      2022-06-03 08:22:00 Jay           22500
##  6 8665924620  NR       Closed won       2022-06-30 10:37:00 Jay           24200
##  7 8405622154  ATC      Deferred         2023-04-30 10:16:00 Jay          150000
##  8 8376067927  MAG      Closed lost      2022-04-21 09:43:00 Jay           30000
##  9 8052578899  CAR      Qualify          2023-03-31 11:33:00 Jay              NA
## 10 8051015557  IMP      Closed lost      2022-05-05 11:27:00 Jay          300000
## 11 7658136696  TYS      Qualify          2023-03-31 10:34:00 Jay          300000
## 12 7657336991  RT       Qualify          2023-07-31 09:24:00 Jay         1000000
## 13 5281132294  MCC      Closed lost      2022-02-01 09:19:00 Jay          100000
## 14 80536468    ADC      Closed lost      2021-12-06 16:25:00 Jay           50000
## # … with abbreviated variable name ¹​AnnualRecurringRev
ggplot(Enterprise_Jay, aes(x = AnnualRecurringRev, fill = DealStage)) +
  geom_bar()
## Warning: Removed 1 rows containing non-finite values (stat_count).

Enterprise_KJ <- filter(EnterpriseHealth, DealOwner == "Jay", DealStage == "Proposal" | DealStage == "Qualify" | DealStage == "Gain Sponsorship" | DealStage == "Demo" | DealStage == "Contract" | DealStage == "Deferred")
print(Enterprise_KJ)
## # A tibble: 8 × 6
##   RecordID    DealName DealStage        CloseDate           DealOwner AnnualRe…¹
##   <chr>       <chr>    <chr>            <dttm>              <chr>          <dbl>
## 1 10279704247 MOS      Qualify          2023-04-21 16:12:00 Jay           150000
## 2 9794103143  MED      Proposal         2023-03-31 15:59:00 Jay          1000000
## 3 9434330372  CORE     Gain Sponsorship 2022-12-16 09:22:00 Jay           342500
## 4 9218714222  MON      Demo             2022-12-15 11:36:00 Jay           300000
## 5 8405622154  ATC      Deferred         2023-04-30 10:16:00 Jay           150000
## 6 8052578899  CAR      Qualify          2023-03-31 11:33:00 Jay               NA
## 7 7658136696  TYS      Qualify          2023-03-31 10:34:00 Jay           300000
## 8 7657336991  RT       Qualify          2023-07-31 09:24:00 Jay          1000000
## # … with abbreviated variable name ¹​AnnualRecurringRev
Enterprise_Money <- filter(EnterpriseHealth, DealStage == "Closed won", AnnualRecurringRev >= 500000)
print(Enterprise_Money)
## # A tibble: 3 × 6
##   RecordID  DealName DealStage  CloseDate           DealOwner AnnualRecurringRev
##   <chr>     <chr>    <chr>      <dttm>              <chr>                  <dbl>
## 1 307640671 JPMC     Closed won 2019-06-26 09:28:00 KJ                    790000
## 2 253655997 OHS      Closed won 2020-06-26 15:00:00 KJ                    542500
## 3 881843366 NH       Closed won 2021-08-17 11:23:00 Matt                  505000
Enterprise_Won <- filter(EnterpriseHealth, DealStage == "Closed won")
print(Enterprise_Won)
## # A tibble: 53 × 6
##    RecordID   DealName DealStage  CloseDate           DealOwner AnnualRecurrin…¹
##    <chr>      <chr>    <chr>      <dttm>              <chr>                <dbl>
##  1 8665924620 NR       Closed won 2022-06-30 10:37:00 Jay                  24200
##  2 5293533834 USSS     Closed won 2021-05-31 18:54:00 Jeff                    NA
##  3 398502314  OHSU     Closed won 2020-12-09 16:23:00 Jeff                260300
##  4 301167866  USSS     Closed won 2021-04-15 13:13:00 Jeff                185000
##  5 268205194  AMG      Closed won 2021-04-08 07:43:00 Jeff                190000
##  6 61675160   BU       Closed won 2021-03-30 16:19:00 Jeff                 60000
##  7 61674890   HNDOE    Closed won 2018-04-02 00:00:00 Jeff                401920
##  8 7610485823 ALA      Closed won 2022-07-13 08:47:00 KJ                   21600
##  9 6911097101 ALC      Closed won 2022-04-20 16:05:00 KJ                  130500
## 10 5429811876 JPMG     Closed won 2021-06-22 14:48:00 KJ                  352000
## # … with 43 more rows, and abbreviated variable name ¹​AnnualRecurringRev
ggplot(Enterprise_Won, aes(x = DealOwner, fill = AnnualRecurringRev)) +
  geom_bar()

Enterprise_Lost <- filter(EnterpriseHealth, DealStage == "Closed lost")
print(Enterprise_Lost)
## # A tibble: 182 × 6
##    RecordID   DealName DealStage   CloseDate           DealOwner AnnualRecurri…¹
##    <chr>      <chr>    <chr>       <dttm>              <chr>               <dbl>
##  1 8667386634 MMT      Closed lost 2022-06-03 08:22:00 Jay                 22500
##  2 8376067927 MAG      Closed lost 2022-04-21 09:43:00 Jay                 30000
##  3 8051015557 IMP      Closed lost 2022-05-05 11:27:00 Jay                300000
##  4 5281132294 MCC      Closed lost 2022-02-01 09:19:00 Jay                100000
##  5 80536468   ADC      Closed lost 2021-12-06 16:25:00 Jay                 50000
##  6 6290897793 GUSI     Closed lost 2022-04-28 08:43:00 Jeff                30000
##  7 8964792883 ACH      Closed lost 2022-08-26 07:50:00 KJ                  35000
##  8 7079587871 ULT      Closed lost 2022-05-18 15:57:00 KJ                  30000
##  9 6994809858 LG       Closed lost 2022-03-25 10:30:00 KJ                  28700
## 10 6697448821 UPEAP    Closed lost 2022-06-24 09:56:00 KJ                  61500
## # … with 172 more rows, and abbreviated variable name ¹​AnnualRecurringRev
ggplot(Enterprise_Lost, aes(x = DealOwner)) +
  geom_bar()