library(tidyverse) # package for data cleaning and plotting
library(kableExtra) # formatting tables

Derive the CQC CIC list

I use the full cqc data set instead of the sampled and coded data set to derive the list of CICs that has cqc rating data. The total counts is 57. The count of CICs in the sample is 37

#import the raw data file
cqc_raw <- read_csv("data/cqc_full.csv")
# select relevant column, rename and relabel 
cqc_list <- cqc_raw %>% 
  rename(location_type = `Location Type...5`) %>% 
  filter(location_type == "Social Care Org") %>% 
  select(provider_name = `Provider Name`) %>% 
  group_by(provider_name) %>% 
  slice(1) %>% 
  mutate(cqc = "cqc") %>% 
  ungroup()

# store the list of targeted CIC terms
cic_text <-c("CIC", "C.I.C", "C.I.C.", "Community Interest Company")

# reform the list to feed the string detect command
cic_text_collapsed <- paste0(cic_text, collapse = "|")

# filter out cases that have any form of CIC indication in their legal names
cic_cqc_list <- cqc_list %>% 
  filter(str_detect(provider_name, cic_text_collapsed)) %>% 
# change to upper case to be consistent with company house
  mutate(legal_name = str_to_upper(provider_name, locale = "en")) %>% 
  select(- provider_name)

nrow(cic_cqc_list)
## [1] 57
head(cic_cqc_list)
## # A tibble: 6 x 2
##   cqc   legal_name                                       
##   <chr> <chr>                                            
## 1 cqc   ACHIEVING FOR CHILDREN COMMUNITY INTEREST COMPANY
## 2 cqc   ACUTE NEED CIC                                   
## 3 cqc   ALL SEASONS COMMUNITY SUPPORT CIC                
## 4 cqc   ANGELS COMMUNITY ENTERPRISES C.I.C.              
## 5 cqc   ANNIE'S HEALTHCARE SERVICES C.I.C.               
## 6 cqc   ASPIRE: FOR INTELLIGENT CARE AND SUPPORT C.I.C

Derive the company house list

Combining the three company house categories, there are altogether 547 CICs registered with the Company House of England Wales (Is the geographic scope broader than the scope of CQC?)

#import data
companyhouse1 <- read_csv("data/Companies-House-87100.csv") %>% 
  filter(company_status == "Active")
companyhouse2 <- read_csv("data/Companies-House-88100.csv") %>% 
  filter(company_status == "Active")
companyhouse3 <- read_csv("data/Companies-House-87300.csv") %>% 
  filter(company_status == "Active")
# merge the three SICs and drop overlaped ones 

cic_house_list <- bind_rows(companyhouse1, companyhouse2, companyhouse3) %>% 
  group_by(company_name) %>% 
  slice(1) %>% 
  ungroup() %>% 
  select(legal_name = company_name) %>% 
  mutate(companyhouse = "house")

nrow(cic_house_list)
## [1] 547
head(cic_house_list)
## # A tibble: 6 x 2
##   legal_name                                                 companyhouse
##   <chr>                                                      <chr>       
## 1 1 CALL CARE C.I.C.                                         house       
## 2 2.ENABLE.U COMMUNITY INTEREST COMPANY                      house       
## 3 A HELPING HAND HOME CARE AGENCY COMMUNITY INTEREST COMPANY house       
## 4 A2NDVOICE CIC                                              house       
## 5 AB AUTISM SUPPORT & EMPOWERMENT CIC                        house       
## 6 ABATONI COMMUNITY INTEREST COMPANY                         house

Merge the two data sets

cic_merged <- cic_cqc_list %>% 
  full_join(cic_house_list, by = "legal_name")

head(cic_merged, 10)
## # A tibble: 10 x 3
##    cqc   legal_name                                        companyhouse
##    <chr> <chr>                                             <chr>       
##  1 cqc   ACHIEVING FOR CHILDREN COMMUNITY INTEREST COMPANY <NA>        
##  2 cqc   ACUTE NEED CIC                                    <NA>        
##  3 cqc   ALL SEASONS COMMUNITY SUPPORT CIC                 <NA>        
##  4 cqc   ANGELS COMMUNITY ENTERPRISES C.I.C.               <NA>        
##  5 cqc   ANNIE'S HEALTHCARE SERVICES C.I.C.                house       
##  6 cqc   ASPIRE: FOR INTELLIGENT CARE AND SUPPORT C.I.C    <NA>        
##  7 cqc   CARE SOLUTION BUREAU CIC                          <NA>        
##  8 cqc   CARERS BREAK COMMUNITY INTEREST COMPANY           <NA>        
##  9 cqc   CARERS FORWARD C.I.C.                             <NA>        
## 10 cqc   CATALYST CHOICES COMMUNITY INTEREST COMPANY       house

It seems only a small fraction of the two lists overlap. For example, searching “ANNIE’S HEALTHCARE SERVICES C.I.C.”, the result shows it is registered with the Company House, but the SIC is not related to elderly care. https://find-and-update.company-information.service.gov.uk/company/05535051 So it comes back to the question that, how many providers in the CQC data directly work on caring for the elderly.

Derive the individual or partnership

#import the raw data file
socialcare_raw <- read_csv("data/socialcare.csv")
#filter out locations coded as small businesses
small_socialcare <- socialcare_raw %>% 
  filter(legal_form == 5)  %>% 
#select just the column of provider name
  select(provider_name = `Provider Name`) %>% 
  group_by(provider_name) %>% 
# keep just 1 of the repeated provider names 
  slice(1) %>% 
# generate a new column indicating these are individuals and partnerships
  mutate(small = "Individuals and Partnerships") %>% 
  ungroup()
# check number of rolls
nrow(small_socialcare)
## [1] 798
# preview first several rows of the dataframe derived
head(small_socialcare)
## # A tibble: 6 x 2
##   provider_name            small                       
##   <chr>                    <chr>                       
## 1 142 Petts Hill Care Home Individuals and Partnerships
## 2 A & D Rhoden             Individuals and Partnerships
## 3 A Cox and Mrs Z Cox      Individuals and Partnerships
## 4 A F Ebrahimjee           Individuals and Partnerships
## 5 A Mungur                 Individuals and Partnerships
## 6 A. Welcome House Limited Individuals and Partnerships