Take Home Exercise 3

Instruction on Take Home Exercise 3

Data preparation

load libraries.

pacman::p_load(jsonlite, tidygraph, ggraph, igraph,
               visNetwork, graphlayouts, ggforce, 
               skimr, tidytext, tidyverse, widyr, kableExtra, RColorBrewer)

Read MC3 data from Json file.

mc3_data <- fromJSON("data/MC3/MC3.json")

Extracting edges

mc3_edges <- as_tibble(mc3_data$links) %>% 
  distinct() %>%
  mutate(source = as.character(source),
         target = as.character(target),
         type = as.character(type)) %>%
  group_by(source, target, type) %>%
    summarise(weights = n()) %>%
  filter(source!=target) %>%
  ungroup()

Extracting nodes. “product_services” column value with “character(0)” are replaced with “unknown”. “revenue_omu” with NA are replace with numerical value of ‘0’

mc3_nodes <- as_tibble(mc3_data$nodes) %>%
  mutate(country = as.character(country),
         id = as.character(id),
         product_services = ifelse(product_services == "character(0)", "unknown", as.character(product_services)),
         revenue_omu = coalesce(as.numeric(as.character(revenue_omu)), 0),
         type = as.character(type)) %>%
  select(id, country, type, revenue_omu, product_services)

Initial Network Visualisation

Show the code
id1 <- mc3_edges %>%
  select(source) %>%
  rename(id = source)
id2 <- mc3_edges %>%
  select(target) %>%
  rename(id = target)
mc3_nodes1 <- rbind(id1, id2) %>%
  distinct() %>%
  left_join(mc3_nodes,
            unmatched = "drop")

mc3_graph <- tbl_graph(nodes = mc3_nodes1,
                       edges = mc3_edges,
                       directed = FALSE) %>%
  mutate(betweenness_centrality = centrality_betweenness(),
         closeness_centrality = centrality_closeness())

mc3_graph %>%
  filter(betweenness_centrality >= 100000) %>%
ggraph(layout = "fr") +
  geom_edge_link(aes(alpha=0.5)) +
  geom_node_point(aes(
    size = betweenness_centrality,
    colors = "lightblue",
    alpha = 0.5)) +
  scale_size_continuous(range=c(1,10))+
  theme_graph()

Pairwise_similarity on product_services (business)

Tokenisation to product and services of each business.Regroup back after clean up at token level and assign a code ‘biz_code’ to every distinct services. Total nodes after clean up = 3894 (org_id_code)

#Original id, service and code 3894 (un group)
org_id_code <- mc3_nodes %>%
  rename(company = id, business = product_services) %>%
  unnest_tokens(word, business) %>%
  anti_join(stop_words, by = "word") %>%
  filter(word != 'unknown', word != 'related',word != 'products',word != 'product') %>%
  group_by(company) %>%
  arrange(company,word) %>%
  summarise(business = paste(unique(word), collapse = " ")) %>%
  mutate(biz_code = dense_rank(business )) %>%
  ungroup()

head(org_id_code, 100) %>%
  kbl(caption = "Orginal nodes after clean up") %>%
  kable_paper("hover", full_width = F) %>%
  scroll_box(width = "100%", height = "500px")
Orginal nodes after clean up
company business biz_code
1 AS Marine sanctuary accessories beads bits craft crafty diy doll embellishment funfoam kits paper ribbons scrapbook shapes stencils styrofoam tools wood 182
1 and Sagl Forwading logistics solutions total 2881
2 Flounder ОАО Consultants beverages canned condiment dried drinks eat fish food frozen leaves meat mix noodles pickled pouches preserved ready rice sauce seafood snacks spices tea 1439
2 Limited Liability Company aquatic canning manufacturing processing seafood 990
3 Limited Liability Company apparel discount fabrics fibres garments greige home market segments textiles yarns 885
3 Ltd. Liability Co Transit european food specialty 2475
3 SE & Son's anodes chemicals industry plating worldwide 848
4 Limited Liability Company Seaport cold freezing providing services storage 2055
5 Flounder S.p.A. Transport engineering ferrous industry iron metals sector services steel 2424
5 Limited Liability Company 3 adhesive adhesives agents chemicals combination development environmentally friendly glue hot instant involved melt performance polymer production sales special specialises trade 39
7 GmbH & Co. KG blades cast cutlery cutting edge flatware hand handsaws including iron kitchen machines manufacture metal nonpowered nonprecious pans plated pots precious sawing skillets tools type types utensils 1482
7 S.A. de C.V. Shipping bar carbon reinforcing rounds squares steel 1303
8 S.A. de C.V. antibodies biopharmaceuticals proteins recombinant 859
8 SE Marine life gloves niche 2776
9 Charter Boat Plc Overseas fish 2542
9 GmbH & Co. KG Solutions accessories conveyors fire range valves 214
9 Shark S.A. de C.V. Brothers ang bean bing bowls dzu flour geum ice jelly juk kan ki paste pat porridge processed red rice shaved su sweet yo 809
Acevedo-Hall snapchat spectacles 3042
Acosta Inc ability accessories allowed apparel aspects assortment balance brands capitalize category comprising core customers decades derive design designing designs development distribution dynamics excelled exclusivity experience fashion focuses footwear forward global globe handbags house industry international kids labels maintain manages manufacturing market men's operations presence prevailing principles private producing production provide reputation responsible round sellers service specializes strong styles trends variety wide widespread women 70
Acosta, Proctor and Meyers beef chicken cream dairy deep diced fish freeze frozen ice jams jellies juices lamb meats pork seafood sliced vegetables yogurt 1407
Acosta, White and Patel chemicals industrial inorganic 1951
Adair - SE Transport bags leather 1245
Adair Ltd. Liability Co aftermarket automotive covers customizing electronic enclosures fobs frames hitch including key license manufacturing plastic plate trailer 507
Adair S.A. de C.V. cephalopod cuttlefish frozen octopus soft squid 1903
Adams Group fish range seafood 2585
Adams-Hicks clothing footwear 2012
Adkins LLC frozen seafood 2734
Adkins, Garcia and Perkins companies distributes electric electronic frequency hydraulic lines power stations thermal transformer 2091
Adkins, Williamson and Daniels boats landcraft sailboards sails 1523
Adkins-Villanueva harnesses wire 2798
Adriatic Nautical CJSC Holdings act agent business cargo class clearing consigned customs facilities forwarding freight infrastructure insurance land logistics marine ministry ocean operating property sea services shipment tourism transport transportation type voyage warehousing 287
Adriatic Seabass LC Transportation brokerage complete custom forwarding freight logistic providing service shipping solution world 1634
Adriatic Catch Ges.m.b.H. Forwading food 2619
Adriatic Catch Ges.m.b.H. Marine biology consumer 2167
Adriatic Catch Ltd. Liability Co machine tools 2886
Adriatic Catch S.A. de C.V. analysis technical testing 789
Adriatic Catch SRL Seal construction dedicated engineering key plants plastics unit 2154
Adriatic Mackerel Ges.m.b.H. Worldwide boats complete elements laminate models moulds operates produces subcontractor 1520
Adriatic Mackerel N.V. Transport appetizers aromatic asparaguses caviars chilean clams cockles cods crabs cuttlefishes filets fish fruits green hearts herbs mackerel maizes mangoes mussels octopuses oysters packaged palm papayas peppers pineapples prawns rambutans razors sauce sauces seafood seasonings spices spicy squids stuffed sweet truffles tunas vegetables winkles 902
Adriatic Squid AS Holdings canned seafood 1775
Adriatic Squid Limited Liability Company Freight cured fish fresh frozen seafoods 2275
Adriatic Squid Ltd. Liability Co finfish footwear including seafood shellfish shrimp 2535
Adriatic Tuna GmbH & Co. KG forwarding freight integrated operation warehouse 2686
Adriatic Tuna Seabass BV Transit petfood tuna 2975
Agua N.V. Marine life 2 pole turbogenerators 30
Aguamarina Beach AB Industrial artichokes beverages bread cheese coffee crumbs desserts gnocchi hearts mediterranean oil olive olives palm pasta pickled rice seafood soups specialties spices tomatoes tortellini vinegar 1056
Aguamarina Limited Liability Company fresh frozen seafood 2720
Aguamarina S.A. de C.V. compounding equipment extruding measuring pelletizing 2131
Aguilar LLC motor vehicle 2941
Aguilar, Smith and Perez cream fish food frozen fruit ice meals pastry ready seafood vegetables 2254
Albertine Rift Company Enterprises footwear 2669
Albertine Rift NV Family alaska chum cod cucumber fish hake pc pink pollock pop red salmon sea shellfish 659
Alexander, Sullivan and Grant eco equipment friendly industry machinery nonferrous plant steel supply 2393
Ali, Barber and French decorative materials wood 2305
Ali, Castro and Cruz applications cement chemical commercial communication complexes distribution energy fertilizer furnace including independent industrial locomotive media metering meters mills petro plants power purpose rectifier residential solutions special static steel support traction transformers utilities 954
Allen Ltd bass fresh sea tuna yellowfin 1355
Allen PLC fish materials plastics resins seafood 2574
Allen, Thomas and Jackson engines gearboxes vehicles 2428
Allen-Brown materials plastic resins 2908
Allen-Guzman accessories apparel clothing 146
Allen-Robles accessories equipment inspection machine precision surface tooling tools 224
Alvarado, Jensen and Brown acid based car cement cements coating coatings coats deck decorative duty external finishes floor flooring hardeners heavy levelling linings mortars park potable resistant skim tank water waterproofing 262
Alvarado-Oliver adhesive coating paint 408
Alvarado-Sanchez anti compounds emulsions fluids foam greases miscellaneous silicone 855
Alvarez, Harrell and Zimmerman food 2619
Alvarez-Cabrera carbon coils flat painted ppgi pre sheets steel strips tubes welded 1809
Alvarez-Rogers aerosols paint putties touch up's 499
Amerigo River S.p.A. Express assistance business change coaching development implementation improvement management operational organizational services skills strategy support technology 1115
Amur Estuary Pic Cargo air compressor hand hardware hydraulics pressure tools trailer washers welding 609
Amur GmbH & Co. KG foodstuff gelatines ingredients 2666
Amur Holdings Coral Reef food merchandise 2645
Ancla Azul SRL Coral plastic 2978
Ancla Azul ОАО Holdings accessories alterations basic fabric fabricating fabrics fiber fibers finishing food frozen hemming knitting lengthening letting logistics marketing notions piece preparation refrigerated services shortening taking thread weaving yarns 126
Ancla Marina Limited Liability Company leather shoes 2865
Ancla Marina Ltd. Liability Co Harbor courier providing services specializes trucking 2235
Ancla Marina N.V. Brothers food 2619
Ancla de Oro & AS Carriers meat 2914
Ancla de Oro AB automotive industry systems wiring 1201
Ancla de Oro Pelican alaska blocks bulk claws clusters cod cooked crab crawfish dungeness fillet fillets gutted head iqf ivp king legs pacific pollock portions red salmon shatterpacked snow sockeye tilapia 657
Ancla del Este AG bioactive collagen fish ovalbumin peptide soybean 1461
Ancla del Este LC collagen gelatin supplements 2062
Ancla del Este LLC fish seafoods yarns 2593
Ancla del Este Sagl bottom catfish clams cod crab exotics farmed fish fishes flounder halibuts oysters pollock rockfish salmon shellfish shrimp sole tilapia tuna whiting 1570
Ancla del Este Sp Fish distribution fishing operation seafood vessels 2345
Ancla del Este Starfish adults basic blended color control cotton deliver dyeing elevated fabric fabrications finishing garments hand juvy line providing seamed shrinkage technology toddler top tubular youth 469
Ancla del Este ОАО seafood 3023
Ancla del Mar Express appliances applicator auto beauty ceramic components cosmetic design equipment filling fine hot lamination machine manufacturing melt range specialises ultrasonic wide 917
Ancla del Mar Pic Worldwide fish seafoods 2592
Andaman Jetty S.A. de C.V. Marine ecology accessories extensions eyelash eyelashes false focuses strip 226
Anderson Group arc auxiliary casting ccm continuous eaf electric food furnaces ladle lf machines melt mills refining rolling shop systems 1016
Anderson Ltd business diving gas maritime measuring personal protection services solutions system technologies technology transport 1686
Anderson, Gross and Becker accessories home office personal 235
Anderson, Russell and Allen food ingredients 2636
Anderson, Tucker and Williams valve 3060
Anderson-Marsh adhesives chemicals industrial sealants surface treatments 442
Anderson-Nash casting iron 1864
Anderson-Olson fish 2542
Andhra Pradesh BV Marine life based commerce wholesaler 1333
Andhra Pradesh CJSC Merchants automatic cutting systems 1164
Andhra Pradesh Corporation Holdings accessories bags diving fish fishing heads hooks inshore line lure monofilament skirts tackle terminal trolling 172

Performed group by biz_code. Nodes by unique biz_code = 3064 (grouped_biz_code)

#grouped_biz_code (3064 unique service and code) lost id relationship
grouped_biz_code <- org_id_code %>%
  group_by(biz_code) %>%
  summarise(business = paste(unique(business), collapse = " "), biz_code) %>%
  distinct()

head(grouped_biz_code, 100) %>%
  kbl(caption = "Unique bussiness with assigned code") %>%
  kable_paper("hover", full_width = F) %>%
  scroll_box(width = "100%", height = "500px")
Unique bussiness with assigned code
biz_code business
1 0.5a 1.5a 1a 24w 2a 5v 90 adapter charger desktop driver gaming interchangeable keyboard laptop led lighting machine massage medical metal mouse power usb
2 000 1872 27 4 alligator aluminium analysers analyzers balers based bespoke business cable car casting complete container de design equipment falls ferrous freelance granulators history hydraulic including ingot loaders machinery machines main manufacturer material mcintyre metal nottingham pollution processing range reconditioned recycling researcher sales scrap services shears source support system systems tilters unloaders worldwide
3 0302.91 0302.99 0304 alaska chalcogramma chilled edible excluding fillets fish fresh meat offal pollack subheadings theragra
4 0302.91 0302.99 0304 australasicus chilled edible excluding fillets fish fresh japonicus mackerel meat offal scomber scombrus subheadings
5 0302.91 0302.99 0304 brisling chilled edible excluding fillets fish fresh meat offal pilchardus sardina sardinella sardines sardinops spp sprats sprattus subheadings
6 0303.91 0303.99 0304 albacares edible excluding fillets fish frozen meat offal subheadings thunnus tunas yellowfin
7 1 20 60 alfred bacteriology collection controls devices esr hb latex lc line modern penok penol pn roller sidecar swab test tests
8 1 250 27 aluminum auxiliary cleaning complex components container cranes device electrical engineered equipment finished forklift grade handling hydraulic injection lifting loaders machines manipulators materials molding pallets platforms roads rollers scissors season semi sidewalks steel structures tracks trailer trolley winter
9 1 4 5 6 7 automatic auxiliary class cvt fwd gearbox hybrid liter medium mini rwd speed transmission vehicles
10 1 800 alloy cast gram grams precision weight zinc
11 1 accessories art arts backpacks binders board boards book books calculators calendars cards clips coloring composition construction cooler correction covers crafts crayons desk document dry envelopes erase erasers fashion fatbooks foam glue highlighters holders home including index lunchbags mailing markers memo notebooks offers pads paper pencil pencils pens pins plastic portfolios poster project punches push range rulers scissors sharpeners staplers subject supplies tape totes wide
12 1 bound cream crystal drink drinking fish gum ice jelly konjac milk papaya pudding refined seafood soft sorbet stabilizer suspension thickening water wine yoghurt
13 10 100 acetyl acid alpisarin ammonium arteether artemether artemisinin artesunate baccatin beta bp bromide butyl camptothecin coenzyme colchicine dab de digoxin dihcl enoxolone ep forskohlin glycyrrhetinic glycyrrhizinate hcl herpes hydrobromide hyoscine hyoscyamine jp machinery mag manufacturing metalworking methoxsalen nicotine noscapine ohimbine organizations outsourcing paclitaxel piperine podophyllum private public quinidine quinine reserpine resin salts sennosides service solutions sulphate tartarate thiocolchicoside u.s.s.r.p usp xanthotoxin
14 100 280 320 4 80 acid alka bloom cold concentrations extraction flavoured food gelatine gelatines gold grade granulometries hydrolysed instant leaf line liquid lumps mesh pharmaceutical platinum silver soluble technical type wine
15 100 anchovies black green manzanilla olives peppers percent recipes spanish stuffed
16 100,000 200,000 60,000 80,000 africa australia bulk capacities cape cargo cargoes cement chemical coal continent conventional countries crude dangerous dry dwt east fertilizers fleet gas gasoline grain guatemala handymax hbi heavy including india iron lift liner methanol middle naphtha north offers oil oils operates ore p.g pacific palm panamax petcoke ports ranging salt sand scrap services silica sized south suezmax sugar sulphur tankers tramp transportation transporting vessels vlccs
17 110v 220v 3 air chilled coils commercial concealed condensing ducted dx evaporator fan handlers include mount portable residential series ton unit units universal wall water window
18 12 84 automotive card cards convenience countertop custom display displays drug fixtures floor greeting grocery hold hundreds literature mass merchandise merchandising pockets racks sorts specific store stores wire
19 12 axle bearing bridge components gear heavy internal mechanical reduction ring seals speed steyr transmission truck wheel
20 120 370ml 580ml 6 9 asparagus canned diamir fa fruits hood light marmelades meals mushrooms ol olive pepper piq ready seafood tuna vegetables ventresca
21 13 ac chassis condensing consoles custom freelance heat horizontal list low packaged profile ptac pumps remote replacement researcher seer source stacked unit units vertical
22 150 advanced annual approvals assembly automatic ce certificates completed erp halogen lamps led lights line million output pieces production reach series sets type
23 16 braided complete cord cordage cords cotton diamond line nylon polyester polyethylene polypropylene rayon rope ropes round smooth solid specializing synthetics twine twisted
24 1604 fish heading minced n.e.c pieces preparations prepared preserved
25 1974 acquired affected assembly bar businesses closer crisis development direction distribution evolutions faster feeder field fine future hydraulic hydrobar ingenious inventing invests jura leader loaders machine machining makers markets mechanical medium peripherals philippe position precision publicly pushing reached region regional respond scheurer sized storskogen swedish technician tool traded tuned watch worldwide
26 1999 catalogs children's clothing launched mail men's retailer sells site wear web women's
27 2 200 24 atmos black box cans care cleaning collab crates crep cure era eraser flat footwear kicks kilates kit laces limited mark ml multi nba nice pack pen pill pre protect quantities refill round shoe sneaker spray team treated trees tube ultimate white wipes â
28 2 3 360 3ds 4 accessories action adventure apparel blu board cards console consoles content digital ds dvds family fighting figurines games guides hardware headsets keyboards mice music nintendo online pc playing playstation portable posters puzzle racing ray replicas role shooter simulation sport statues strategy tickets toys trading video vita wii xbox
29 2 3 caps containers cutting easy lithography metal piece plate traditional twist varnishing
30 2 pole turbogenerators
31 200 blanca canada canadians check companies company employs fisheries fishing freelance head job john largest liability limited management nataagnaq newfoundland nunavut office offshore opportunities playa researcher source st
32 2202 3303 411 441 551 553 fume metal powder silica silicon
33 24 ball carat correction erasers gel items lead pens promotional refills scales sharpeners stationery
34 25 biaxially bopp cast cpp degradable film films gba gbc gbp gcl gcm gcm25m gec12m gec12s green guolene metallized oriented polypropylene
35 250 acid advisory alloyed alloys automotive cast casting chemical construction development finishing fittings heat highly including industries industry iron kilogram low material offers post process prototype pump purpose range research resistant service special steel surface treatment und valves weight
36 3 3.0 accessories adapters card converter devices docking hub lan media multimedia ports reader sharing station stations thunderbolt travel usb
37 3 99 acid agro agrochemical aluminium bases bulk chloral chloride chloroacetylechloride drugs dye ethyl fast formate formic formulations fungicides herbicides hexahydrate including intermediates methyl minimum nitrophthalic nitrophthalonitrile percent pesticides pharmaceuticals
38 3 acids botanical extracts fatty omega probiotics
39 3 adhesive adhesives agents chemicals combination development environmentally friendly glue hot instant involved melt performance polymer production sales special specialises trade
40 3 cod fish liver oil omega shark
41 350 400 6 750 approximately boutiques brand departmental exclusive including john lifestyle multi operates outlets players stores wills
42 3501 animal casein coloured derivatives excluding gelatin glues heading including isinglass origin rectangular sheets surface
43 3d adstra arm cabinetry cabinets cart chairs charting clinics compressors computers cuspidors delivery den dental equipment equus film furniture imaging instrument intraoral lighting management microscopes mobile nitrous operatory oxide packages panoramic portable practice precision processors pumps ray reception refurbished seiler software sterilizers stools systems tech units vacuum washer
44 3d anti applications climate components control crystal decorations diffuser display displays films flat graphic hygiene incorporating interactive liquid manufacturing microbial mould optical panel panels precision printing properties screen sector suitable systems touch
45 4pl air brokerage bulk cargo commerce contract controlled customs distribution engineering forwarding freight include information insurance international land load logistics management manufacturing multimodal national ocean packing pallet preparation reverse services shared shipments solutions stock temperature transport transportation warehousing
46 5 automatic axis bridge changers horizontal machines milling pallet production speed tapping vertical
47 5 bacon biscuits chewing convenience corn crocs dishes fish ham palette pasta pizza poultry ready sandwiches sausages seafood serve snackies sticks strips succulent tasty wide
48 5 beans bio black borlotti butter chapped cherry chick chilly crushed double eye flavorings fruits garlic green herbs hill lentils mix onion paste peas peeled pizza sauce tomato tomatoes vegetables velvety white
49 500 chain company customers delivers germany largest migros parent party stores supermarket switzerland switzerland's
50 500w amplifiers cim commutation components controllers core customer dc drive electronic encoders flat gears iron ironless mechanical mim motors output planetary position power resolvers sensors servo solutions special specific spur tachos tech winding
51 6 backpack bag business compu computer cooler messenger polyester portable sling sports tote trail travel
52 600 asprin bayer bone calcium capsules care cats claw devil's diet dogs electrolyte formulas gemini herbal joint liposafe minerals replenishment selenium supplement tablets women's yeast
53 63 77 83 92 action female laminate lock sv taper tilt valves vertical
54 8 air apl arabia atlantic ccl cement container continental freelance freight line logistics mixer ocean pacific pal project researcher source units
55 8 balls beer cubes drives effects environment flat items magic memory picture prism protection recycle rubik's sliding tangles usb
56 80 camp developmental disabilities electric freelance gas ground heaters heating manufacturer nonprofit ofsolar pool pools private researcher solar source summer swimming system systems thermal
57 8903 boats canoes heading inflatable n.e.c pleasure rowing sports vessels yachts
58 900 adapters cables cords coupler couplers distribution hybrid indoor lc lszh mt panels patch producing pvc range rated riser rj specialized st standard style wide
59 a.o automation chinese class electro european leading manufacturers offering represents specialises suppliers technology
60 a5 airpen blue computer diagrams electronic format handwritten hundred ink kga memory normal notebook notes pages paper pen personal sketches storage stores uploaded ventures water writes
61 aaa albacore arkshell bighead chuka clam crab croaker cut escolar fillet fish flying frozen fulvescen ground half hamachi hiyashi ika items ivp izumidai korean loin mackerel madako meat mussel nobashi octopus oyster pike poke pollack ribbon saku sansai sea seafood seaweed shell shisamo slice snail snow squid squirt steamed sushi tako tiny tobiko tuna wakame yellow
62 aalesund agency airfreight airlines belgium break broker brokerage bulk bunker cargo cargoes chartering chilled consignments consolidation container containers crew customs declaration delivery destinations direct discharging door dry eastern europe exports extended france frozen germany handle handles handling imports including items kinds land lay loading lufthavn netherlands norway offers oil operates operating planning port ports project racks sea services ship shipchandler shipping skutvika stevedoring storage stores terminal transfer transport transportation transshipment truck trucking vessels vigra worldwide
63 aasicp analysis australian certified coal freelance materials minerals reference researcher source standards supplier
64 abalone anchovy blowfish bluefish butter capelin catfish caviar clam cockle conch crab crayfish crustacean cucumber cuttlefish dogfish echinoderms eel fish flounder flying grouper haddock kingfish lobster lumpfish mollusks mussel octopus oyster periwinkle prawns roe salmon scallop sea shad shellfish shrimp snail squid urchin
65 abalone cactus dry ezo fish flounder food foods frozen ingredients scallop seasonal yellowtail
66 abalone hake pink prawns seafoods
67 abalone mollusc preparations prepared preserved
68 abc advanced aim aluminum applications board bonded circuit class copper development electronic foils freelance interconnect materials performance printed production researcher source world
69 abi ach automated broker cargo clearing consular credit destinations documentation door export freelance house insurance interface letters researcher service shipment source
70 ability accessories allowed apparel aspects assortment balance brands capitalize category comprising core customers decades derive design designing designs development distribution dynamics excelled exclusivity experience fashion focuses footwear forward global globe handbags house industry international kids labels maintain manages manufacturing market men's operations presence prevailing principles private producing production provide reputation responsible round sellers service specializes strong styles trends variety wide widespread women
71 abrasive abrasives accessories air bases batteries bead bench benches blanks books brushes buffs bur burs busch carbide carving casting chairs cleaners cleaning cloth compounds compressors cratex crucibles cup cutters decorative diamond display drawing dressing drills electroplating engraving equipment felts files filters finishes flap flasks flex frames gemstones grain grinders hammers handpieces hears hoses imaging inside investing kits laps lighting machines mallets mandrels measuring mills nippers packaging photography pins pliers polishers polishing power range reamers rifflers ring rolling safety sandblasting saws scrapers scribers setting shafts shop soldering solutions specialises stamps stands stone stones stringing supplies supplying taps tools torches tumblers tweezers ultrasonic vacuums videos watch wheel wheels wide wildfowl
72 abrasive aluminum ceramic fused industries line oxides refractory vast
73 abrasive ash concrete control equipment handling material multi pollutant systems
74 abrasive brakes building cnc controlled cutting guillotine including machines offers plate press presses pressure pumps robotized routing shears ship systems tools waterjet waterjets
75 abrasives agglomerates brushes ceramic cutting epoxy equipment granites marbles mastics surfaces systems technical tools treatments
76 abrasives applications based expendable quality recyclable slag specialty variety wide
77 abrasives bars bits boring boxes broaches cabinets carbide chucks collets coolant counterboxes countersinks cutters cutting drill fasteners files grinding handtools heads holders indexable instruments lathe measuring mills precision reamers rotary saws shop supplies systems tapping tool tooling tools vises wheels
78 abrasives cabinets canal cements dental equipment hand laboratory ray resins root stones units waxes
79 abs accessories aerobic amounts apparel bikes boxing catalog dry equipment exercise fitness furnishings groceries hardware home house kits lifting limited line lines machines mail massagers media merchandise pilates steppers steps strength television trainers training trampolines treadmills vibration wares weight yoga
80 abs acrylonitrile butadiene chloride hips impact nylons pa pc pe pes pet plastic poly polyamides polycarbonate polyester polyethylene polypropylene polystyrene polyurethanes polyvinylidene pp ps pu pvc pvdc saran styrene terephthalate vinyl
81 absorbent ammonium anhydrous antimony bicarbonate bone caffeine chloride diphyenyl ethyl glue guanidine gum lead mono oclansorb oil phosphate phosphorus potassium red rosin sodium sulphate tartrate trisodium xanthate zirconium
82 absorber applications automation bike components compressor comprise comprising connecting consumer cum electronic engine forging heat hubs include including industrial insulin integration lens machining medical metal optical processing professional rail rings services shock sleeves suspension syringe system timing treatment variable
83 absorbers added chemicals coatings finishes flame innovative management moisture oil release repellents retardants soil stain uv water
84 absorbers anti articles bar bearing bearings calibrated cast components connecting conservatories consist cross differential doors doorways drive elements engineering extraction extrusion facades finger fixing food fresh gaiters gaskets gearbox guard hydraulic include including industrial industry intermediate limiters linings membrane moulds mountings movement pipes profiles protection rods roll rubber sealing shaft shock slitted steering stop struts system technical technology transmission waste water white windows zsb
85 absorbing active adjustability adjustable advanced aftermarket assemblies columns components comprising drive electric electronics energy equipment final front half hydraulic including intermediate joints kits modules original overlay power propeller rake rear services shaft shafts solutions steering systems technology tilt torque touch wheel
86 absorption ac anti apparel breathable coating cpu cut dirt durable dyed dyeing embossing fabric fabrics fashion fiber flame form furnishing germs home including industrial laminating lamination mesh mildew nylon olefin outdoor padded polyester pressing printing process proof pu pvc recycle recycled repellent short special spun textile textiles tricot uv vinyl water yarn yarns
87 ac accessories arc beam billets blanks blooms building casting continuous dc degassing electrical equipment fibers furnaces gift household indoor industrial ladle machines materials minimills outdoor plants rounds sewing stationery supplies threads vacuum vd vod yarns
88 ac automotive brushless cleaner dc gear include induction motors offers pole range shade universal vacuum
89 ac dc freelance gear hydraulic manifolds motors power pumps remotes researcher reservoirs source units
90 acacia almond blossom calluna chestnut eucalyptus forest heather honey lavender lemon linden mandarin mountain orange organic origins polyflora rape rosemary spanish stoechas sunflower thyme tree types vitex
91 accelerated business consultancy freelance industrial joint performance researcher service source supply testing tires tosupport venture wheels
92 accelerator adhesive adhesives anaerobic bottles curing cyanoacrylate dispensing dosing epoxy equipment floodlight glue lamps led linop medical methacrylate methyl packaging primer remover solutions tips uv
93 accent accents americana bow bridal check christmas craft decorative floral gift holiday industries items lace manufacture metallic offers patrick polypropylene portfolio ribbon ribbons sale satin seasonal sheers special spring st striped supplies tulle unwired valentine velvet waterproof wedding wired wrapping
94 accent commotions cones cookie cool cream creamy desserts drink drinks duetto energy frozen fruit fusion gelati ice iced including light moos nature's premium sandwiches sherbet sundae tea treats venice yogurt
95 access acute aesculap anesthesia apparatus care chronic clinical closure dialysis disinfection divisions endoscopes fields frequency gloves hospital hygiene incontinence infusion injections instruments intensive intravenous invasion management market medical medicine minimal nutrition offers operates opm parental patient services solutions stoma surgical therapy treatment unit urology wound wounds
96 access ade air architectural benchmark boards cable centre components containers control controlled data door drainage ductwork energy engineered environmental environments factory faã floor floors frame framing harvesting heat height hot hvac insulated insulation integrated management panels piping pollution pumps rainwater renewable roof roofs safety solar solutions source steel structural sustainable systems telementry timber underfloor wall walls water wire
97 access arm articulated capacity compact equipment forklift forklifts front including industrial loaders maniaccess manihoe manilec maniloader maniscopic manitou manitransit masted mounted pallet platforms rear rotating rough scissor semi shovel stackers telescopic terrain truck trucks vertical warehouse
98 accessibility assistance buses city coaches mini services support systems technical
99 accessories acoustic adhesives automotive covering energy engineered fire foams industrial insulation markets metallic offers pvc range safety systems technical wind
100 accessories acrylic appliques beaded beads clay cloisonne collars corsages crochet embroidered fancy fashion fringes garments gemstones glass hand jeans motifs natural scarves shells silk skirts tops trimmings

Redo Tokenisation base on grouped_biz_code and perform pairwise_similarity business

#Tokenisation of service words
grouped_service_code_words <- grouped_biz_code %>%
unnest_tokens(word, business) %>%
anti_join(stop_words, by = "word") %>%
count(biz_code, word) %>%
ungroup()

#pairwise_similarity of service words
closest_org_service_code <- grouped_service_code_words %>%
  pairwise_similarity(biz_code, word, n) %>%
  filter(similarity >= 0.5) %>%
  arrange(desc(similarity))

Build table to review business similarity (Check_closest_org_service_code). similar pair = 3887 (similar_pairs)

#To review pairwise_similarity in table format
Check_closest_org_service_code <- closest_org_service_code %>%
  left_join(grouped_biz_code %>% select(biz_code, business) %>% rename(business_1 = business), by = c("item1" = "biz_code")) %>%
  left_join(grouped_biz_code %>% select(biz_code, business) %>% rename(business_2 = business), by = c("item2" = "biz_code"))

similar_pairs <- Check_closest_org_service_code %>%
  filter(item1 < item2)

head(Check_closest_org_service_code, 100) %>%
  kbl(caption = "Preview of similar bussiness pair with similarity value more than 0.5") %>%
  kable_paper("hover", full_width = F) %>%
  scroll_box(width = "100%", height = "500px")
Preview of similar bussiness pair with similarity value more than 0.5
item1 item2 similarity business_1 business_2
314 313 0.9860133 activities assistance basis business businesses change coaching development effective efficient frameworks functions guide identification implementation improvement management methodologies ongoing operational organisational organisations performing proprietary recommendations routine serve services skills specialises strategy support tasks technology traditionally activities assistance basis business businesses change coaching development effective efficient frameworks functions guide identification implementation improvement management methodologies offers ongoing operational organisational organisations performing proprietary recommendations routine serve services skills specialises strategy support tasks technology traditionally
313 314 0.9860133 activities assistance basis business businesses change coaching development effective efficient frameworks functions guide identification implementation improvement management methodologies offers ongoing operational organisational organisations performing proprietary recommendations routine serve services skills specialises strategy support tasks technology traditionally activities assistance basis business businesses change coaching development effective efficient frameworks functions guide identification implementation improvement management methodologies ongoing operational organisational organisations performing proprietary recommendations routine serve services skills specialises strategy support tasks technology traditionally
1667 1666 0.9805807 burger canned cod cornmeal covers crabs fillets flounder frozen groundfish halibut herring pollock range rockfish salmon shellfish sockeye sole specialises steak steaks strips tuna wide burger canned cod cornmeal covers crabs fillets flounder frozen groundfish halibut herring offering pollock range rockfish salmon shellfish sockeye sole specialises steak steaks strips tuna wide
1666 1667 0.9805807 burger canned cod cornmeal covers crabs fillets flounder frozen groundfish halibut herring offering pollock range rockfish salmon shellfish sockeye sole specialises steak steaks strips tuna wide burger canned cod cornmeal covers crabs fillets flounder frozen groundfish halibut herring pollock range rockfish salmon shellfish sockeye sole specialises steak steaks strips tuna wide
1671 1670 0.9805807 burger canned cod cornmeal crabs fancy fillets fish flounder frozen groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder frozen grocery groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna
1670 1671 0.9805807 burger canned cod cornmeal crabs fancy fillets fish flounder frozen grocery groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder frozen groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna
1541 1540 0.9797959 bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood shellfish shucking smoking soup bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup
1540 1541 0.9797959 bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood shellfish shucking smoking soup
1263 1262 0.9759001 bakery beverages cream dairy dressings dry food frozen fruits groceries ice kitchen meat paper plates salad sanitation solutions vegetables ware bakery beverages cream dairy dressings dry food frozen fruits groceries ice kitchen meat offers paper plates salad sanitation solutions vegetables ware
1262 1263 0.9759001 bakery beverages cream dairy dressings dry food frozen fruits groceries ice kitchen meat offers paper plates salad sanitation solutions vegetables ware bakery beverages cream dairy dressings dry food frozen fruits groceries ice kitchen meat paper plates salad sanitation solutions vegetables ware
1544 1543 0.9746794 bones entrails eviscerating fats fins fish fresh frozen heads manufacturing marine oils packing processing removing scales seafood shellfish shucking specialises bones entrails eviscerating fats fins fish fresh frozen heads manufacturing marine oils packing processing removing scales seafood shellfish shucking
1543 1544 0.9746794 bones entrails eviscerating fats fins fish fresh frozen heads manufacturing marine oils packing processing removing scales seafood shellfish shucking bones entrails eviscerating fats fins fish fresh frozen heads manufacturing marine oils packing processing removing scales seafood shellfish shucking specialises
424 423 0.9701425 adhesives animal caulking cements compounds glues household industrial linoleum materials plastics rubber sealants synthetic tile vegetable adhesives animal caulking cements compounds glues household industrial linoleum manufacturing materials plastics rubber sealants synthetic tile vegetable
423 424 0.9701425 adhesives animal caulking cements compounds glues household industrial linoleum manufacturing materials plastics rubber sealants synthetic tile vegetable adhesives animal caulking cements compounds glues household industrial linoleum materials plastics rubber sealants synthetic tile vegetable
998 997 0.9660918 aquatic dried fillets fish fishmeals marinated marine preserved salted sardines seafoods smoked sour sweet aquatic dried fillets fish fishmeals marinated marine preserved produces salted sardines seafoods smoked sour sweet
997 998 0.9660918 aquatic dried fillets fish fishmeals marinated marine preserved produces salted sardines seafoods smoked sour sweet aquatic dried fillets fish fishmeals marinated marine preserved salted sardines seafoods smoked sour sweet
727 726 0.9657040 alum bags baking bar beans beef bottle bowls bread cakes canned cereal cheese chocolate cleaning coffee condiments cookie cups dessert detergents disposables dough dressings dry eggs equipment film fish foils food french fresh fries frozen fruit glazes hashbrowns hors hot juice lamb lids milk mixes napkins oeuvres oils olives pancake pans pasta pastries pickles pies pizza plates pork pot potato potatoes poultry prepared produce rice salad salads sauces seafood shortening snack soda soup spices supplies supply tea tissue towels trays veal water waxes alum bags baking bar beans beef bottle bowls bread cakes canned cereal cheese chocolate cleaning coffee condiments cookie cups dessert detergents disposables dough dressings dry eggs equipment film fish foils food french fresh fries frozen fruit glazes grocery hashbrowns hors hot including juice lamb lids milk mixes napkins oeuvres offers oils olives pancake pans pasta pastries pickles pies pizza plates pork pot potato potatoes poultry prepared produce rice salad salads sauces seafood selection shortening snack soda soup spices supplies supply tea tissue towels trays veal water waxes wholesales wide
726 727 0.9657040 alum bags baking bar beans beef bottle bowls bread cakes canned cereal cheese chocolate cleaning coffee condiments cookie cups dessert detergents disposables dough dressings dry eggs equipment film fish foils food french fresh fries frozen fruit glazes grocery hashbrowns hors hot including juice lamb lids milk mixes napkins oeuvres offers oils olives pancake pans pasta pastries pickles pies pizza plates pork pot potato potatoes poultry prepared produce rice salad salads sauces seafood selection shortening snack soda soup spices supplies supply tea tissue towels trays veal water waxes wholesales wide alum bags baking bar beans beef bottle bowls bread cakes canned cereal cheese chocolate cleaning coffee condiments cookie cups dessert detergents disposables dough dressings dry eggs equipment film fish foils food french fresh fries frozen fruit glazes hashbrowns hors hot juice lamb lids milk mixes napkins oeuvres oils olives pancake pans pasta pastries pickles pies pizza plates pork pot potato potatoes poultry prepared produce rice salad salads sauces seafood shortening snack soda soup spices supplies supply tea tissue towels trays veal water waxes
1540 318 0.9622504 bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup activities bones canning drying entrails eviscerating fats fins fish freezing fresh heads including involved marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup
318 1540 0.9622504 activities bones canning drying entrails eviscerating fats fins fish freezing fresh heads including involved marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup
1001 1000 0.9607689 aquatic drying fish fresh frozen prepared salting seafood shellfish smoking soup surimi aquatic drying fish fresh frozen prepared salting seafood shellfish smoking soup specialises surimi
1000 1001 0.9607689 aquatic drying fish fresh frozen prepared salting seafood shellfish smoking soup specialises surimi aquatic drying fish fresh frozen prepared salting seafood shellfish smoking soup surimi
1673 1671 0.9591663 burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder frozen groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna
1671 1673 0.9591663 burger canned cod cornmeal crabs fancy fillets fish flounder frozen groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1542 1541 0.9574271 bones canning drying entrails eviscerating fats fins fish freezing fresh heads marine oils packing processing removing salting scales seafood shellfish shucking smoking bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood shellfish shucking smoking soup
1541 1542 0.9574271 bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood shellfish shucking smoking soup bones canning drying entrails eviscerating fats fins fish freezing fresh heads marine oils packing processing removing salting scales seafood shellfish shucking smoking
1674 1673 0.9555331 burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1673 1674 0.9555331 burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
2262 2261 0.9534626 crustaceans distribution fillets fish fresh frozen line molluscs seafoods shellfish crustaceans distribution fillets fish fresh frozen involved line molluscs seafoods shellfish
2261 2262 0.9534626 crustaceans distribution fillets fish fresh frozen involved line molluscs seafoods shellfish crustaceans distribution fillets fish fresh frozen line molluscs seafoods shellfish
1352 1351 0.9511897 bass catfish clams crabs crustaceans fish lobster mollusks oysters salmon sea shellfish shrimp squid sword tilapia trout tuna vegetables bass catfish clams crabs crustaceans fish lobster mollusks oysters primarily salmon sea sells shellfish shrimp squid sword tilapia trout tuna vegetables
1351 1352 0.9511897 bass catfish clams crabs crustaceans fish lobster mollusks oysters primarily salmon sea sells shellfish shrimp squid sword tilapia trout tuna vegetables bass catfish clams crabs crustaceans fish lobster mollusks oysters salmon sea shellfish shrimp squid sword tilapia trout tuna vegetables
1541 318 0.9428090 bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood shellfish shucking smoking soup activities bones canning drying entrails eviscerating fats fins fish freezing fresh heads including involved marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup
318 1541 0.9428090 activities bones canning drying entrails eviscerating fats fins fish freezing fresh heads including involved marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood shellfish shucking smoking soup
1386 1385 0.9413574 beauty beverages breads care cleaning consumer cosmetics detergents disposable drugs food frozen fruits grocery household junk laundry meat nappies personal poultry prescription processed seafood vegetables beauty beverages breads care cleaning consumer cosmetics detergents disposable drugs food foods frozen fruits household include junk laundry meat nappies personal poultry prescription processed seafood vegetables
1385 1386 0.9413574 beauty beverages breads care cleaning consumer cosmetics detergents disposable drugs food foods frozen fruits household include junk laundry meat nappies personal poultry prescription processed seafood vegetables beauty beverages breads care cleaning consumer cosmetics detergents disposable drugs food frozen fruits grocery household junk laundry meat nappies personal poultry prescription processed seafood vegetables
1673 1670 0.9405399 burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder frozen grocery groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna
1670 1673 0.9405399 burger canned cod cornmeal crabs fancy fillets fish flounder frozen grocery groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1723 1722 0.9393364 cakes chowders cooked crabcakes fish fishcakes fresh frozen preparations raw seafood seafoods shrimp soups stews cakes chowders cooked crabcakes fish fishcakes fresh frozen include preparations preparing raw seafood seafoods shrimp soups stews
1722 1723 0.9393364 cakes chowders cooked crabcakes fish fishcakes fresh frozen include preparations preparing raw seafood seafoods shrimp soups stews cakes chowders cooked crabcakes fish fishcakes fresh frozen preparations raw seafood seafoods shrimp soups stews
1542 1540 0.9380832 bones canning drying entrails eviscerating fats fins fish freezing fresh heads marine oils packing processing removing salting scales seafood shellfish shucking smoking bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup
1540 1542 0.9380832 bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup bones canning drying entrails eviscerating fats fins fish freezing fresh heads marine oils packing processing removing salting scales seafood shellfish shucking smoking
989 988 0.9354143 aquatic canned cured fish fresh frozen seafood aquatic canned cured fish fresh frozen furniture seafood
988 989 0.9354143 aquatic canned cured fish fresh frozen furniture seafood aquatic canned cured fish fresh frozen seafood
1672 1668 0.9291642 burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king ocean offers pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder food frozen groundfish halibut herring king ocean pacific perch pollock rockfish salmon sea shellfish sockeye sole steak steaks strips tuna
1668 1672 0.9291642 burger canned cod cornmeal crabs fancy fillets fish flounder food frozen groundfish halibut herring king ocean pacific perch pollock rockfish salmon sea shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king ocean offers pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1673 1672 0.9229582 burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king ocean offers pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1672 1673 0.9229582 burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king ocean offers pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1542 1539 0.9198662 bones canning drying entrails eviscerating fats fins fish freezing fresh heads marine oils packing processing removing salting scales seafood shellfish shucking smoking bones canning drying entrails eviscerating fats fins fish freezing fresh gathering heads marine oils packaging packing preparation processing removing salting scales seafood seafoods shellfish shucking smoking
1539 1542 0.9198662 bones canning drying entrails eviscerating fats fins fish freezing fresh gathering heads marine oils packaging packing preparation processing removing salting scales seafood seafoods shellfish shucking smoking bones canning drying entrails eviscerating fats fins fish freezing fresh heads marine oils packing processing removing salting scales seafood shellfish shucking smoking
2200 827 0.9176629 controlled cured custom cut fresh frozen lamb meat meats pork portion sausage seafood smoked specialty venison animal controlled cured custom cut fresh frozen lamb meat meats pork portion processing sausage seafood slaughtering smoked specialty venison
827 2200 0.9176629 animal controlled cured custom cut fresh frozen lamb meat meats pork portion processing sausage seafood slaughtering smoked specialty venison controlled cured custom cut fresh frozen lamb meat meats pork portion sausage seafood smoked specialty venison
1570 1569 0.9165151 bottom catfish clams cod crab exotics farmed fish fishes flounder halibuts oysters pollock rockfish salmon shellfish shrimp sole tilapia tuna whiting bottom catfish clams cod crab cured exotics farmed fish fishes flounder fresh frozen halibuts oysters pollock rockfish salmon seafoods shellfish shrimp sole tilapia tuna whiting
1569 1570 0.9165151 bottom catfish clams cod crab cured exotics farmed fish fishes flounder fresh frozen halibuts oysters pollock rockfish salmon seafoods shellfish shrimp sole tilapia tuna whiting bottom catfish clams cod crab exotics farmed fish fishes flounder halibuts oysters pollock rockfish salmon shellfish shrimp sole tilapia tuna whiting
1674 1667 0.9165151 burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal covers crabs fillets flounder frozen groundfish halibut herring pollock range rockfish salmon shellfish sockeye sole specialises steak steaks strips tuna wide
1674 1671 0.9165151 burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder frozen groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna
1667 1674 0.9165151 burger canned cod cornmeal covers crabs fillets flounder frozen groundfish halibut herring pollock range rockfish salmon shellfish sockeye sole specialises steak steaks strips tuna wide burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1671 1674 0.9165151 burger canned cod cornmeal crabs fancy fillets fish flounder frozen groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1539 1538 0.9158109 bones canning drying entrails eviscerating fats fins fish freezing fresh gathering heads marine oils packaging packing preparation processing removing salting scales seafood seafoods shellfish shucking smoking bones canning drying entrails eviscerating fats fins fish freezing freight fresh gathering heads logistics marine oils packaging packing preparation processing removing salting scales seafood seafoods services shellfish shucking smoking transportation trucking
1538 1539 0.9158109 bones canning drying entrails eviscerating fats fins fish freezing freight fresh gathering heads logistics marine oils packaging packing preparation processing removing salting scales seafood seafoods services shellfish shucking smoking transportation trucking bones canning drying entrails eviscerating fats fins fish freezing fresh gathering heads marine oils packaging packing preparation processing removing salting scales seafood seafoods shellfish shucking smoking
1669 1668 0.9153857 burger canned cod cornmeal crabs fancy fillets fish flounder freshwater frozen groundfish halibut herring king live ocean ornamental pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder food frozen groundfish halibut herring king ocean pacific perch pollock rockfish salmon sea shellfish sockeye sole steak steaks strips tuna
1668 1669 0.9153857 burger canned cod cornmeal crabs fancy fillets fish flounder food frozen groundfish halibut herring king ocean pacific perch pollock rockfish salmon sea shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder freshwater frozen groundfish halibut herring king live ocean ornamental pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1672 1669 0.9135469 burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king ocean offers pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder freshwater frozen groundfish halibut herring king live ocean ornamental pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1669 1672 0.9135469 burger canned cod cornmeal crabs fancy fillets fish flounder freshwater frozen groundfish halibut herring king live ocean ornamental pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets flounder frozen groundfish halibut herring king ocean offers pacific perch pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
849 691 0.9128709 anoraks backpacks bags boxers casual dress hats include licensed logoed outerwear polo rugby shirts shorts slacks sportswear sweaters sweatshirts turtlenecks allied anoraks backpacks bags boxers casual clothing dress garments hats include licensed logoed outerwear polo rugby shirts shorts slacks sportswear sweaters sweatshirts trousers turtlenecks
691 849 0.9128709 allied anoraks backpacks bags boxers casual clothing dress garments hats include licensed logoed outerwear polo rugby shirts shorts slacks sportswear sweaters sweatshirts trousers turtlenecks anoraks backpacks bags boxers casual dress hats include licensed logoed outerwear polo rugby shirts shorts slacks sportswear sweaters sweatshirts turtlenecks
891 886 0.9128709 apparel leather machinery production textile apparel equipment leather machinery production textile
886 891 0.9128709 apparel equipment leather machinery production textile apparel leather machinery production textile
1040 1039 0.9128709 arranging carriers freight shippers transportation arranging carriers freight shippers specialises transportation
1039 1040 0.9128709 arranging carriers freight shippers specialises transportation arranging carriers freight shippers transportation
1722 1721 0.9095086 cakes chowders cooked crabcakes fish fishcakes fresh frozen include preparations preparing raw seafood seafoods shrimp soups stews cakes chowders cooked crab fish fishcakes fresh frozen preparations preparing raw seafood seafoods shrimp soups stews
1721 1722 0.9095086 cakes chowders cooked crab fish fishcakes fresh frozen preparations preparing raw seafood seafoods shrimp soups stews cakes chowders cooked crabcakes fish fishcakes fresh frozen include preparations preparing raw seafood seafoods shrimp soups stews
1354 1353 0.9088933 bass clams crabs crustaceans fish lobster mollusks offers oysters salmon sea seafood shellfish shrimp squid sword trout tuna vegetables bass clams crabs crustaceans fish lobster mollusks offers oysters purchase sale salmon sea seafood shellfish shrimp specializes squid sword trade trout tuna vegetables
1353 1354 0.9088933 bass clams crabs crustaceans fish lobster mollusks offers oysters purchase sale salmon sea seafood shellfish shrimp specializes squid sword trade trout tuna vegetables bass clams crabs crustaceans fish lobster mollusks offers oysters salmon sea seafood shellfish shrimp squid sword trout tuna vegetables
149 148 0.9045340 accessories apparel clothing men's shirts specialty sweaters tailored women's accessories apparel clothing items men's shirts specialty sweaters tailored textile women's
148 149 0.9045340 accessories apparel clothing items men's shirts specialty sweaters tailored textile women's accessories apparel clothing men's shirts specialty sweaters tailored women's
930 929 0.9045340 appliances computers consumer electronic household line single televisions type appliances computers consumer distribution electronic household line single specialising televisions type
929 930 0.9045340 appliances computers consumer distribution electronic household line single specialising televisions type appliances computers consumer electronic household line single televisions type
1723 1721 0.9036961 cakes chowders cooked crabcakes fish fishcakes fresh frozen preparations raw seafood seafoods shrimp soups stews cakes chowders cooked crab fish fishcakes fresh frozen preparations preparing raw seafood seafoods shrimp soups stews
1721 1723 0.9036961 cakes chowders cooked crab fish fishcakes fresh frozen preparations preparing raw seafood seafoods shrimp soups stews cakes chowders cooked crabcakes fish fishcakes fresh frozen preparations raw seafood seafoods shrimp soups stews
1542 318 0.9026709 bones canning drying entrails eviscerating fats fins fish freezing fresh heads marine oils packing processing removing salting scales seafood shellfish shucking smoking activities bones canning drying entrails eviscerating fats fins fish freezing fresh heads including involved marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup
318 1542 0.9026709 activities bones canning drying entrails eviscerating fats fins fish freezing fresh heads including involved marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup bones canning drying entrails eviscerating fats fins fish freezing fresh heads marine oils packing processing removing salting scales seafood shellfish shucking smoking
125 124 0.9021342 accessories alterations basic distribution fabric fabricating fabrics fibers finishing hair hemming knitting lengthening letting notions offers piece preparation services shortening specialises taking thread weaving wholesale yarns accessories alterations basic distribution encompass fabric fabrication fabrics finishing hemming knitting lengthening letting notions offers piece preparation services shortening specialises taking thread weaving wholesale yarns
124 125 0.9021342 accessories alterations basic distribution encompass fabric fabrication fabrics finishing hemming knitting lengthening letting notions offers piece preparation services shortening specialises taking thread weaving wholesale yarns accessories alterations basic distribution fabric fabricating fabrics fibers finishing hair hemming knitting lengthening letting notions offers piece preparation services shortening specialises taking thread weaving wholesale yarns
1540 1539 0.9021342 bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup bones canning drying entrails eviscerating fats fins fish freezing fresh gathering heads marine oils packaging packing preparation processing removing salting scales seafood seafoods shellfish shucking smoking
1539 1540 0.9021342 bones canning drying entrails eviscerating fats fins fish freezing fresh gathering heads marine oils packaging packing preparation processing removing salting scales seafood seafoods shellfish shucking smoking bones canning drying entrails eviscerating fats fins fish freezing fresh heads including marine oils packing processing removing salting scales seafood seafoods shellfish shucking smoking soup
127 125 0.8996469 accessories alterations basic fabric fabricating fabrics fiber fibers finishing hair hemming knitting lengthening letting notions piece preparation services shortening taking thread weaving yarns accessories alterations basic distribution fabric fabricating fabrics fibers finishing hair hemming knitting lengthening letting notions offers piece preparation services shortening specialises taking thread weaving wholesale yarns
125 127 0.8996469 accessories alterations basic distribution fabric fabricating fabrics fibers finishing hair hemming knitting lengthening letting notions offers piece preparation services shortening specialises taking thread weaving wholesale yarns accessories alterations basic fabric fabricating fabrics fiber fibers finishing hair hemming knitting lengthening letting notions piece preparation services shortening taking thread weaving yarns
1674 1666 0.8987170 burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal covers crabs fillets flounder frozen groundfish halibut herring offering pollock range rockfish salmon shellfish sockeye sole specialises steak steaks strips tuna wide
1674 1670 0.8987170 burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder frozen grocery groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna
1666 1674 0.8987170 burger canned cod cornmeal covers crabs fillets flounder frozen groundfish halibut herring offering pollock range rockfish salmon shellfish sockeye sole specialises steak steaks strips tuna wide burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1670 1674 0.8987170 burger canned cod cornmeal crabs fancy fillets fish flounder frozen grocery groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna burger canned cod cornmeal crabs fillets flounder frozen groundfish halibut herring pollock rockfish salmon shellfish sockeye sole steak steaks strips tuna
1354 1352 0.8947368 bass clams crabs crustaceans fish lobster mollusks offers oysters salmon sea seafood shellfish shrimp squid sword trout tuna vegetables bass catfish clams crabs crustaceans fish lobster mollusks oysters salmon sea shellfish shrimp squid sword tilapia trout tuna vegetables
1352 1354 0.8947368 bass catfish clams crabs crustaceans fish lobster mollusks oysters salmon sea shellfish shrimp squid sword tilapia trout tuna vegetables bass clams crabs crustaceans fish lobster mollusks offers oysters salmon sea seafood shellfish shrimp squid sword trout tuna vegetables
842 841 0.8944272 animals farm feeds prepared supplies animals farm feeds prepared
841 842 0.8944272 animals farm feeds prepared animals farm feeds prepared supplies
1675 1671 0.8944272 burger canned cornmeal crabs fillets fish flounder frozen groundfish halibut herring pollock salmon seafood shellfish sockeye steak steaks strips tuna burger canned cod cornmeal crabs fancy fillets fish flounder frozen groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna
1671 1675 0.8944272 burger canned cod cornmeal crabs fancy fillets fish flounder frozen groundfish halibut herring king pollock rockfish salmon seafood shellfish sockeye sole steak steaks strips tuna burger canned cornmeal crabs fillets fish flounder frozen groundfish halibut herring pollock salmon seafood shellfish sockeye steak steaks strips tuna
1993 1992 0.8944272 clams crabs lobsters mussels oysters sea shrimp urchins clams crabs fishes lobsters marine mussels oysters sea shrimp urchins
1992 1993 0.8944272 clams crabs fishes lobsters marine mussels oysters sea shrimp urchins clams crabs lobsters mussels oysters sea shrimp urchins

Regroup connected business

Simplified it to 102 Group of business. Group number 2 found to be densely connected whit 1169 business type, base one pairwise similarity of business description. Further classification required on Group 2.

Show the code
# Create an igraph object from your graph data
graph <- graph_from_data_frame(similar_pairs, directed = FALSE)


# Find the connected components in the graph
components <- components(graph)

# Get the membership of each node indicating its component
membership <- components$membership


# Count the number of nodes in each component
component_counts <- table(membership)

# Create a data frame with the component and count information
summary_table <- data.frame(Component = 1:length(component_counts),
                            Count = component_counts) 

summary_table <- summary_table  %>%
  rename(GroupNumber = Component, Count_business_type = Count.Freq) %>%
  select(GroupNumber,Count_business_type )%>%
  arrange(desc(Count_business_type))


# Print the summary table
head(summary_table, 200) %>%
  kbl(caption = "Preview of similar bussiness pair with similarity value more than 0.5") %>%
  kable_classic(full_width = F)  %>%
  scroll_box(width = "100%", height = "300px")
Preview of similar bussiness pair with similarity value more than 0.5
GroupNumber Count_business_type
2 1169
14 9
25 8
24 6
10 5
11 5
17 5
22 5
40 5
53 5
27 4
32 4
39 4
82 4
1 3
3 3
16 3
20 3
23 3
28 3
31 3
36 3
37 3
42 3
44 3
45 3
51 3
56 3
66 3
72 3
74 3
75 3
84 3
90 3
92 3
93 3
4 2
5 2
6 2
7 2
8 2
9 2
12 2
13 2
15 2
18 2
19 2
21 2
26 2
29 2
30 2
33 2
34 2
35 2
38 2
41 2
43 2
46 2
47 2
48 2
49 2
50 2
52 2
54 2
55 2
57 2
58 2
59 2
60 2
61 2
62 2
63 2
64 2
65 2
67 2
68 2
69 2
70 2
71 2
73 2
76 2
77 2
78 2
79 2
80 2
81 2
83 2
85 2
86 2
87 2
88 2
89 2
91 2
94 2
95 2
96 2
97 2
98 2
99 2
100 2
101 2
102 2
Show the code
# Remove the nodes belonging to component 2
graph_filtered <- delete.vertices(graph, V(graph)[membership == 2])

# Plot 
plot(graph_filtered,vertex.size=8, vertex.label=NA, layout = layout_with_gem, vertex.color="lightsteelblue2", main="Network Map without Group 2")

Show the code
# Extract the subgraph for component 2
subgraph <- induced_subgraph(graph, V(graph)[membership == 2])

# Plot
plot(subgraph,vertex.size=8, vertex.label=NA, vertex.color="lightsteelblue2", main="Network Map of Group 2")

Community grouping

Show the code
ceb <- cluster_edge_betweenness(subgraph) 


plot(ceb, subgraph, vertex.size=8, vertex.label=NA, main="Exploring Community detection based on edge betweenness for Group 2")