I have a large data set (17.000 cases) with 9.000 distinct company names. However, most of the names are duplicates/misspellings.
Is there a way to identify the duplicates/misspellings by an algorithm?
At the moment I use grepl
to identify the duplicates. Like:
dat %>%
select(Company) %>%
filter(grepl("g&s|g & s", ignore.case = T, Company)) %>%
distinct()
# A tibble: 15 x 1
Company
<chr>
1 das projekt Projektmanagement, Consulting & Services GmbH
2 G&S Vastgoed
3 G&S Bouw
5 G&S
6 G&S Hotelbetriebs GmbH
7 BCadvies - G&S
8 G&s Bouw
9 G&S bouw
After that, I standardize the names like:
dat = dat %>%
mutate(Company = ifelse(grepl("g&s|g & s", ignore.case = T, Company), "G & S", Company))