Report.Rmd 1.69 KB
Newer Older
Я's avatar
Я committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
---
title: "The analysis of AI companies market"
output: html_notebook
---

# About the project

Here is the results of analysis database of **7,920** companies working on AI market.

# Research questions

## Q1: What is a distribution of AI companies by countries ?

```{r echo=FALSE, warning=FALSE, message=FALSE}
library(feather)
library(ggplot2)
library(dplyr)

# 1. Read data
df <- read_feather("data/wp_esi_entity")
```

```{r echo=FALSE}
# Countries with more than 100 startups
df %>% 
  group_by(country) %>% 
  summarise(sum = n()) %>% 
  arrange(-sum) %>% 
  mutate(country = ifelse(country=="", "NA", country)) %>% 
  filter(sum > 100) %>% 
  ggplot(aes(reorder(country, sum), sum)) +
  ggtitle("Countries with more than 100 startups") +
  ylab("Number of startups") +
  xlab("Countries") +
  geom_bar(stat="identity") +
  theme_bw() +
  coord_flip()
```


```{r echo=FALSE}
# Countries with 10-100 startups
df %>% 
  group_by(country) %>% 
  summarise(sum = n()) %>% 
  arrange(-sum) %>% 
  mutate(country = ifelse(country=="", "NA", country)) %>% 
  filter(sum %in% 10:100) %>% 
  ggplot(aes(reorder(country, sum), sum)) +
  ggtitle("Countries with 10-100 startups") +
  xlab("Countries") +
  ylab("Number of startups") +
  geom_bar(stat="identity") +
  theme_bw() +
  coord_flip()
```

```{r echo=FALSE}
# Countries with 1-10 startups
df %>% 
  group_by(country) %>% 
  summarise(sum = n()) %>% 
  arrange(-sum) %>% 
  mutate(country = ifelse(country=="", "NA", country)) %>% 
  filter(sum %in% 1:10) %>% 
  ggplot(aes(reorder(country, sum), sum)) +
  ggtitle("Countries with 1-10 startups") +
  xlab("Countries") +
  ylab("Number of startups") +  
  geom_bar(stat="identity") +
  theme_bw() +
  coord_flip()
```