DEV Community

RGEv1L
RGEv1L

Posted on

Graph Network Analysis

Introduction:

Market analysis has traditionally been the bedrock for companies for various purposes. If a company wants to;

  • Launch a new product
  • Check performance of an existing product
  • Find new markets
  • Evaluate existing markets

Market analysis is sort of an abstract layer from where you can extract trends in a demographic for certain index (topic) and co-relate with your own use-case. These co-relations can be 1:1, if your product/company seems to have competitors doing the similar thing in a market, or the company already have stakes in the market. If it is not the case, you have to extract a trend, compare it with your use-case in-terms of how much the abstracted-out trend can help you predict your own performance in that demographic/market.

Dataset: Nashville Meetup Network
meetup.com is a website for people organizing and attending regular or semi-regular events ("meet-ups"). The relationships amongst users—who goes to what meetups—are a social network, ideal for graph-based analysis.

Problem Confinement:
Examples involving a lot of factors that are super-connected must be done in graph. The rational for this is that you would find It computationally limited to run that many join operations for finding a connection and it also logically doesn’t make any sense to preserve what can easily be preserved and requires a lot of call to fetch it, with-in a data-structure.

Loading Data in Neo4j:
Loading Cities and States and appending relationship between them

Loading Members and adding relation to cities they live in
Image description

Loading Groups
Image description

Loading Categories of Groups
Image description

Adding Group relation with each category
Image description

Loading Organizing Members and attaching their “Organized” relationship with “Group”.
Image description

Loading Events and adding group as ”Conducted” which conducted that event.
Image description

Loading Members that participated in Events in groups
Image description

Loading Total Number of Members for each Group.
Image description

Visualizing Graph Schema:
Image description

“””
I have added members relationship to Group I both directions because that will make DB calls much more optimized when going left or right from members
“””

**

Querying:

**
Let's check which group category has the most members
Image description

Finding trends for cities (‘Franklin’)
Image description

Let’s find the groups with name ‘Cars & Motorcycles’ across all cities.
Image description

Finding number of events per city:
Image description

Finding ‘Tech’ events hosted by all of the cities:
Image description

**

Visual Inspection:

**
Let explore Categories of Groups; Games, Dancing and Education and see how many groups do they have
Image description

Let’s follow a trail for a particular group like ‘GEEK by AKEIN Engineering’ in Education.
Image description

We can see the ‘Members’ associated with group, Events done for this group and the organizer of this group as well.

Let’s pick a random person and see in which ‘City’ he lives.
Image description

So, this person lives in Nashville and share this location with 3 other group members as well.

**

Ending note:

**
With Graph technology, we can find the trends visually as well as programmatically. The bottom line is that preserving the connections within the structure is much more important. We can do trailing queries and segment our problem in areas we need and connect these links when needed for a particular use-case.

Top comments (0)