Companies House Charts (Day 4 of 5)

My exploratory data analysis of Companies House data in July 2020:

Length of company name

by year of incorporation



Next the limitations:

  • Only the latest name is plotted, not any previous names


Code snippet:

#get labels for bubble of interest
data <- data %>%
mutate(
  CompanyName_length = str_length(CompanyName),
  IncorporationDate_jul = as_date(IncorporationDate_ymd)
) %>%
mutate(
  label_text = str_glue("{CompanyName}")
) %>%
select(-CompanyName,-IncorporationDate_ymd)

bubble1 <- data %>%
filter(
  CompanyName_length > 60,
  IncorporationDate_jul > ymd("2000-01-01"),
  IncorporationDate_jul < ymd("2010-01-01")
) %>% 
pull(CompanyNumber) %>%
sample(5)

#exploratory method, could be faster:)
data[!data$CompanyNumber %in% bubble1,"label_text"] <- ""