R Markdown

This is a dataset from Y Combinator. Columns: name: Name of the company. vertical: Business Field. (B2B,Fintech,Dev Tools, etc.) year: Company’s foundation year. batch: The year company selected for Y Combinator url: Homepage of the company description: The vision of the company.

library(dplyr)
## Warning: package 'dplyr' was built under R version 3.4.2
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
library(data.table)
## Warning: package 'data.table' was built under R version 3.4.2
## 
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
## 
##     between, first, last
comp<-fread("~/Documents/companies/companies.csv", header = TRUE , sep = ",")
comp$vertical <- factor(comp$vertical)
levels(comp$vertical)[1] <- "Other"
comp$vertical <- factor(comp$vertical)

glimpse(comp)
## Observations: 883
## Variables: 6
## $ name        <chr> "Clickfacts", "Kiko", "Loopt", "Parakey", "Reddit"...
## $ vertical    <fctr> B2B, Consumer, Enterprise, Consumer, Consumer, Fi...
## $ year        <int> 2005, 2005, 2005, 2005, 2005, 2005, 2006, 2006, 20...
## $ batch       <chr> "s2005", "s2005", "s2005", "s2005", "s2005", "s200...
## $ url         <chr> "http://clickfacts.com", "http://kiko.com", "http:...
## $ description <chr> "", "We're the best online calendar solution to ev...
select_verticle <- comp %>%
              group_by(vertical) %>%
              summarise(V=n())

p1<- ggplot(select_verticle,aes(vertical,V,fill=V))+
        geom_bar(stat = "identity") +
        scale_fill_gradient( low = "coral",  high = "green") +
        theme(axis.text.x = element_text(angle = 45,hjust = 1))+
        xlab("Vertical")+
        ylab("Number")+
        ggtitle("Type of companies")

select_year <- comp %>%
  group_by(year) %>%
  summarise(Y=n())

p2 <- ggplot(select_year,aes(year,Y,fill=Y))+
  geom_bar(stat = "identity") +
  scale_fill_gradient( low = "yellow",  high = "red") +
  theme(axis.text.x = element_text(angle = 45,hjust = 1))+
  xlab("Vertical")+ylab("Number")+
  ggtitle("Number of companies by Year")
select_year_vertical <- comp %>%
  group_by(year,vertical) %>%
  summarise(YV=n())

p3 <- ggplot(select_year_vertical,aes(year,YV,fill=YV))+
  geom_bar(stat = "identity") +
  facet_wrap(~vertical)+
  theme(axis.text.x = element_text(angle = 45,hjust = 1))+
  xlab("Vertical")+ylab("Number")+
  ggtitle("Number of companies by Sector and Year")

Including Plots

## Observations: 883
## Variables: 6
## $ name        <chr> "Clickfacts", "Kiko", "Loopt", "Parakey", "Reddit"...
## $ vertical    <fctr> B2B, Consumer, Enterprise, Consumer, Consumer, Fi...
## $ year        <int> 2005, 2005, 2005, 2005, 2005, 2005, 2006, 2006, 20...
## $ batch       <chr> "s2005", "s2005", "s2005", "s2005", "s2005", "s200...
## $ url         <chr> "http://clickfacts.com", "http://kiko.com", "http:...
## $ description <chr> "", "We're the best online calendar solution to ev...