In the process of building business profiles on social media platforms, choosing the right businesses categories plays critical role as it helps potential customers find the business right away. However, the task is sometimes challenging and time consuming, especially when there are multiple platforms with their own list of categories. Further complicating things are the “hierarchies” in the category lists.  For example, Facebook has categories arranged across six levels while Yelp only has four. If a business wants to pick “Cantonese Restaurant”, the path will look like “Business -> Food & Beverage -> Restaurant -> Asian Restaurant ->Chinese Restaurant -> Cantonese Restaurant” on Facebook . While on Yelp , it looks like “Restaurant -> Chinese -> Cantonese”. Beyond creating difficulty for businesses, it’s also a problem for the ThriveHive Data Science team, as business category is critical parts in segmenting and understanding businesses. We need a robust framework to process and unify the information for further analysis and machine learning projects.

So how do we do that?

The first step is to build a tool so that our team and other stakeholders  can visually inspect the category structure of each platform. Not only help internally, it might also help business owners to get a complete view of those major social media platforms and make the selection easier. If one wants to make any decision or draw conclusions, it is better to start with exploration. And this is what this post is about; showing how to leverage a visualization to make exploration easier.

How do we visualize this?

One of the major hurdles to contend with is that these categories are hierarchical.  It's not enough to just list the categories off, we want to be able to navigate through the hierarchies, as described in the Cantonese Restaurant above.  One type of graph that accomplishes this in a condensed, easy-to-read fashioned is called a Flame Graph.  The designers of the implementation used it to visualize application resource usage, but it can easily be adapted to something like a category hierarchy.  All the category data displayed here are publicly available through API or official website.

The Tool

Here are the flame graphs that visualize the categories across 4 sources; North American Industrial Coding System (NAICS), Google My Places, Facebook, and Yelp.  A note about NAICS: The number at the end of the name indicates the level.  If you want to see more on these categories, check out the source here.  Go ahead and click around on the tool to explore!

Note: Each bar is sized by the number of sub-categories (not by the number of businesses)

You can find a pop-out version of this tool here.  The bar that spans across the entire bottom of the graph is the root which, in this case, represents the platform itself. You can hover over any box to explore the category name, and click on it to see its sub-categories, also called "children". As you move your way up, you are moving from a parent category into its child category; parents are lower on the y-axis, with nested categories (children) appearing higher on the y-axis. To go back, simply click on any parents or hit the "Reset Zoom" in the upper left corner.

Search functionality

If you don't want to click around to find a category of interest, try using the search feature (clicking "Search" in the top right).  Type in the category you're looking for and, if there are matches, it’ll highlight all the matching box part of the graph in pink. Note: The search is case sensitive, so you'll have to type "Restaurant" if you want restaurant listings.

For example, I thought my business would fall under ‘Chinese Restaurant’ but I am not sure if there is any categories would better describe my business on Facebook. To confirm, I simply type “Chinese Restaurant” on the search bar and it immediately points to me the search results in hot pink. With a bit more exploration, I found “Cantonese Restaurant” which, in my opinion, is a better option for my business.   Of course, we can do a more general search. Say, I am running a Cantonese restaurant but completely new to the business category on Facebook. To help myself set up appropriately, I type “Restaurant” on the search box and start navigate all the search returns. With highlights, I immediately found “Asian Restaurant” would be a better fit for my business compared to the general term “Restaurant”. Click on that,  it is obvious that “Chinese Restaurant”  nested in “Asian Restaurant” sounds more appropriate. With one more iteration, I found “Cantonese Restaurant” nested in “Chinese Restaurant”, which is representative to my core business.

If you’ve never seen or tried such tool before, it is now the best time to get it started. Click here  to access the full chart. It is built to help business owners to quickly and effectively pick the right business categories, attract right customers, and optimize your Google search results. It also helps our internal teams quickly navigate hierarchical data structure and draw insights.