Introduction

Y Combinator is one of the most renowned startup accelerators in the world. Since its founding in 2005, Y Combinator has invested in more than 2,000 startups, including outsanding names such as Airbnb, Dropbox, Coinbase or Reddit. The Y Combinator investment dataset, which contains information on startups that received funding from Y Combinator between 2005 and 2019, provides a valuable resource for exploring trends and patterns in startup funding.

In this project, we will explore the Y Combinator investment dataset and apply several data mining techniques to gain insights into the characteristics of successful Y Combinator startups. We will focus on three main techniques: clustering, dimension reduction, and association rules.

First, we will use clustering techniques to group startups based on their categories and total amount of money raised, with the goal of identifying groups of companies with similar funding patterns and business focuses.

Next, we will explore dimension reduction techniques to identify important features that contribute to the success of Y Combinator startups. This will allow us to gain a better understanding of the factors that are associated with successful startups.

Finally, we will apply association rule mining techniques to identify relationships between different features of the Y Combinator investment dataset, such as the relationship between the funding amount and the type of industry.

Overall, the aim of this project is to provide a comprehensive analysis of the Y Combinator investment dataset and to gain insights into the characteristics of successful Y Combinator startups. By applying these data mining techniques, we hope to provide valuable insights for entrepreneurs, investors, and anyone interested in the startup ecosystem.

Loading packages

To do the analysis, the following packages will be needed.

packages <- c("tidyverse", "readr", "corrplot", "ggplot2", "GGally", 
              "patchwork", "tibble", "patchwork", "gridExtra", "RColorBrewer", 
              "factoextra", "labdsv", "maptools", "psych", "ClusterR", 
              "readxl", "cluster", "flexclust", "fpc", "clustertend", 
              "ggthemes", "plotly", "stringr", "missMDA", "ade4", "smacof", 
              "Rtsne", "psy", "scales", "kableExtra", "pdp", "jpeg", "dplyr")

# Load packages if not already loaded
for (package in packages) {
         if (!require(package, character.only = TRUE)) {
                  install.packages(package)
                  library(package, character.only = TRUE)
         }
}

The dataset contains information on startups that received funding from Y Combinator between 2005 and 2019. It includes data on over 2,000 startups, including information on the startup’s name, category, funding stage, funding type, funding amount, pre-money valuation, post-money valuation, and more.

Some key features of the dataset include:

Funding amount: The total amount of money that the startup received from Y Combinator. Funding stage: The stage of funding that the startup received (e.g., ). Category: The category or industry that the startup operates in (e.g., healthcare, e-commerce, education). Funding type: The type of funding that the startup received (e.g., seed, series A, series B). Pre-money valuation: The estimated value of the company before receiving funding.

#upload the dataset 
data <- read.csv("YC.csv")
#present column names
colnames(data)
##  [1] "Name"                                  
##  [2] "Transaction.Name"                      
##  [3] "Funding.Type"                          
##  [4] "Money.Raised.Currency..in.USD."        
##  [5] "Announced.Date"                        
##  [6] "Funding.Stage"                         
##  [7] "Pre.Money.Valuation.Currency..in.USD." 
##  [8] "Description"                           
##  [9] "Categories"                            
## [10] "Location"                              
## [11] "Website"                               
## [12] "Revenue.Range"                         
## [13] "Total.Funding.Amount.Currency..in.USD."
## [14] "Funding.Status"                        
## [15] "Number.of.Funding.Rounds"              
## [16] "Lead.Investors"                        
## [17] "Investor.Names"                        
## [18] "Number.of.Investors"                   
## [19] "Number.of.Partner.Investors"
head(data)
##            Name           Transaction.Name Funding.Type
## 1         Copia         Seed Round - Copia         Seed
## 2     Suiteness       Series A - Suiteness     Series A
## 3      Astranis      Seed Round - Astranis         Seed
## 4    Shield Bio    Seed Round - Shield Bio         Seed
## 5        Platzi        Seed Round - Platzi         Seed
## 6 Kisan Network Seed Round - Kisan Network         Seed
##   Money.Raised.Currency..in.USD. Announced.Date       Funding.Stage
## 1                        3100000     2016-03-22                Seed
## 2                        5000000     2016-12-14 Early Stage Venture
## 3                         120000     2016-03-22                Seed
## 4                        4100000     2017-02-23                Seed
## 5                             NA     2014-12-01                Seed
## 6                             NA     2016-06-01                Seed
##   Pre.Money.Valuation.Currency..in.USD.
## 1                                    NA
## 2                                    NA
## 3                                    NA
## 4                                    NA
## 5                                    NA
## 6                                    NA
##                                                                                                              Description
## 1                                            Copia is the next-generation technology platform for food waste management.
## 2                                   Suiteness is a free-to-join hotel booking website connecting hotel rooms and suites.
## 3                                                    Astranis is building small, low-cost telecommunications satellites.
## 4                                              Shield Bio - using ultra-fast sequencing to prevent antibiotic resistance
## 5 Platzi is an effective online education platform that offers classes on marketing, learn coding, business, and design.
## 6                                                         Kisan Network is an online marketplace for Indian agriculture.
##                                                                                                                      Categories
## 1 Analytics, Communities, Enterprise, Enterprise Software, Marketplace, SaaS, Sharing Economy, Sustainability, Waste Management
## 2                                                                     Family, Hospitality, Hotel, Leisure, Reservations, Travel
## 3                                                                                       Aerospace, Internet, Telecommunications
## 4                                                                      Biotechnology, Genetics, Health Care, Health Diagnostics
## 5                                                                                  Education, Edutainment, Recruiting, Training
## 6                                                                                       Agriculture, AgTech, E-Commerce, Mobile
##                                                  Location
## 1 San Francisco, California, United States, North America
## 2       Oakland, California, United States, North America
## 3 San Francisco, California, United States, North America
## 4      San Jose, California, United States, North America
## 5 Mountain View, California, United States, North America
## 6                           Gurgaon, Haryana, India, Asia
##                       Website Revenue.Range
## 1    https://www.GoCopia.com/   $1M to $10M
## 2   https://www.suiteness.com   $1M to $10M
## 3    http://www.astranis.com/   $1M to $10M
## 4        http://shieldbio.com              
## 5          https://platzi.com Less than $1M
## 6 http://www.kisannetwork.com              
##   Total.Funding.Amount.Currency..in.USD.      Funding.Status
## 1                                4580000                Seed
## 2                                6000000 Early Stage Venture
## 3                               13619998 Early Stage Venture
## 4                               12100000 Early Stage Venture
## 5                               16428315 Early Stage Venture
## 6                                  38300                Seed
##   Number.of.Funding.Rounds                           Lead.Investors
## 1                        2                        Structure Capital
## 2                        3 Bullpen Capital, Global Founders Capital
## 3                        7                                         
## 4                        2                      Andreessen Horowitz
## 5                        5                                         
## 6                        3                                         
##                                                                                                                                                                                                                                                                                                                                                                                Investor.Names
## 1 8VC, Alps Investing Holdings LLC, Chivas Venture, Cynthia Ringo, David Pottruck, Emerson Collective, Eucalyptus Burlingame LLC, Jahan Ali, Jillian Manus, John Solomon, Jordan Kretchmer, Ken Tam, Lutetilla LLC, Lynett Capital, Maples Burlingame LLC, Mitchell Kapor, Moment Ventures, Nurzhas Makishev, Riggs Capital Partners, Steve Case, Structure Capital, Toyota USA, Y Combinator
## 2                                                                                                                                                    AltaIR Capital, Bullpen Capital, David Hauser, FundersClub, Global Founders Capital, HVF Labs, Jared Ablon, Kima Ventures, MetaProp NYC, Muhsen Syed, Rocket Internet, Roland Tanner, SciFi VC, Scott Banister, Tilo Bonow, Y Combinator
## 3                                                                                                                                                                                                                                                            ACE & Company, Fifty Years, Jaan Tallinn, Lars Rasmussen, Refactor Capital, S2 Capital, Samvit Ramadurgam, Wei Guo, Y Combinator
## 4                                                                                                                                                                                                                                                                                        Andreessen Horowitz, Friále, Josh Buckley, Refactor Capital, SGH CAPITAL, Soma Capital, Y Combinator
## 5                                                                                                                                                                                 500 Startups, Amasia, BoomStartup, Deepak Desai, Elies Campo, FundersClub, GE32 Capital, Graph Ventures, Josh Jones, Mind the Seed - MTS Fund, TA Ventures, Thomas Floracks, Y Combinator, Zillionize Angel
## 6                                                                                                                                                                                                                                                                                                                                                  FundersClub, Venture Highway, Y Combinator
##   Number.of.Investors Number.of.Partner.Investors
## 1                  23                          10
## 2                  16                           2
## 3                   9                          NA
## 4                   7                           6
## 5                  14                          NA
## 6                   3                          NA

First, let’s dive into the data

#Funding ype
table(data$`Funding.Type`)
## 
##                    Angel         Convertible Note          Corporate Round 
##                       30                       10                        1 
##           Debt Financing            Funding Round                    Grant 
##                        2                       11                        8 
##                 Pre-Seed     Product Crowdfunding                     Seed 
##                       37                        1                     2188 
##                 Series A                 Series B                 Series C 
##                      155                       61                       27 
##                 Series D                 Series E                 Series F 
##                        5                        3                        2 
## Venture - Series Unknown 
##                       44
#money.Raised
options(scipen = 999)
summary(data$`Money.Raised.Currency..in.USD.`, na.rm = TRUE)
##       Min.    1st Qu.     Median       Mean    3rd Qu.       Max.       NA's 
##       6000     120000     150000    5408455    2000000 1000000000        706
#Announced data
str(data$`Announced.Date`)
##  chr [1:2585] "2016-03-22" "2016-12-14" "2016-03-22" "2017-02-23" ...
#founding stage
table(data$`Funding.Stage`)
## 
##                     Early Stage Venture  Late Stage Venture                Seed 
##                  77                 216                  37                2255
#Premoney Valuation
summary(data$`Pre.Money.Valuation.Currency..in.USD.`)
##       Min.    1st Qu.     Median       Mean    3rd Qu.       Max.       NA's 
##     399603   11684720  350000000  925282590 1150000000 7700000000       2538

Deep Dive into the data

Let’s first summerise how many comapnies was found per year.

library(ggplot2)

  # Convert the Announced.Date column to a date format
data$Announced.Date <- as.Date(data$Announced.Date, format = "%Y-%m-%d")

# Count the number of startups announced per year
startup_count_per_year <- table(format(data$Announced.Date, "%Y"))

print(startup_count_per_year)
## 
## 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 
##   10   18   37   45   49   69  113  173  126  259  231  294  339  371  451
# create bar plot
ggplot(data = data.frame(Year = names(startup_count_per_year), Count = as.numeric(startup_count_per_year)), 
       aes(x = Year, y = Count, fill = Year)) + 
  geom_col() + 
  scale_fill_viridis_d() + 
  ggtitle("Number of Startups Announced per Year") + 
  xlab("Year") + 
  ylab("Count") + 
  theme_minimal()

Becasue YC is a seed investor we would like to focus on Seed rounds. To do this, let’s create a new data set.

Seed_data <- data [data$Funding.Type == "Seed", ]

Becasue we would like to analysis only Companies which raised money. We will just omit the companies without data about raised money.

Raised_Money<- Seed_data [complete.cases(c(Seed_data$`Money.Raised.Currency..in.USD.`)),]

I would like to first divide the location for 4 separate columns -> City, State, Country, Continent.

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.0     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ lubridate 1.9.2     ✔ tibble    3.1.8
## ✔ purrr     1.0.1     ✔ tidyr     1.3.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the ]8;;http://conflicted.r-lib.org/conflicted package]8;; to force all conflicts to become errors
Raised_Money <- Raised_Money %>%
  separate(Location, into = c("City", "State", "Country", "Continent"), sep = ", ", remove = FALSE)
## Warning: Expected 4 pieces. Missing pieces filled with `NA` in 12 rows [129, 206, 230,
## 492, 774, 781, 785, 965, 1021, 1022, 1060, 1153].
library(ggplot2)
library(dplyr)

data_location <-Raised_Money

data_location %>% 
  group_by(Location) %>% 
  summarize(Total_Money_Raised = sum(Money.Raised.Currency..in.USD.)) %>% 
  top_n(10) %>% 
  mutate(Location = factor(Location, levels = rev(Location))) %>%
  ggplot(aes(x = Location, y = log(Total_Money_Raised), fill = Location)) +
  geom_col() +
  scale_y_continuous(labels = scales::comma_format()) +
  labs(x = "Location", y = "Total Money Raised (log scale)", fill = "Location") +
  theme_bw()
## Selecting by Total_Money_Raised

library(ggplot2)
library(dplyr)

# select the columns of interest
df_loc_sum <- Raised_Money %>%
  group_by(Location) %>%
  summarise(Total_Money_Raised = sum(Money.Raised.Currency..in.USD.)) %>%
  
  ungroup() %>%
  filter(Location != "") %>% # remove any rows with empty Location
  
  top_n(10) # keep only the top 10 locations by Total_Money_Raised
## Selecting by Total_Money_Raised
# create a customized color palette
my_colors <- c("#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", 
               "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395")

# create the bar chart
ggplot(df_loc_sum, aes(x = reorder(Location, Total_Money_Raised), y = Total_Money_Raised, fill = Location)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = my_colors) +
  labs(title = "Total Money Raised by Top 10 Locations",
       x = "Location",
       y = "Total Money Raised (in USD)",
       fill = "") +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(angle = 45, hjust = 1),
        legend.position = "none")

library(ggplot2)
library(dplyr)

# select the columns of interest
df_loc_sum <- Raised_Money %>%
  separate(Location, into = c("City", "State", "Country", "Continent"), sep = ", ") %>%
  group_by(Continent, Country) %>%
  summarise(Total_Money_Raised = sum(Money.Raised.Currency..in.USD.)) %>%
  filter(!is.na(Country)) # remove any rows with missing Country
## Warning: Expected 4 pieces. Missing pieces filled with `NA` in 12 rows [129, 206, 230,
## 492, 774, 781, 785, 965, 1021, 1022, 1060, 1153].
## `summarise()` has grouped output by 'Continent'. You can override using the
## `.groups` argument.
# select the top 5 countries for Europe only
europe_data <- df_loc_sum %>%
  group_by(Continent) %>%
  filter(Continent == "Europe") %>%
  slice_max(Total_Money_Raised, n = 5) %>%
  ungroup()


# create a customized color palette
my_colors <- c("#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", 
               "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", 
               "#ff0000", "#00ff00", "#0000ff", "#ffff00", "#ff00ff")

# create the bar chart
ggplot(europe_data, aes(x = reorder(Country, Total_Money_Raised), y = Total_Money_Raised, fill = Country)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = my_colors) +
  labs(title = "Total Money Raised by Top 10 Countries in Europe",
       x = "Country",
       y = "Total Money Raised (in USD)",
       fill = "") +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(angle = 45, hjust = 1),
        legend.position = "none")

Total Money Raised by Top 10 Countries in Asia + Oceania

# select the top 5 countries for Asia + Oceania only
asia_oceania_data <- df_loc_sum %>%
  filter(Continent %in% c("Asia", "Oceania")) %>%
  group_by(Continent, Country) %>%
  summarise(Total_Money_Raised = sum(Total_Money_Raised)) %>%
  slice_max(Total_Money_Raised, n = 10) %>%
  ungroup()
## `summarise()` has grouped output by 'Continent'. You can override using the
## `.groups` argument.
# create a customized color palette
my_colors <- c("#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", 
               "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", 
               "#ff0000", "#00ff00", "#0000ff", "#ffff00", "#ff00ff")

# create the bar chart
ggplot(asia_oceania_data, aes(x = reorder(Country, Total_Money_Raised), y = Total_Money_Raised, fill = Country)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = my_colors) +
  labs(title = "Total Money Raised by Top 10 Countries in Asia and Oceania",
       x = "Country",
       y = "Total Money Raised (in USD)",
       fill = "") +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(angle = 45, hjust = 1),
        legend.position = "none")

Total Money Raised by Top 6 Countries in Africa

# select the top 6 countries for Africa only
Africa_data <- df_loc_sum %>%
  group_by(Continent) %>%
  filter(Continent == "Africa") %>%
  slice_max(Total_Money_Raised, n = 6) %>%
  ungroup()


# create a customized color palette
my_colors <- c("#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", 
               "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", 
               "#ff0000", "#00ff00", "#0000ff", "#ffff00", "#ff00ff")

# create the bar chart
ggplot(Africa_data, aes(x = reorder(Country, Total_Money_Raised), y = Total_Money_Raised, fill = Country)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = my_colors) +
  labs(title = "Total Money Raised by Top 6 Countries in Africa",
       x = "Country",
       y = "Total Money Raised (in USD)",
       fill = "") +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(angle = 45, hjust = 1),
        legend.position = "none")

Total Money Raised by Top 3 Countries in South America

# select the top 3 countries for North America only
North_America_data <- df_loc_sum %>%
  group_by(Continent) %>%
  filter(Continent == "North America") %>%
  slice_max(Total_Money_Raised, n = 3) %>%
  ungroup()


# create a customized color palette
my_colors <- c("#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", 
               "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", 
               "#ff0000", "#00ff00", "#0000ff", "#ffff00", "#ff00ff")

# create the bar chart
ggplot(North_America_data, aes(x = reorder(Country, Total_Money_Raised), y = Total_Money_Raised, fill = Country)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = my_colors) +
  labs(title = "Total Money Raised by Top 3 Countries in North America",
       x = "Country",
       y = "Total Money Raised (in USD)",
       fill = "") +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(angle = 45, hjust = 1),
        legend.position = "none")

South America

Total Money Raised by Top 7 Countries in South America

# select the top 7 countries for South America only
South_America_data <- df_loc_sum %>%
  group_by(Continent) %>%
  filter(Continent == "South America") %>%
  slice_max(Total_Money_Raised, n = 7) %>%
  ungroup()


# create a customized color palette
my_colors <- c("#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", 
               "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", 
               "#ff0000", "#00ff00", "#0000ff", "#ffff00", "#ff00ff")

# create the bar chart  
ggplot(South_America_data, aes(x = reorder(Country, Total_Money_Raised), y = Total_Money_Raised, fill = Country)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = my_colors) +
  labs(title = "Total Money Raised by Top 7 Countries in South America",
       x = "Country",
       y = "Total Money Raised (in USD)",
       fill = "") +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(angle = 45, hjust = 1),
        legend.position = "none")

Total money raised by Continent

Continents_data <- df_loc_sum %>%
  arrange(Total_Money_Raised)




ggplot(Continents_data, aes(x = reorder(Continent, Total_Money_Raised), y = Total_Money_Raised, fill = Continent)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = my_colors) +
  labs(title = "Total Money Raised by Continents",
       x = "Continent",
       y = "Total Money Raised (in USD)",
       fill = "") +
  theme(plot.title = element_text(hjust = 0.5),
        axis.text.x = element_text(angle = 45, hjust = 1),
        legend.position = "none")

Normalised the data

# Load the dataset
Clustering_Raised_Total <- data.frame(Money = Raised_Money$Money.Raised.Currency..in.USD., Total_Funding = Raised_Money$Total.Funding.Amount.Currency..in.USD.)

# Define function to remove outliers using Tukey method
remove_outliers <- function(x, na.rm = TRUE, k = 1.5) {
  qnt <- quantile(x, probs = c(0.25, 0.75), na.rm = na.rm)
  H <- k * IQR(x, na.rm = na.rm)
  x[x < (qnt[1] - H)] <- NA
  x[x > (qnt[2] + H)] <- NA
  x
}

# Remove outliers from both columns using Tukey method
Clustering_Raised_Total$Money <- remove_outliers(Clustering_Raised_Total$Money)
Clustering_Raised_Total$Total_Funding <- remove_outliers(Clustering_Raised_Total$Total_Funding)

# Remove rows with NAs
Clustering_Raised_Total <- na.omit(Clustering_Raised_Total)



Clustering_Norm <- as.data.frame(scale(Clustering_Raised_Total))

# Original data
ggplot(Clustering_Raised_Total, aes(x=Money, y=Total_Funding)) +
  geom_point() +
  labs(title="Original data") +
  theme_bw()

# Normalized data 
ggplot(Clustering_Norm, aes(x=Money, y=Total_Funding)) +
  geom_point() +
  labs(title="Normalized data") +
  theme_bw()

library(cluster)
library(factoextra)
## Welcome! Want to learn more? See two factoextra-related books at https://goo.gl/ve3WBa
library(flexclust)
## Ładowanie wymaganego pakietu: grid
## Ładowanie wymaganego pakietu: lattice
## Ładowanie wymaganego pakietu: modeltools
## Ładowanie wymaganego pakietu: stats4
library(fpc)
library(clustertend)
## Package `clustertend` is deprecated.  Use package `hopkins` instead.
library(ClusterR)
library(psych)
## 
## Dołączanie pakietu: 'psych'
## Następujące obiekty zostały zakryte z 'package:ggplot2':
## 
##     %+%, alpha
library(ggplot2)
library(reshape2)
## 
## Dołączanie pakietu: 'reshape2'
## Następujący obiekt został zakryty z 'package:tidyr':
## 
##     smiths
library(gridExtra)
## 
## Dołączanie pakietu: 'gridExtra'
## Następujący obiekt został zakryty z 'package:dplyr':
## 
##     combine
bss <- numeric()
wss <- numeric()

# Run the algorithm for different values of k 
set.seed(1234)

for(i in 1:10){

  # For each k, calculate Money and Total_Funding
  bss[i] <- kmeans(Clustering_Norm, centers=i)$betweenss
  wss[i] <- kmeans(Clustering_Norm, centers=i)$tot.withinss

}

# Between-cluster sum of squares vs Choice of k
p3 <- qplot(1:10, bss, geom=c("point", "line"), 
            xlab="Number of clusters", ylab="Between-cluster sum of squares") +
  scale_x_continuous(breaks=seq(0, 10, 1)) +
  theme_bw()
## Warning: `qplot()` was deprecated in ggplot2 3.4.0.
# Total within-cluster sum of squares vs Choice of k
p4 <- qplot(1:10, wss, geom=c("point", "line"),
            xlab="Number of clusters", ylab="Total within-cluster sum of squares") +
  scale_x_continuous(breaks=seq(0, 10, 1)) +
  theme_bw()

# Subplot
grid.arrange(p3, p4, ncol=2)

# Load required libraries
library(cluster)
library(factoextra)

# Standardize the data
Clustering_Raised_Total_norm <- scale(Clustering_Raised_Total)

# Perform clara clustering with k=3
set.seed(1234)
clara_flex <- eclust(Clustering_Raised_Total_norm, "clara", k=3) 

# Summarize the clustering results
summary(clara_flex)
## Object of class 'clara' from call:
##  fun_clust(x = x, k = k) 
## Medoids:
##          Money Total_Funding
## 21  -0.4470283   -0.59542725
## 121 -0.4470283    2.13854972
## 648  2.3943258   -0.01217883
## Objective function:    0.4062792 
## Numerical information per cluster:
##      size max_diss   av_diss isolation
## [1,]  901 1.682892 0.2268980 0.6155473
## [2,]  133 2.947831 0.9189793 1.0782210
## [3,]  174 4.023056 0.9432529 1.3869745
## Average silhouette width per cluster:
## [1] 0.8496122 0.4545784 0.4903966
## Average silhouette width of best sample: 0.7543779 
## 
## Best sample:
##  [1] 19   21   61   121  177  272  307  310  335  361  387  475  508  522  549 
## [16] 586  598  612  648  672  682  693  723  807  848  903  1001 1038 1172 1187
## [31] 1210 1220 1237 1246 1247 1306 1318 1340 1356 1361 1369 1455 1465 1466 1496
## [46] 1522
## Clustering vector:
##    6   11   12   16   18   19   20   21   22   23   24   30   34   36   37   39 
##    1    2    3    3    1    3    3    1    1    1    1    3    1    1    1    1 
##   41   43   45   46   48   49   51   52   53   55   56   57   58   60   61   62 
##    2    2    1    1    1    3    3    1    1    2    2    3    3    1    3    3 
##   63   66   67   68   73   75   76   77   81   82   84   88   89   90   93   94 
##    2    3    1    2    1    2    1    2    3    3    1    2    1    2    1    1 
##   95   96   97   98  100  101  103  105  107  108  109  110  113  114  115  116 
##    2    2    1    1    1    1    1    1    1    2    3    2    3    1    1    1 
##  118  119  120  121  122  123  125  127  128  129  130  131  132  133  134  135 
##    2    1    1    2    1    3    2    3    2    1    3    2    2    1    1    2 
##  137  138  139  141  143  144  145  146  147  148  149  150  151  152  153  154 
##    1    1    1    1    1    1    2    1    2    3    3    1    1    2    1    1 
##  155  157  158  159  160  161  164  165  166  167  168  170  171  173  174  176 
##    1    1    3    1    1    1    1    1    1    1    1    1    1    1    1    3 
##  177  178  179  180  181  182  183  184  185  186  187  188  189  190  191  192 
##    1    1    1    3    1    1    2    1    1    1    1    1    2    1    1    3 
##  193  194  195  196  197  198  199  200  201  202  203  204  206  207  208  209 
##    1    1    1    1    3    1    1    2    1    1    1    1    1    3    1    1 
##  212  213  214  215  217  218  219  221  222  223  224  225  226  228  229  230 
##    3    3    1    1    3    1    2    3    1    2    1    2    1    1    3    1 
##  231  232  234  235  236  237  238  239  240  242  243  244  245  246  247  248 
##    1    1    1    2    2    2    2    1    1    1    1    3    1    1    1    3 
##  249  250  251  253  254  255  256  258  259  260  261  263  265  266  267  268 
##    1    3    1    1    1    1    1    1    2    3    1    1    1    1    1    2 
##  269  270  272  273  274  275  276  277  278  279  281  282  283  284  285  286 
##    1    1    1    2    1    3    1    1    3    1    1    3    1    2    1    3 
##  287  288  289  290  291  293  294  295  296  297  298  299  300  301  302  303 
##    1    1    1    3    1    1    1    1    1    1    1    1    1    1    1    1 
##  304  305  306  307  308  309  310  311  312  313  314  315  316  318  319  320 
##    2    1    1    1    1    3    1    1    3    1    1    1    1    1    1    3 
##  321  323  324  326  327  329  330  331  332  333  335  336  337  338  339  340 
##    1    1    1    1    2    1    1    1    1    1    1    1    1    1    1    1 
##  343  344  345  346  347  349  351  352  353  354  356  357  358  359  360  361 
##    1    1    2    2    1    1    3    1    3    1    2    1    1    1    3    1 
##  362  363  364  365  366  367  369  370  371  374  375  376  377  378  380  381 
##    1    1    1    1    1    1    3    1    1    1    2    2    3    2    1    3 
##  382  384  386  387  388  389  390  391  392  393  394  396  397  398  399  400 
##    1    1    1    2    1    1    1    2    1    1    2    1    1    3    1    3 
##  401  402  403  404  405  406  407  408  409  410  411  412  413  414  415  416 
##    1    2    1    1    1    1    3    2    1    1    1    2    1    3    1    1 
##  417  418  419  420  421  422  423  425  426  427  428  429  430  432  433  434 
##    1    1    1    1    1    1    2    1    1    1    1    1    1    2    1    1 
##  435  436  437  438  439  440  441  442  443  444  445  446  447  448  449  451 
##    1    2    1    1    1    3    1    1    1    1    1    1    1    1    2    2 
##  453  454  455  456  460  461  462  463  464  465  466  467  468  469  470  471 
##    2    1    1    1    1    1    1    2    1    1    2    1    2    1    2    3 
##  472  473  474  475  476  477  479  480  481  482  483  484  485  487  488  489 
##    2    1    1    1    2    1    1    3    1    1    1    1    1    1    1    3 
##  490  492  493  494  495  498  499  500  501  502  503  504  505  506  507  508 
##    1    1    1    1    1    1    1    1    1    1    1    1    2    1    1    1 
##  509  510  511  512  513  514  515  516  517  519  520  521  522  523  524  525 
##    1    1    3    1    1    1    3    1    1    1    2    1    1    1    1    1 
##  528  529  530  532  533  534  536  537  538  540  541  543  544  545  546  547 
##    1    1    3    1    1    1    1    1    1    1    1    1    3    1    1    1 
##  548  549  550  551  552  553  555  557  558  559  560  561  562  564  565  566 
##    2    1    1    1    1    1    1    3    1    1    1    1    1    3    1    3 
##  567  568  573  575  577  578  579  580  581  582  583  584  586  588  589  590 
##    1    1    1    1    1    1    3    2    1    1    1    3    1    1    1    2 
##  591  592  594  595  596  597  598  599  600  601  602  604  605  606  607  609 
##    1    1    2    2    3    1    1    2    1    2    1    2    1    1    1    3 
##  610  611  612  614  616  617  618  619  620  621  622  623  625  626  627  628 
##    2    1    1    3    2    1    1    1    1    1    1    1    2    1    3    1 
##  629  631  632  634  638  639  641  642  644  646  647  648  649  650  653  654 
##    1    1    2    3    3    3    2    2    3    1    1    3    3    2    3    3 
##  656  658  660  662  663  664  667  668  669  672  674  675  678  680  681  682 
##    1    2    2    1    1    2    1    1    1    1    3    1    1    1    3    1 
##  683  684  686  688  689  690  691  693  694  695  696  697  698  700  702  703 
##    3    3    3    1    1    2    3    1    1    1    2    3    1    2    1    2 
##  704  706  707  708  709  710  711  712  713  714  715  718  720  721  722  723 
##    3    1    1    3    1    1    1    3    3    1    3    3    1    3    1    3 
##  724  725  726  727  728  730  731  734  735  736  738  740  741  743  744  746 
##    1    1    1    1    1    1    1    1    1    3    1    3    1    1    1    1 
##  747  748  750  753  755  758  759  761  763  764  765  766  768  770  771  773 
##    3    1    1    1    2    1    2    1    1    1    1    1    3    3    1    1 
##  774  779  780  781  783  785  786  787  788  790  791  795  797  798  800  801 
##    1    1    1    1    2    1    2    1    1    1    1    1    3    1    1    1 
##  804  806  807  808  810  812  813  814  815  816  817  821  822  823  825  826 
##    1    3    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
##  827  828  831  832  834  835  836  838  840  841  844  845  846  848  850  851 
##    1    2    3    3    2    2    3    1    3    1    1    3    1    2    1    3 
##  852  853  854  855  856  857  861  863  865  866  867  869  871  876  881  883 
##    1    1    1    2    1    1    3    1    2    1    1    3    1    3    3    3 
##  884  885  892  896  903  904  911  912  913  916  917  918  919  920  921  922 
##    3    3    1    3    1    3    3    1    3    3    3    3    3    1    3    1 
##  924  927  928  929  930  931  933  934  935  936  937  938  939  940  941  942 
##    3    3    3    1    1    3    1    1    3    1    1    1    3    1    3    1 
##  943  944  945  946  949  950  951  952  953  954  955  956  957  958  959  960 
##    1    2    3    1    1    1    3    1    1    1    1    1    1    1    1    1 
##  961  963  964  965  966  967  968  969  970  971  972  973  974  975  976  977 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
##  978  979  980  981  982  983  984  985  986  987  988  989  991  992  993  995 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    3    1 
##  996  997  999 1001 1003 1004 1005 1007 1008 1009 1010 1011 1012 1013 1014 1015 
##    1    1    3    1    1    1    3    1    3    1    3    3    1    1    1    1 
## 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
## 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
## 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
## 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    2    1    1 
## 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
## 1098 1099 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 
##    1    1    2    1    1    1    1    1    1    2    1    1    1    1    1    1 
## 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1128 1129 1130 1131 1132 
##    1    1    1    1    1    1    1    1    1    1    1    3    1    2    3    1 
## 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
## 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1164 1165 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
## 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
## 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1198 1199 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    3    1 
## 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 
##    1    1    2    1    1    1    1    1    2    1    1    1    1    1    1    1 
## 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1227 1228 1232 1233 1236 1237 
##    1    1    1    1    1    1    1    2    1    1    1    2    3    1    1    1 
## 1238 1239 1240 1242 1243 1244 1245 1246 1247 1248 1251 1252 1253 1254 1255 1256 
##    1    1    3    1    3    1    1    1    1    1    1    1    1    1    3    3 
## 1260 1261 1262 1263 1265 1266 1267 1268 1269 1270 1271 1272 1274 1275 1276 1277 
##    1    1    3    1    1    1    1    1    1    1    1    1    2    1    1    1 
## 1278 1279 1282 1283 1284 1285 1286 1288 1289 1290 1291 1292 1293 1294 1295 1296 
##    3    1    1    3    1    3    2    1    1    1    1    2    3    1    1    1 
## 1297 1298 1299 1301 1302 1304 1306 1307 1308 1310 1311 1312 1313 1314 1316 1317 
##    3    1    1    1    1    1    1    2    1    1    1    1    1    1    1    1 
## 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1330 1331 1332 1333 1334 
##    3    1    1    1    1    3    1    1    1    1    1    2    2    1    1    1 
## 1336 1337 1338 1339 1340 1341 1342 1344 1345 1346 1347 1348 1349 1350 1351 1352 
##    1    1    1    1    1    1    2    1    1    1    1    1    1    1    2    1 
## 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1367 1369 1370 1372 1374 1375 
##    1    1    1    1    1    1    1    1    1    1    1    3    3    1    1    3 
## 1376 1377 1378 1379 1380 1381 1382 1383 1385 1386 1387 1388 1389 1390 1391 1392 
##    1    1    1    1    3    1    2    1    1    3    3    2    1    1    3    1 
## 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1408 1409 
##    1    1    1    2    1    3    1    1    1    1    1    1    1    1    1    1 
## 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1425 1426 
##    1    2    1    2    1    1    2    1    2    1    1    2    1    1    1    1 
## 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 
##    1    1    1    3    1    1    1    1    1    3    1    2    1    3    1    1 
## 1443 1444 1446 1447 1448 1451 1452 1454 1455 1457 1459 1460 1461 1463 1464 1465 
##    1    1    1    1    1    1    1    1    1    2    1    1    1    1    1    1 
## 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 
##    2    3    1    1    1    1    1    1    2    3    1    1    2    1    3    1 
## 1483 1484 1486 1487 1489 1491 1492 1493 1494 1496 1498 1499 1502 1503 1504 1505 
##    1    1    2    1    1    1    1    3    1    1    1    1    1    1    2    3 
## 1506 1507 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 
##    1    1    1    1    1    3    1    2    1    3    1    1    1    1    1    2 
## 1524 1525 1526 1527 1528 1530 1532 1533 
##    3    3    1    1    1    1    1    1 
## 
## Silhouette plot information for best sample:
##      cluster neighbor    sil_width
## 6          1        2  0.921242423
## 18         1        2  0.921242423
## 21         1        2  0.921242423
## 24         1        2  0.921242423
## 36         1        2  0.921242423
## 37         1        2  0.921242423
## 39         1        2  0.921242423
## 48         1        2  0.921242423
## 67         1        2  0.921242423
## 76         1        2  0.921242423
## 84         1        2  0.921242423
## 89         1        2  0.921242423
## 93         1        2  0.921242423
## 97         1        2  0.921242423
## 101        1        2  0.921242423
## 105        1        2  0.921242423
## 107        1        2  0.921242423
## 114        1        2  0.921242423
## 115        1        2  0.921242423
## 116        1        2  0.921242423
## 119        1        2  0.921242423
## 120        1        2  0.921242423
## 129        1        2  0.921242423
## 134        1        2  0.921242423
## 137        1        2  0.921242423
## 141        1        2  0.921242423
## 146        1        2  0.921242423
## 150        1        2  0.921242423
## 151        1        2  0.921242423
## 154        1        2  0.921242423
## 155        1        2  0.921242423
## 157        1        2  0.921242423
## 159        1        2  0.921242423
## 164        1        2  0.921242423
## 165        1        2  0.921242423
## 166        1        2  0.921242423
## 168        1        2  0.921242423
## 170        1        2  0.921242423
## 171        1        2  0.921242423
## 173        1        2  0.921242423
## 174        1        2  0.921242423
## 178        1        2  0.921242423
## 181        1        2  0.921242423
## 186        1        2  0.921242423
## 188        1        2  0.921242423
## 191        1        2  0.921242423
## 193        1        2  0.921242423
## 194        1        2  0.921242423
## 196        1        2  0.921242423
## 199        1        2  0.921242423
## 201        1        2  0.921242423
## 202        1        2  0.921242423
## 203        1        2  0.921242423
## 204        1        2  0.921242423
## 206        1        2  0.921242423
## 214        1        2  0.921242423
## 222        1        2  0.921242423
## 224        1        2  0.921242423
## 226        1        2  0.921242423
## 230        1        2  0.921242423
## 242        1        2  0.921242423
## 245        1        2  0.921242423
## 246        1        2  0.921242423
## 247        1        2  0.921242423
## 251        1        2  0.921242423
## 256        1        2  0.921242423
## 266        1        2  0.921242423
## 269        1        2  0.921242423
## 270        1        2  0.921242423
## 272        1        2  0.921242423
## 274        1        2  0.921242423
## 276        1        2  0.921242423
## 277        1        2  0.921242423
## 285        1        2  0.921242423
## 287        1        2  0.921242423
## 291        1        2  0.921242423
## 293        1        2  0.921242423
## 295        1        2  0.921242423
## 296        1        2  0.921242423
## 299        1        2  0.921242423
## 301        1        2  0.921242423
## 303        1        2  0.921242423
## 307        1        2  0.921242423
## 308        1        2  0.921242423
## 310        1        2  0.921242423
## 311        1        2  0.921242423
## 315        1        2  0.921242423
## 319        1        2  0.921242423
## 323        1        2  0.921242423
## 324        1        2  0.921242423
## 326        1        2  0.921242423
## 329        1        2  0.921242423
## 330        1        2  0.921242423
## 333        1        2  0.921242423
## 335        1        2  0.921242423
## 339        1        2  0.921242423
## 343        1        2  0.921242423
## 344        1        2  0.921242423
## 347        1        2  0.921242423
## 349        1        2  0.921242423
## 354        1        2  0.921242423
## 364        1        2  0.921242423
## 366        1        2  0.921242423
## 367        1        2  0.921242423
## 370        1        2  0.921242423
## 374        1        2  0.921242423
## 380        1        2  0.921242423
## 384        1        2  0.921242423
## 388        1        2  0.921242423
## 389        1        2  0.921242423
## 390        1        2  0.921242423
## 392        1        2  0.921242423
## 397        1        2  0.921242423
## 399        1        2  0.921242423
## 401        1        2  0.921242423
## 403        1        2  0.921242423
## 405        1        2  0.921242423
## 411        1        2  0.921242423
## 415        1        2  0.921242423
## 418        1        2  0.921242423
## 419        1        2  0.921242423
## 422        1        2  0.921242423
## 427        1        2  0.921242423
## 429        1        2  0.921242423
## 434        1        2  0.921242423
## 435        1        2  0.921242423
## 437        1        2  0.921242423
## 441        1        2  0.921242423
## 443        1        2  0.921242423
## 445        1        2  0.921242423
## 446        1        2  0.921242423
## 455        1        2  0.921242423
## 456        1        2  0.921242423
## 460        1        2  0.921242423
## 462        1        2  0.921242423
## 465        1        2  0.921242423
## 469        1        2  0.921242423
## 473        1        2  0.921242423
## 474        1        2  0.921242423
## 477        1        2  0.921242423
## 479        1        2  0.921242423
## 481        1        2  0.921242423
## 482        1        2  0.921242423
## 484        1        2  0.921242423
## 485        1        2  0.921242423
## 488        1        2  0.921242423
## 492        1        2  0.921242423
## 494        1        2  0.921242423
## 498        1        2  0.921242423
## 501        1        2  0.921242423
## 502        1        2  0.921242423
## 503        1        2  0.921242423
## 504        1        2  0.921242423
## 508        1        2  0.921242423
## 509        1        2  0.921242423
## 513        1        2  0.921242423
## 516        1        2  0.921242423
## 517        1        2  0.921242423
## 521        1        2  0.921242423
## 522        1        2  0.921242423
## 523        1        2  0.921242423
## 525        1        2  0.921242423
## 528        1        2  0.921242423
## 532        1        2  0.921242423
## 533        1        2  0.921242423
## 534        1        2  0.921242423
## 536        1        2  0.921242423
## 537        1        2  0.921242423
## 540        1        2  0.921242423
## 541        1        2  0.921242423
## 543        1        2  0.921242423
## 549        1        2  0.921242423
## 552        1        2  0.921242423
## 555        1        2  0.921242423
## 558        1        2  0.921242423
## 559        1        2  0.921242423
## 561        1        2  0.921242423
## 567        1        2  0.921242423
## 568        1        2  0.921242423
## 575        1        2  0.921242423
## 578        1        2  0.921242423
## 581        1        2  0.921242423
## 582        1        2  0.921242423
## 583        1        2  0.921242423
## 588        1        2  0.921242423
## 589        1        2  0.921242423
## 597        1        2  0.921242423
## 600        1        2  0.921242423
## 602        1        2  0.921242423
## 612        1        2  0.921242423
## 617        1        2  0.921242423
## 621        1        2  0.921242423
## 623        1        2  0.921242423
## 626        1        2  0.921242423
## 628        1        2  0.921242423
## 667        1        2  0.921242423
## 688        1        2  0.921242423
## 694        1        2  0.921242423
## 702        1        2  0.921242423
## 707        1        2  0.921242423
## 710        1        2  0.921242423
## 711        1        2  0.921242423
## 714        1        2  0.921242423
## 725        1        2  0.921242423
## 730        1        2  0.921242423
## 734        1        2  0.921242423
## 738        1        2  0.921242423
## 744        1        2  0.921242423
## 750        1        2  0.921242423
## 765        1        2  0.921242423
## 773        1        2  0.921242423
## 774        1        2  0.921242423
## 779        1        2  0.921242423
## 781        1        2  0.921242423
## 821        1        2  0.921242423
## 822        1        2  0.921242423
## 827        1        2  0.921242423
## 846        1        2  0.921242423
## 852        1        2  0.921242423
## 853        1        2  0.921242423
## 854        1        2  0.921242423
## 920        1        2  0.921242423
## 963        1        2  0.921242423
## 1129       1        2  0.921242423
## 1195       1        2  0.921242423
## 1236       1        2  0.921242423
## 1244       1        2  0.921242423
## 1245       1        2  0.921242423
## 1247       1        2  0.921242423
## 1248       1        2  0.921242423
## 1251       1        2  0.921242423
## 1252       1        2  0.921242423
## 1253       1        2  0.921242423
## 1254       1        2  0.921242423
## 1260       1        2  0.921242423
## 1261       1        2  0.921242423
## 1263       1        2  0.921242423
## 1265       1        2  0.921242423
## 1266       1        2  0.921242423
## 1267       1        2  0.921242423
## 1268       1        2  0.921242423
## 1269       1        2  0.921242423
## 1270       1        2  0.921242423
## 1272       1        2  0.921242423
## 1275       1        2  0.921242423
## 1276       1        2  0.921242423
## 1284       1        2  0.921242423
## 1294       1        2  0.921242423
## 1295       1        2  0.921242423
## 1296       1        2  0.921242423
## 1298       1        2  0.921242423
## 1299       1        2  0.921242423
## 1301       1        2  0.921242423
## 1302       1        2  0.921242423
## 1310       1        2  0.921242423
## 1311       1        2  0.921242423
## 1314       1        2  0.921242423
## 1316       1        2  0.921242423
## 1317       1        2  0.921242423
## 1319       1        2  0.921242423
## 1320       1        2  0.921242423
## 1321       1        2  0.921242423
## 1322       1        2  0.921242423
## 1324       1        2  0.921242423
## 1325       1        2  0.921242423
## 1326       1        2  0.921242423
## 1327       1        2  0.921242423
## 1332       1        2  0.921242423
## 1334       1        2  0.921242423
## 1337       1        2  0.921242423
## 1338       1        2  0.921242423
## 1339       1        2  0.921242423
## 1340       1        2  0.921242423
## 1341       1        2  0.921242423
## 1347       1        2  0.921242423
## 1348       1        2  0.921242423
## 1349       1        2  0.921242423
## 1352       1        2  0.921242423
## 1355       1        2  0.921242423
## 1356       1        2  0.921242423
## 1357       1        2  0.921242423
## 1358       1        2  0.921242423
## 1359       1        2  0.921242423
## 1361       1        2  0.921242423
## 1362       1        2  0.921242423
## 1363       1        2  0.921242423
## 1367       1        2  0.921242423
## 1372       1        2  0.921242423
## 1374       1        2  0.921242423
## 1376       1        2  0.921242423
## 1377       1        2  0.921242423
## 1383       1        2  0.921242423
## 1390       1        2  0.921242423
## 1393       1        2  0.921242423
## 1394       1        2  0.921242423
## 1395       1        2  0.921242423
## 1397       1        2  0.921242423
## 1399       1        2  0.921242423
## 1400       1        2  0.921242423
## 1401       1        2  0.921242423
## 1402       1        2  0.921242423
## 1403       1        2  0.921242423
## 1405       1        2  0.921242423
## 1408       1        2  0.921242423
## 1410       1        2  0.921242423
## 1412       1        2  0.921242423
## 1414       1        2  0.921242423
## 1415       1        2  0.921242423
## 1417       1        2  0.921242423
## 1419       1        2  0.921242423
## 1426       1        2  0.921242423
## 1427       1        2  0.921242423
## 1428       1        2  0.921242423
## 1429       1        2  0.921242423
## 1431       1        2  0.921242423
## 1432       1        2  0.921242423
## 1433       1        2  0.921242423
## 1434       1        2  0.921242423
## 1435       1        2  0.921242423
## 1441       1        2  0.921242423
## 1444       1        2  0.921242423
## 1447       1        2  0.921242423
## 1452       1        2  0.921242423
## 1454       1        2  0.921242423
## 1460       1        2  0.921242423
## 1461       1        2  0.921242423
## 1464       1        2  0.921242423
## 1465       1        2  0.921242423
## 1468       1        2  0.921242423
## 1469       1        2  0.921242423
## 1471       1        2  0.921242423
## 1472       1        2  0.921242423
## 1473       1        2  0.921242423
## 1477       1        2  0.921242423
## 1481       1        2  0.921242423
## 1483       1        2  0.921242423
## 1484       1        2  0.921242423
## 1489       1        2  0.921242423
## 1491       1        2  0.921242423
## 1502       1        2  0.921242423
## 1503       1        2  0.921242423
## 1507       1        2  0.921242423
## 1510       1        2  0.921242423
## 1511       1        2  0.921242423
## 1512       1        2  0.921242423
## 1514       1        2  0.921242423
## 1522       1        2  0.921242423
## 1527       1        2  0.921242423
## 1528       1        2  0.921242423
## 1530       1        2  0.921242423
## 1533       1        2  0.921242423
## 1279       1        2  0.920970454
## 302        1        2  0.920947889
## 332        1        2  0.920947889
## 337        1        2  0.920905071
## 605        1        2  0.920879092
## 406        1        2  0.920875916
## 185        1        2  0.920855711
## 190        1        2  0.920855711
## 668        1        2  0.920848541
## 321        1        2  0.920796388
## 371        1        2  0.920793662
## 46         1        2  0.920755795
## 562        1        2  0.920612318
## 289        1        2  0.920515118
## 421        1        2  0.920515118
## 1516       1        2  0.920515118
## 300        1        2  0.920482980
## 267        1        2  0.920383497
## 629        1        2  0.920244766
## 1238       1        2  0.920244766
## 1446       1        2  0.920244766
## 144        1        2  0.918536144
## 305        1        2  0.918536144
## 467        1        2  0.918536144
## 646        1        2  0.918470055
## 656        1        2  0.918470055
## 850        1        2  0.918470055
## 903        1        2  0.918470055
## 930        1        2  0.918470055
## 933        1        2  0.918470055
## 934        1        2  0.918470055
## 936        1        2  0.918470055
## 937        1        2  0.918470055
## 938        1        2  0.918470055
## 942        1        2  0.918470055
## 943        1        2  0.918470055
## 950        1        2  0.918470055
## 952        1        2  0.918470055
## 954        1        2  0.918470055
## 955        1        2  0.918470055
## 956        1        2  0.918470055
## 957        1        2  0.918470055
## 959        1        2  0.918470055
## 960        1        2  0.918470055
## 961        1        2  0.918470055
## 965        1        2  0.918470055
## 966        1        2  0.918470055
## 967        1        2  0.918470055
## 968        1        2  0.918470055
## 969        1        2  0.918470055
## 970        1        2  0.918470055
## 972        1        2  0.918470055
## 973        1        2  0.918470055
## 974        1        2  0.918470055
## 975        1        2  0.918470055
## 977        1        2  0.918470055
## 978        1        2  0.918470055
## 979        1        2  0.918470055
## 980        1        2  0.918470055
## 981        1        2  0.918470055
## 982        1        2  0.918470055
## 983        1        2  0.918470055
## 984        1        2  0.918470055
## 985        1        2  0.918470055
## 987        1        2  0.918470055
## 988        1        2  0.918470055
## 989        1        2  0.918470055
## 991        1        2  0.918470055
## 992        1        2  0.918470055
## 995        1        2  0.918470055
## 996        1        2  0.918470055
## 1003       1        2  0.918470055
## 1007       1        2  0.918470055
## 1009       1        2  0.918470055
## 1012       1        2  0.918470055
## 1013       1        2  0.918470055
## 1014       1        2  0.918470055
## 1016       1        2  0.918470055
## 1018       1        2  0.918470055
## 1020       1        2  0.918470055
## 1021       1        2  0.918470055
## 1022       1        2  0.918470055
## 1023       1        2  0.918470055
## 1026       1        2  0.918470055
## 1027       1        2  0.918470055
## 1028       1        2  0.918470055
## 1029       1        2  0.918470055
## 1030       1        2  0.918470055
## 1031       1        2  0.918470055
## 1033       1        2  0.918470055
## 1034       1        2  0.918470055
## 1035       1        2  0.918470055
## 1036       1        2  0.918470055
## 1037       1        2  0.918470055
## 1039       1        2  0.918470055
## 1040       1        2  0.918470055
## 1041       1        2  0.918470055
## 1043       1        2  0.918470055
## 1045       1        2  0.918470055
## 1047       1        2  0.918470055
## 1048       1        2  0.918470055
## 1049       1        2  0.918470055
## 1051       1        2  0.918470055
## 1052       1        2  0.918470055
## 1053       1        2  0.918470055
## 1054       1        2  0.918470055
## 1055       1        2  0.918470055
## 1056       1        2  0.918470055
## 1057       1        2  0.918470055
## 1058       1        2  0.918470055
## 1059       1        2  0.918470055
## 1060       1        2  0.918470055
## 1061       1        2  0.918470055
## 1065       1        2  0.918470055
## 1066       1        2  0.918470055
## 1067       1        2  0.918470055
## 1069       1        2  0.918470055
## 1070       1        2  0.918470055
## 1072       1        2  0.918470055
## 1073       1        2  0.918470055
## 1074       1        2  0.918470055
## 1075       1        2  0.918470055
## 1076       1        2  0.918470055
## 1079       1        2  0.918470055
## 1081       1        2  0.918470055
## 1082       1        2  0.918470055
## 1083       1        2  0.918470055
## 1084       1        2  0.918470055
## 1085       1        2  0.918470055
## 1086       1        2  0.918470055
## 1087       1        2  0.918470055
## 1088       1        2  0.918470055
## 1089       1        2  0.918470055
## 1090       1        2  0.918470055
## 1091       1        2  0.918470055
## 1092       1        2  0.918470055
## 1093       1        2  0.918470055
## 1094       1        2  0.918470055
## 1095       1        2  0.918470055
## 1098       1        2  0.918470055
## 1099       1        2  0.918470055
## 1102       1        2  0.918470055
## 1104       1        2  0.918470055
## 1105       1        2  0.918470055
## 1106       1        2  0.918470055
## 1107       1        2  0.918470055
## 1109       1        2  0.918470055
## 1110       1        2  0.918470055
## 1113       1        2  0.918470055
## 1116       1        2  0.918470055
## 1117       1        2  0.918470055
## 1118       1        2  0.918470055
## 1120       1        2  0.918470055
## 1121       1        2  0.918470055
## 1122       1        2  0.918470055
## 1125       1        2  0.918470055
## 1132       1        2  0.918470055
## 1135       1        2  0.918470055
## 1136       1        2  0.918470055
## 1137       1        2  0.918470055
## 1138       1        2  0.918470055
## 1139       1        2  0.918470055
## 1140       1        2  0.918470055
## 1141       1        2  0.918470055
## 1142       1        2  0.918470055
## 1143       1        2  0.918470055
## 1146       1        2  0.918470055
## 1147       1        2  0.918470055
## 1148       1        2  0.918470055
## 1152       1        2  0.918470055
## 1153       1        2  0.918470055
## 1156       1        2  0.918470055
## 1157       1        2  0.918470055
## 1158       1        2  0.918470055
## 1159       1        2  0.918470055
## 1160       1        2  0.918470055
## 1161       1        2  0.918470055
## 1162       1        2  0.918470055
## 1164       1        2  0.918470055
## 1165       1        2  0.918470055
## 1166       1        2  0.918470055
## 1167       1        2  0.918470055
## 1168       1        2  0.918470055
## 1169       1        2  0.918470055
## 1171       1        2  0.918470055
## 1172       1        2  0.918470055
## 1173       1        2  0.918470055
## 1176       1        2  0.918470055
## 1177       1        2  0.918470055
## 1178       1        2  0.918470055
## 1179       1        2  0.918470055
## 1182       1        2  0.918470055
## 1183       1        2  0.918470055
## 1184       1        2  0.918470055
## 1186       1        2  0.918470055
## 1187       1        2  0.918470055
## 1191       1        2  0.918470055
## 1193       1        2  0.918470055
## 1194       1        2  0.918470055
## 1200       1        2  0.918470055
## 1204       1        2  0.918470055
## 1205       1        2  0.918470055
## 1206       1        2  0.918470055
## 1209       1        2  0.918470055
## 1210       1        2  0.918470055
## 1211       1        2  0.918470055
## 1212       1        2  0.918470055
## 1216       1        2  0.918470055
## 1217       1        2  0.918470055
## 1219       1        2  0.918470055
## 1220       1        2  0.918470055
## 1221       1        2  0.918470055
## 1224       1        2  0.918470055
## 1239       1        2  0.918470055
## 1242       1        2  0.918470055
## 1487       1        2  0.918431788
## 964        1        2  0.918361221
## 228        1        2  0.918252634
## 1190       1        2  0.918214506
## 1201       1        2  0.918214506
## 1215       1        2  0.918214506
## 958        1        2  0.918157145
## 1192       1        2  0.917800350
## 94         1        2  0.917699851
## 177        1        2  0.917699851
## 352        1        2  0.917699851
## 433        1        2  0.917699851
## 1498       1        2  0.917699851
## 1017       1        2  0.917544009
## 1050       1        2  0.917516512
## 240        1        2  0.917473168
## 929        1        2  0.917283846
## 1019       1        2  0.917253849
## 949        1        2  0.917030229
## 255        1        2  0.916280054
## 357        1        2  0.916280054
## 1360       1        2  0.916280054
## 1443       1        2  0.916280054
## 1044       1        2  0.916015398
## 1213       1        2  0.915814897
## 425        1        2  0.914981295
## 823        1        2  0.914981188
## 1004       1        2  0.914960272
## 1134       1        2  0.914960272
## 753        1        2  0.914862811
## 1189       1        2  0.914732877
## 529        1        2  0.913603151
## 253        1        2  0.913510775
## 1207       1        2  0.912005834
## 1001       1        2  0.911461507
## 689        1        2  0.911256990
## 867        1        2  0.910905013
## 410        1        2  0.910661600
## 1312       1        2  0.909118440
## 1024       1        2  0.908557985
## 1336       1        2  0.907531262
## 1282       1        2  0.906644817
## 1068       1        2  0.904827559
## 722        1        2  0.902985115
## 550        1        2  0.902540106
## 359        1        2  0.902373441
## 1506       1        2  0.900804631
## 1062       1        2  0.900219811
## 297        1        2  0.893577037
## 447        1        2  0.893577037
## 619        1        2  0.893577037
## 1304       1        2  0.893577037
## 1378       1        2  0.893577037
## 143        1        2  0.892082161
## 340        1        2  0.890897982
## 1144       1        2  0.890787558
## 1155       1        2  0.890787558
## 1185       1        2  0.890787558
## 706        1        2  0.888704485
## 495        1        2  0.885005574
## 1078       1        2  0.882909947
## 1174       1        2  0.882909947
## 1290       1        2  0.881708542
## 1439       1        2  0.881708542
## 209        1        2  0.880879640
## 493        1        2  0.880462255
## 1518       1        2  0.880462255
## 856        1        2  0.878345998
## 187        1        2  0.877489903
## 396        1        2  0.877489903
## 306        1        2  0.876583424
## 838        1        2  0.876109907
## 764        1        2  0.875689082
## 698        1        2  0.874480845
## 663        1        2  0.874135315
## 731        1        2  0.874135315
## 807        1        2  0.874135315
## 825        1        2  0.874135315
## 804        1        2  0.873791548
## 815        1        2  0.873355895
## 265        1        2  0.873122823
## 695        1        2  0.871654746
## 709        1        2  0.871654746
## 720        1        2  0.871654746
## 727        1        2  0.871654746
## 746        1        2  0.871654746
## 801        1        2  0.871654746
## 808        1        2  0.871654746
## 844        1        2  0.871654746
## 735        1        3  0.870660836
## 669        1        2  0.869114910
## 785        1        2  0.869114910
## 1354       1        2  0.868646565
## 761        1        3  0.867866901
## 672        1        2  0.867774239
## 662        1        2  0.867530983
## 519        1        2  0.867016778
## 1392       1        2  0.861727574
## 60         1        2  0.861256804
## 863        1        2  0.859184270
## 592        1        2  0.856959608
## 208        1        2  0.856811922
## 800        1        3  0.856360706
## 1188       1        2  0.856171753
## 682        1        2  0.855226180
## 728        1        3  0.853401254
## 748        1        2  0.849691047
## 438        1        2  0.849557091
## 1291       1        2  0.849557091
## 795        1        2  0.849332352
## 997        1        2  0.846770531
## 675        1        2  0.846294802
## 814        1        2  0.846238848
## 1064       1        2  0.846238848
## 1111       1        2  0.846238848
## 1150       1        2  0.846238848
## 573        1        2  0.845889591
## 693        1        2  0.845816716
## 1406       1        2  0.844442418
## 1154       1        2  0.842614894
## 487        1        2  0.841827119
## 507        1        2  0.841827119
## 393        1        2  0.839166131
## 1459       1        2  0.839166131
## 1499       1        2  0.839166131
## 34         1        2  0.837623564
## 758        1        2  0.837422682
## 198        1        2  0.836272495
## 857        1        2  0.836062245
## 1042       1        2  0.835583039
## 1379       1        2  0.833695118
## 1409       1        2  0.829216088
## 73         1        3  0.828567398
## 631        1        2  0.828081053
## 1333       1        2  0.828081053
## 680        1        2  0.827500262
## 1344       1        2  0.825783177
## 1308       1        2  0.825500687
## 953        1        2  0.824291647
## 1115       1        2  0.824291647
## 336        1        2  0.823506881
## 1225       1        2  0.821944925
## 1214       1        2  0.819246724
## 232        1        2  0.818120471
## 430        1        2  0.816315757
## 426        1        2  0.816315152
## 483        1        2  0.816315152
## 547        1        2  0.816315152
## 553        1        2  0.816315152
## 1345       1        2  0.816315152
## 1425       1        2  0.816315152
## 1496       1        2  0.816315152
## 598        1        2  0.813836415
## 1025       1        2  0.812247604
## 1038       1        2  0.812247604
## 1227       1        2  0.812247604
## 724        1        2  0.806607366
## 382        1        2  0.806255264
## 461        1        2  0.803679807
## 512        1        2  0.803679807
## 442        1        2  0.797115351
## 1063       1        2  0.796752566
## 404        1        2  0.793774784
## 179        1        2  0.790391799
## 281        1        2  0.790391799
## 298        1        2  0.790391799
## 416        1        2  0.790391799
## 551        1        2  0.790391799
## 780        1        2  0.790391799
## 1346       1        2  0.790391799
## 1492       1        2  0.790391799
## 1494       1        2  0.790391799
## 1520       1        2  0.790391799
## 1246       1        2  0.787468369
## 976        1        2  0.785826481
## 1032       1        2  0.785826481
## 816        1        2  0.785476218
## 841        1        2  0.783006957
## 464        1        2  0.781483632
## 1218       1        2  0.778711445
## 454        1        2  0.776124986
## 678        1        2  0.776124986
## 1519       1        2  0.776124986
## 1237       1        2  0.775321580
## 810        1        3  0.772737104
## 606        1        3  0.772631756
## 1114       1        2  0.771387021
## 1181       1        2  0.771387021
## 249        1        2  0.768703136
## 499        1        2  0.768703136
## 813        1        2  0.764555555
## 195        1        2  0.761098042
## 263        1        2  0.761098042
## 763        1        2  0.761098042
## 741        1        2  0.757480617
## 817        1        2  0.756665577
## 1124       1        2  0.756115212
## 314        1        2  0.750125732
## 1526       1        2  0.749328922
## 52         1        2  0.745313036
## 184        1        2  0.743692351
## 1455       1        2  0.743692351
## 218        1        2  0.742287224
## 133        1        2  0.741730586
## 618        1        3  0.740977119
## 1180       1        2  0.740054162
## 1381       1        2  0.737096808
## 591        1        2  0.733150195
## 1389       1        2  0.731219049
## 1203       1        2  0.723164729
## 261        1        2  0.720050654
## 1133       1        2  0.716161446
## 1151       1        2  0.714385152
## 182        1        2  0.711246149
## 234        1        2  0.711246149
## 386        1        2  0.711246149
## 500        1        2  0.711246149
## 1271       1        2  0.711246149
## 1277       1        2  0.711246149
## 1328       1        2  0.711246149
## 1350       1        2  0.711246149
## 1451       1        2  0.711246149
## 1476       1        2  0.711246149
## 365        1        2  0.706684570
## 1470       1        2  0.705350422
## 279        1        2  0.700209160
## 1046       1        2  0.696068697
## 45         1        2  0.692683100
## 448        1        2  0.692683100
## 560        1        2  0.692683100
## 611        1        2  0.692683100
## 1306       1        2  0.692683100
## 1404       1        2  0.692683100
## 153        1        3  0.690344440
## 288        1        3  0.690344440
## 316        1        3  0.690344440
## 647        1        3  0.690344440
## 726        1        3  0.690344440
## 1123       1        2  0.686539409
## 1199       1        2  0.685392325
## 358        1        2  0.682991796
## 1119       1        2  0.676748560
## 363        1        2  0.673089029
## 1448       1        2  0.657482820
## 1015       1        2  0.656587915
## 586        1        2  0.654314866
## 231        1        2  0.652646280
## 254        1        2  0.650697560
## 362        1        2  0.642073088
## 1422       1        2  0.642073088
## 620        1        3  0.641252629
## 506        1        2  0.639926051
## 565        1        2  0.631949148
## 409        1        2  0.631237416
## 871        1        2  0.617169076
## 1145       1        2  0.612998850
## 812        1        2  0.612916273
## 22         1        2  0.608833321
## 103        1        2  0.608833321
## 160        1        2  0.608833321
## 294        1        2  0.608833321
## 313        1        2  0.608833321
## 417        1        2  0.608833321
## 1080       1        2  0.607168880
## 1288       1        2  0.605822745
## 1071       1        2  0.601486629
## 1103       1        2  0.601486629
## 986        1        2  0.594425100
## 912        1        3  0.586580198
## 1313       1        2  0.582813574
## 546        1        2  0.567356228
## 538        1        2  0.560614663
## 607        1        2  0.560614663
## 318        1        3  0.558027923
## 138        1        2  0.555556126
## 940        1        3  0.552296843
## 1442       1        2  0.547879751
## 1170       1        2  0.547589562
## 413        1        2  0.534858333
## 1437       1        2  0.534858333
## 788        1        3  0.534762641
## 1175       1        2  0.526405833
## 239        1        3  0.519087957
## 139        1        3  0.518076313
## 514        1        2  0.514621240
## 510        1        2  0.508735168
## 787        1        3  0.487149961
## 791        1        2  0.484374161
## 331        1        2  0.484079010
## 361        1        2  0.479778283
## 475        1        2  0.479778283
## 524        1        2  0.479778283
## 790        1        2  0.479778283
## 1420       1        2  0.479778283
## 1423       1        2  0.479778283
## 1463       1        2  0.479778283
## 1532       1        2  0.479778283
## 1149       1        2  0.476194351
## 98         1        3  0.472638120
## 826        1        3  0.472638120
## 922        1        2  0.470342667
## 971        1        2  0.470342667
## 1385       1        2  0.465066709
## 258        1        2  0.463576387
## 53         1        2  0.452661808
## 1479       1        2  0.442335631
## 622        1        2  0.433957493
## 766        1        3  0.418513503
## 100        1        2  0.410210216
## 1112       1        2  0.402006859
## 420        1        3  0.398693749
## 167        1        2  0.392432915
## 23         1        3  0.389288248
## 545        1        2  0.386207401
## 338        1        3  0.363162130
## 122        1        3  0.353654765
## 577        1        2  0.352107311
## 1289       1        2  0.331993847
## 892        1        3  0.329247818
## 1233       1        2  0.316457703
## 1521       1        2  0.316457703
## 439        1        2  0.310840550
## 215        1        3  0.297116286
## 946        1        3  0.297116286
## 428        1        3  0.271320484
## 1222       1        2  0.266980368
## 798        1        3  0.236420278
## 444        1        3  0.214627815
## 743        1        3  0.204552441
## 161        1        3  0.201786614
## 283        1        3  0.201786614
## 243        1        3  0.193284500
## 771        1        3  0.192574890
## 490        1        3  0.175135914
## 866        1        3  0.128504482
## 1486       2        1  0.668102150
## 1474       2        1  0.667984234
## 594        2        1  0.667948707
## 152        2        1  0.667762191
## 345        2        1  0.667762191
## 11         2        1  0.667681311
## 1478       2        1  0.667175465
## 1523       2        1  0.666924486
## 505        2        1  0.666620495
## 189        2        1  0.666111343
## 1351       2        1  0.665575896
## 466        2        1  0.663615752
## 1208       2        1  0.663587862
## 548        2        1  0.663140179
## 632        2        1  0.662418175
## 394        2        1  0.659040431
## 387        2        1  0.658427164
## 1330       2        1  0.658427164
## 1388       2        1  0.658427164
## 412        2        1  0.658293379
## 55         2        1  0.657987449
## 696        2        1  0.657243626
## 423        2        1  0.656714813
## 610        2        1  0.656714813
## 259        2        1  0.655186269
## 453        2        1  0.652649593
## 56         2        1  0.651902261
## 660        2        1  0.649842906
## 1438       2        1  0.647825396
## 408        2        1  0.647211591
## 755        2        1  0.646160064
## 599        2        1  0.645994424
## 590        2        1  0.643531462
## 658        2        1  0.643531462
## 700        2        1  0.641494364
## 783        2        1  0.641211389
## 580        2        1  0.640326628
## 121        2        1  0.638510670
## 1286       2        1  0.638510670
## 848        2        1  0.638458326
## 690        2        1  0.638117255
## 865        2        1  0.635408475
## 183        2        1  0.633884736
## 834        2        1  0.632881554
## 625        2        1  0.631586736
## 223        2        1  0.630902547
## 219        2        1  0.626411046
## 601        2        1  0.625639029
## 356        2        1  0.623840595
## 595        2        1  0.621779648
## 1382       2        1  0.619696613
## 95         2        1  0.618839703
## 135        2        1  0.616999654
## 118        2        1  0.612498569
## 451        2        1  0.612003500
## 616        2        1  0.610230422
## 41         2        1  0.604793658
## 237        2        1  0.604793658
## 1466       2        1  0.604793658
## 200        2        1  0.601149071
## 391        2        1  0.601149071
## 520        2        1  0.601149071
## 346        2        1  0.599892412
## 63         2        1  0.597720676
## 108        2        1  0.596124740
## 125        2        1  0.593934227
## 402        2        1  0.583940744
## 378        2        1  0.580454387
## 786        2        1  0.578105175
## 463        2        1  0.571912845
## 268        2        1  0.561415003
## 236        2        1  0.557679008
## 1515       2        1  0.557679008
## 470        2        1  0.555451714
## 96         2        1  0.550843448
## 1077       2        1  0.537913474
## 759        2        1  0.533719893
## 449        2        1  0.528588534
## 132        2        1  0.508616404
## 225        2        1  0.506398416
## 436        2        1  0.491319567
## 641        2        1  0.480159278
## 835        2        3  0.478804207
## 75         2        1  0.475359665
## 703        2        1  0.475359665
## 642        2        3  0.435779507
## 1101       2        1  0.408641386
## 1413       2        1  0.402130442
## 1418       2        1  0.402130442
## 1457       2        1  0.402130442
## 43         2        3  0.384552596
## 1130       2        1  0.365673615
## 432        2        1  0.358272217
## 1416       2        1  0.334363233
## 145        2        1  0.318997090
## 110        2        1  0.314052849
## 1307       2        1  0.314052849
## 1274       2        1  0.308665603
## 944        2        1  0.289240695
## 1202       2        1  0.289240695
## 273        2        1  0.280521591
## 327        2        1  0.280521591
## 1292       2        1  0.265533448
## 90         2        1  0.263839129
## 284        2        3  0.254343188
## 68         2        3  0.250715763
## 1421       2        1  0.249825848
## 77         2        3  0.241461598
## 235        2        3  0.166585300
## 376        2        1  0.158475017
## 1108       2        1  0.156815637
## 476        2        3  0.153145554
## 664        2        1  0.146795463
## 88         2        1  0.146020658
## 304        2        3  0.124174925
## 650        2        1  0.123411577
## 238        2        3  0.111953990
## 1331       2        1  0.105891318
## 1396       2        1  0.105891318
## 375        2        3  0.100833568
## 131        2        1  0.061389097
## 147        2        1  0.018553781
## 468        2        1  0.018553781
## 128        2        1  0.015941494
## 828        2        1 -0.035222582
## 1228       2        1 -0.075115953
## 1342       2        1 -0.075115953
## 1504       2        1 -0.093369011
## 1223       2        1 -0.106670194
## 1411       2        1 -0.120385712
## 855        2        1 -0.146580258
## 472        2        1 -0.157507214
## 604        2        1 -0.206197894
## 904        3        1  0.682511186
## 19         3        1  0.680621532
## 881        3        1  0.680477098
## 213        3        1  0.679519303
## 377        3        1  0.679519303
## 414        3        1  0.679519303
## 721        3        1  0.679519303
## 939        3        1  0.679519303
## 57         3        1  0.679456987
## 831        3        1  0.679435922
## 1262       3        1  0.679321469
## 584        3        1  0.679174776
## 1440       3        1  0.678988568
## 278        3        1  0.678539050
## 921        3        1  0.678319488
## 12         3        1  0.677254281
## 20         3        1  0.677254281
## 61         3        1  0.677254281
## 309        3        1  0.677254281
## 351        3        1  0.677254281
## 579        3        1  0.677254281
## 684        3        1  0.677254281
## 768        3        1  0.677254281
## 919        3        1  0.677254281
## 931        3        1  0.677254281
## 1505       3        1  0.677254281
## 836        3        1  0.677021979
## 123        3        1  0.675173696
## 360        3        1  0.675173696
## 840        3        1  0.675173696
## 918        3        1  0.675173696
## 1386       3        1  0.672768086
## 30         3        1  0.672086408
## 149        3        1  0.670549420
## 49         3        1  0.669728121
## 634        3        1  0.667992768
## 916        3        1  0.667190559
## 896        3        1  0.667093458
## 398        3        1  0.666890069
## 489        3        1  0.666890069
## 1131       3        1  0.666890069
## 217        3        1  0.666623448
## 312        3        1  0.666623448
## 648        3        1  0.665509272
## 158        3        1  0.664845251
## 192        3        1  0.664845251
## 1278       3        1  0.664845251
## 81         3        1  0.662099347
## 480        3        1  0.662099347
## 1011       3        1  0.662099347
## 884        3        1  0.661234827
## 681        3        1  0.660293290
## 197        3        1  0.656224452
## 1517       3        1  0.653793954
## 1297       3        1  0.652955712
## 82         3        1  0.651674305
## 1128       3        1  0.648524988
## 130        3        1  0.648029236
## 614        3        1  0.646589806
## 861        3        1  0.646419135
## 883        3        1  0.644778776
## 1008       3        1  0.644778776
## 924        3        1  0.643658448
## 515        3        1  0.643609384
## 1240       3        1  0.643257729
## 740        3        1  0.642493470
## 1232       3        1  0.638721573
## 691        3        1  0.638020895
## 941        3        1  0.638020895
## 1436       3        1  0.635101862
## 1283       3        1  0.634854638
## 951        3        1  0.631637961
## 885        3        1  0.630921176
## 400        3        1  0.630147000
## 229        3        1  0.629126476
## 113        3        1  0.629029050
## 250        3        1  0.629029050
## 917        3        1  0.629029050
## 1370       3        1  0.629029050
## 1005       3        1  0.628192199
## 713        3        1  0.618766140
## 704        3        1  0.617918579
## 1525       3        1  0.615788545
## 913        3        1  0.613400312
## 715        3        1  0.608877858
## 911        3        1  0.608054650
## 207        3        1  0.606720890
## 440        3        1  0.606720890
## 945        3        1  0.606720890
## 1369       3        1  0.606720890
## 993        3        1  0.599978122
## 999        3        1  0.599978122
## 1285       3        1  0.599978122
## 1323       3        1  0.599978122
## 1375       3        1  0.599978122
## 1010       3        1  0.593667744
## 1524       3        1  0.591129741
## 127        3        2  0.579445106
## 609        3        2  0.552402023
## 1318       3        1  0.548341341
## 381        3        1  0.542520967
## 723        3        1  0.540917854
## 736        3        1  0.540917854
## 845        3        1  0.540917854
## 566        3        1  0.506383423
## 596        3        1  0.506383423
## 286        3        1  0.505333019
## 644        3        1  0.500067918
## 176        3        2  0.496948133
## 544        3        2  0.493264279
## 1387       3        1  0.479589580
## 260        3        1  0.474038597
## 935        3        2  0.471179431
## 927        3        1  0.470911777
## 1480       3        1  0.470911777
## 712        3        1  0.462240852
## 1255       3        1  0.462240852
## 1391       3        1  0.455007065
## 244        3        1  0.449288551
## 58         3        2  0.425312549
## 530        3        1  0.420281305
## 1475       3        2  0.415641637
## 649        3        1  0.413598817
## 1467       3        1  0.391113765
## 290        3        1  0.387000992
## 275        3        2  0.383840360
## 248        3        2  0.379201444
## 653        3        2  0.369786569
## 1430       3        1  0.368346352
## 109        3        1  0.358275617
## 471        3        1  0.358275617
## 806        3        1  0.322428850
## 557        3        2  0.322375320
## 282        3        1  0.321927843
## 320        3        1  0.321927843
## 51         3        2  0.279228012
## 1293       3        1  0.272888608
## 353        3        2  0.249683581
## 697        3        1  0.247056713
## 832        3        2  0.241100385
## 876        3        1  0.237745040
## 1256       3        1  0.223464684
## 66         3        1  0.220151949
## 407        3        1  0.218551841
## 718        3        2  0.202721533
## 62         3        1  0.190405851
## 747        3        2  0.174079562
## 1380       3        1  0.159334685
## 564        3        1  0.151212069
## 770        3        2  0.149252124
## 639        3        2  0.137520154
## 869        3        2  0.135243260
## 212        3        2  0.126102548
## 180        3        2  0.124830609
## 683        3        1  0.120773937
## 1398       3        2  0.119018615
## 797        3        1  0.109144202
## 1198       3        2  0.102683383
## 16         3        2  0.085827647
## 638        3        2  0.085827647
## 674        3        1  0.079030300
## 654        3        1  0.074361079
## 148        3        2  0.066013410
## 1513       3        1  0.064579384
## 928        3        1  0.059468025
## 708        3        1  0.051644627
## 369        3        1  0.048745865
## 511        3        1  0.048745865
## 627        3        1  0.048745865
## 686        3        1  0.048745865
## 851        3        1  0.048745865
## 1243       3        1  0.048745865
## 1493       3        1  0.048745865
## 221        3        1 -0.002925266
## 
## 1035 dissimilarities, summarized :
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.1813  0.6511  1.2836  2.5109  4.4639 
## Metric :  euclidean 
## Number of objects : 46
## 
## Available components:
##  [1] "sample"     "medoids"    "i.med"      "clustering" "objective" 
##  [6] "clusinfo"   "diss"       "call"       "silinfo"    "data"      
## [11] "clust_plot" "nbclust"
# Visualize the clustering results
fviz_cluster(clara_flex)

# Visualize the silhouette plot
fviz_silhouette(clara_flex)
##   cluster size ave.sil.width
## 1       1  901          0.85
## 2       2  133          0.45
## 3       3  174          0.49

library(factoextra)

get_clust_tendency(Clustering_Raised_Total_norm, 2, graph=TRUE, gradient=list(low="blue",  high="white"), seed=1234)
## $hopkins_stat
## [1] 0.989801
## 
## $plot

f1 <- fviz_nbclust(Clustering_Raised_Total_norm, FUNcluster = kmeans, method = "silhouette") + 
  ggtitle("Optimal number of clusters \n K-means")
f2 <- fviz_nbclust(Clustering_Raised_Total_norm, FUNcluster = cluster::pam, method = "silhouette") + 
  ggtitle("Optimal number of clusters \n PAM")

grid.arrange(f1, f2, ncol=2)

km3 <- eclust(Clustering_Raised_Total_norm, k=3 , FUNcluster="kmeans", hc_metric="euclidean", graph=F)

c2 <- fviz_cluster(km3, data=Clustering_Raised_Total_norm, elipse.type="convex", geom=c("point")) + ggtitle("K-means with 3 clusters")
s2 <- fviz_silhouette(km3)
##   cluster size ave.sil.width
## 1       1  174          0.49
## 2       2  122          0.50
## 3       3  912          0.84
grid.arrange(c2, s2, ncol=2)

Money_Q1 <- quantile(Raised_Money$Money.Raised.Currency..in.USD., 0.25)
Money_Q3 <- quantile(Raised_Money$Money.Raised.Currency..in.USD., 0.75)
Money_IQR <- Money_Q3 - Money_Q1
Money_lower <- Money_Q1 - 1.5 * Money_IQR
Money_upper <- Money_Q3 + 1.5 * Money_IQR

Total_Q1 <- quantile(Raised_Money$Total.Funding.Amount.Currency..in.USD., 0.25)
Total_Q3 <- quantile(Raised_Money$Total.Funding.Amount.Currency..in.USD., 0.75)
Total_IQR <- Total_Q3 - Total_Q1
Total_lower <- Total_Q1 - 1.5 * Total_IQR
Total_upper <- Total_Q3 + 1.5 * Total_IQR

# Remove outliers
Raised_Money_Out_of_Outliers <- subset(Raised_Money, 
                       Raised_Money$Money.Raised.Currency..in.USD. >= Money_lower &
                       Raised_Money$Money.Raised.Currency..in.USD. <= Money_upper &
                       Raised_Money$Total.Funding.Amount.Currency..in.USD. >= Total_lower &
                       Raised_Money$Total.Funding.Amount.Currency..in.USD. <= Total_upper)

table(Raised_Money_Out_of_Outliers$Country, km3$cluster)
##                 
##                    1   2   3
##   Argentina        1   0   1
##   Australia        0   0   4
##   Bangladesh       0   0   1
##   Brazil           0   0   1
##   Canada          11   2  35
##   Chile            0   0   1
##   China            2   0   8
##   Colombia         1   1   4
##   Czech Republic   0   0   1
##   Denmark          1   1   2
##   Ecuador          0   0   1
##   Egypt            0   0   3
##   Estonia          0   1   0
##   Finland          0   0   1
##   France           0   0   9
##   Germany          1   0   3
##   Ghana            0   0   1
##   Hong Kong        0   0   3
##   Iceland          0   0   1
##   India            3   3  22
##   Indonesia        2   1   4
##   Iraq             0   0   1
##   Ireland          1   0   0
##   Israel           0   0   3
##   Malaysia         0   1   0
##   Mexico           1   1   5
##   Morocco          0   0   1
##   Nigeria          2   2   7
##   Panama           0   0   1
##   Peru             0   0   2
##   Poland           0   0   1
##   Puerto Rico      0   0   1
##   Singapore        1   2   6
##   Slovenia         0   0   2
##   South Africa     0   0   1
##   South Korea      0   0   1
##   Sweden           0   0   1
##   Switzerland      0   0   1
##   Tanzania         0   0   1
##   United Kingdom   3   4  24
##   United States  144 103 734
##   Uruguay          0   0   1
table(Raised_Money_Out_of_Outliers$Continent, km3$cluster)
##                
##                   1   2   3
##   Africa          2   2  14
##   Asia            8   7  49
##   Europe          6   6  46
##   North America 156 106 776
##   Oceania         0   0   4
##   South America   2   1  11
Raised_Money_Out_of_Outliers$Year <- format(as.Date(Raised_Money_Out_of_Outliers$Announced.Date, "%Y-%m-%d"), "%Y")

# Create a contingency table
table(Raised_Money_Out_of_Outliers$Year, km3$cluster)
##       
##          1   2   3
##   2005   0   0   1
##   2006   0   0   1
##   2007   0   0  11
##   2008   0   1   6
##   2009   0   4   7
##   2010   2   4  10
##   2011   7   2   9
##   2012  17   1  11
##   2013  10   6  42
##   2014  22  22 100
##   2015  14  16 100
##   2016  21  28 107
##   2017  29  19 116
##   2018  25  12 132
##   2019  27   7 259