Examples in Multiparadigm Data Science: ​
CommunityGraphPlot

A community analysis graph of a Reddit AMA shows connections among
machine-learned clusters of related questions, using textual data imported
through a curated service connection.
FindGraphCommunities and CommunityGraphPlot use performance-optimized machine learning
algorithms to analyze and display clusters in data retrieved with ServiceConnect.
Use ServiceConnect to retrieve data from the Reddit API:
In[1]:=
reddit=ServiceConnect["Reddit"];
Grab the text from the questions and comments of a specific AMA:
In[2]:=
AMAcomments=reddit["PostCommentsData","Post""https://www.reddit.com/r/IAmA/comments/qisot/im_stephen_wolfram_mathematica_nks_wolframalpha/",MaxItems500];​​questions=Most@AMAcomments["Comments"];
Use Nearest to group similar comments together:
In[3]:=
similarities=Flatten[Outer[Rule,{#},Nearest[DeleteCases[Normal[questions[All,"Body"]],#],#]]&/@Normal[questions[All,"Body"]]];
Plot the result using FindGraphCommunities and CommunityGraphPlot with a Tooltip to easily identify each element of text:
In[4]:=
graph=Graph[similarities,DirectedEdgesFalse,VertexLabelsPlaced["Name",Tooltip]];​​CommunityGraphPlot[#,FindGraphCommunities[#],CommunityRegionStyleDirective[Opacity[.2],Gray],CommunityBoundaryStyleDirective[Orange,Solid],Method"Hierarchical"]&[graph]
Out[4]=

Go Further:

Social Network Analysis »
Cluster Analysis »
Graphs & Networks »
Machine Learning »
Scientific Data Analysis »
Accessing External Services & APIs »