Graphical representation of connection of peopleObtaining Size Of Graphical ObjectsAdjacency List representation of a graphBuilding graph based on the cities connection?How to change the texture of the graphical objects?ListPlot connection problemRecreating a hierarchical graph from a compact representationGraphical issues with overlaid ParametricPlotsObtaining Feynman-like graphical representations from expressions with patternsGraphical representation of vector equationGraphical output problem when using ParametricPlot
Graphical representation of connection of people
Why do some professors with PhDs leave their professorships to teach high school?
How do I turn off a repeating trade?
Why doesn't a marching band have strings?
Source for "the land of Israel makes its inhabitants wise"
What's currently blocking the construction of the wall between Mexico and the US?
Links to webpages in books
Cascading Repair Costs following Blown Head Gasket on a 2004 Subaru Outback
Should I prioritize my 401(k) over my student loans?
Did Karl Marx ever use any example that involved cotton and dollars to illustrate the way capital and surplus value were generated?
How can I write 1105 as the sum of 2 squares other than 33 & 4?
First-year PhD giving a talk among well-established researchers in the field
How to make clear to people I don't want to answer their "Where are you from?" question?
Has there been any indication at all that further negotiation between the UK and EU is possible?
Is a single radon-daughter atom in air a solid?
Fill NAs in R with zero if the next valid data point is more than 2 intervals away
Can ADFS connect to other SSO services?
How dangerous are set-size assumptions?
Why is C++ initial allocation so much larger than C's?
How to split an equation in two lines?
How much will studying magic in an academy cost?
Intuition for capacitors in series
Is there a maximum distance from a planet that a moon can orbit?
Unusual mail headers, evidence of an attempted attack. Have I been pwned?
Graphical representation of connection of people
Obtaining Size Of Graphical ObjectsAdjacency List representation of a graphBuilding graph based on the cities connection?How to change the texture of the graphical objects?ListPlot connection problemRecreating a hierarchical graph from a compact representationGraphical issues with overlaid ParametricPlotsObtaining Feynman-like graphical representations from expressions with patternsGraphical representation of vector equationGraphical output problem when using ParametricPlot
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
I want to make a graphical representation of the people with the location, but coding is a little bit challenging.
Here is my input Person,Location,Influences
list = "John",
"Michigan", "Kelly", "Ralph", "James", "Kim", "Brown",
"Kelly", "Minnesota", "James", "Tim", "Kale",
"Texas", "Paul", "Claro", "Claro", "Texas", , "Ralph",
"France", "William", "Daniel", "Edwin",
"France", "William", "Kale";
and I want my output to be graphical image such as
What is a good way to start?
list-manipulation graphics graphs-and-networks
$endgroup$
add a comment |
$begingroup$
I want to make a graphical representation of the people with the location, but coding is a little bit challenging.
Here is my input Person,Location,Influences
list = "John",
"Michigan", "Kelly", "Ralph", "James", "Kim", "Brown",
"Kelly", "Minnesota", "James", "Tim", "Kale",
"Texas", "Paul", "Claro", "Claro", "Texas", , "Ralph",
"France", "William", "Daniel", "Edwin",
"France", "William", "Kale";
and I want my output to be graphical image such as
What is a good way to start?
list-manipulation graphics graphs-and-networks
$endgroup$
add a comment |
$begingroup$
I want to make a graphical representation of the people with the location, but coding is a little bit challenging.
Here is my input Person,Location,Influences
list = "John",
"Michigan", "Kelly", "Ralph", "James", "Kim", "Brown",
"Kelly", "Minnesota", "James", "Tim", "Kale",
"Texas", "Paul", "Claro", "Claro", "Texas", , "Ralph",
"France", "William", "Daniel", "Edwin",
"France", "William", "Kale";
and I want my output to be graphical image such as
What is a good way to start?
list-manipulation graphics graphs-and-networks
$endgroup$
I want to make a graphical representation of the people with the location, but coding is a little bit challenging.
Here is my input Person,Location,Influences
list = "John",
"Michigan", "Kelly", "Ralph", "James", "Kim", "Brown",
"Kelly", "Minnesota", "James", "Tim", "Kale",
"Texas", "Paul", "Claro", "Claro", "Texas", , "Ralph",
"France", "William", "Daniel", "Edwin",
"France", "William", "Kale";
and I want my output to be graphical image such as
What is a good way to start?
list-manipulation graphics graphs-and-networks
list-manipulation graphics graphs-and-networks
edited 7 hours ago
Mark R
2157 bronze badges
2157 bronze badges
asked 8 hours ago
Saesun KimSaesun Kim
7215 silver badges16 bronze badges
7215 silver badges16 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
You can use CommunityGraphPlot
after constructing an edge list and community structure based on list
:
edges = Flatten[Thread[First[#] -> Last[#]] & /@ list]
groups = GroupBy[list, #[[2]] &, Flatten[#[[All, 1, -1]]] &]
communities = Values@groups;
CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"], communities,
CommunityLabels -> Keys[groups],
CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
ImageSize->Large]
Not exactly the picture you have, but you can specify the community structure in the second argument (a partition the list of people) as you like.
$endgroup$
$begingroup$
Thank you for your answer. I do not know why it does not work in my MMA. hmm.
$endgroup$
– Saesun Kim
8 hours ago
$begingroup$
@SaesunKim what version/os are you using? Are you getting an error message?
$endgroup$
– kglr
8 hours ago
$begingroup$
I copied your code (nice solution) and CommunityGraphPlot isn't working for me with this code. The intermediate values seem fine. Am I doing something wrong? And I'm not getting an error message, but rather, CommunityGraphPlot isn't evaluating. I'm using V12.0.0 on a mac. If I just use CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"]] it seems fine.
$endgroup$
– Mark R
8 hours ago
$begingroup$
@kglr I am using version 11.0. I do not get any error message, and I can plot the CommunityGraphPlot. But when I the code, communicityGroupplot isn't working
$endgroup$
– Saesun Kim
8 hours ago
1
$begingroup$
Got it - you fixed a typo in the original that had "Claro" and "Calro". I did that and get your graph! It is this line in the original data: "Kale", "Texas", "Paul", "Calro"
$endgroup$
– Mark R
7 hours ago
|
show 3 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f200744%2fgraphical-representation-of-connection-of-people%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
You can use CommunityGraphPlot
after constructing an edge list and community structure based on list
:
edges = Flatten[Thread[First[#] -> Last[#]] & /@ list]
groups = GroupBy[list, #[[2]] &, Flatten[#[[All, 1, -1]]] &]
communities = Values@groups;
CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"], communities,
CommunityLabels -> Keys[groups],
CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
ImageSize->Large]
Not exactly the picture you have, but you can specify the community structure in the second argument (a partition the list of people) as you like.
$endgroup$
$begingroup$
Thank you for your answer. I do not know why it does not work in my MMA. hmm.
$endgroup$
– Saesun Kim
8 hours ago
$begingroup$
@SaesunKim what version/os are you using? Are you getting an error message?
$endgroup$
– kglr
8 hours ago
$begingroup$
I copied your code (nice solution) and CommunityGraphPlot isn't working for me with this code. The intermediate values seem fine. Am I doing something wrong? And I'm not getting an error message, but rather, CommunityGraphPlot isn't evaluating. I'm using V12.0.0 on a mac. If I just use CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"]] it seems fine.
$endgroup$
– Mark R
8 hours ago
$begingroup$
@kglr I am using version 11.0. I do not get any error message, and I can plot the CommunityGraphPlot. But when I the code, communicityGroupplot isn't working
$endgroup$
– Saesun Kim
8 hours ago
1
$begingroup$
Got it - you fixed a typo in the original that had "Claro" and "Calro". I did that and get your graph! It is this line in the original data: "Kale", "Texas", "Paul", "Calro"
$endgroup$
– Mark R
7 hours ago
|
show 3 more comments
$begingroup$
You can use CommunityGraphPlot
after constructing an edge list and community structure based on list
:
edges = Flatten[Thread[First[#] -> Last[#]] & /@ list]
groups = GroupBy[list, #[[2]] &, Flatten[#[[All, 1, -1]]] &]
communities = Values@groups;
CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"], communities,
CommunityLabels -> Keys[groups],
CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
ImageSize->Large]
Not exactly the picture you have, but you can specify the community structure in the second argument (a partition the list of people) as you like.
$endgroup$
$begingroup$
Thank you for your answer. I do not know why it does not work in my MMA. hmm.
$endgroup$
– Saesun Kim
8 hours ago
$begingroup$
@SaesunKim what version/os are you using? Are you getting an error message?
$endgroup$
– kglr
8 hours ago
$begingroup$
I copied your code (nice solution) and CommunityGraphPlot isn't working for me with this code. The intermediate values seem fine. Am I doing something wrong? And I'm not getting an error message, but rather, CommunityGraphPlot isn't evaluating. I'm using V12.0.0 on a mac. If I just use CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"]] it seems fine.
$endgroup$
– Mark R
8 hours ago
$begingroup$
@kglr I am using version 11.0. I do not get any error message, and I can plot the CommunityGraphPlot. But when I the code, communicityGroupplot isn't working
$endgroup$
– Saesun Kim
8 hours ago
1
$begingroup$
Got it - you fixed a typo in the original that had "Claro" and "Calro". I did that and get your graph! It is this line in the original data: "Kale", "Texas", "Paul", "Calro"
$endgroup$
– Mark R
7 hours ago
|
show 3 more comments
$begingroup$
You can use CommunityGraphPlot
after constructing an edge list and community structure based on list
:
edges = Flatten[Thread[First[#] -> Last[#]] & /@ list]
groups = GroupBy[list, #[[2]] &, Flatten[#[[All, 1, -1]]] &]
communities = Values@groups;
CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"], communities,
CommunityLabels -> Keys[groups],
CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
ImageSize->Large]
Not exactly the picture you have, but you can specify the community structure in the second argument (a partition the list of people) as you like.
$endgroup$
You can use CommunityGraphPlot
after constructing an edge list and community structure based on list
:
edges = Flatten[Thread[First[#] -> Last[#]] & /@ list]
groups = GroupBy[list, #[[2]] &, Flatten[#[[All, 1, -1]]] &]
communities = Values@groups;
CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"], communities,
CommunityLabels -> Keys[groups],
CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
ImageSize->Large]
Not exactly the picture you have, but you can specify the community structure in the second argument (a partition the list of people) as you like.
edited 8 hours ago
answered 8 hours ago
kglrkglr
200k10 gold badges229 silver badges455 bronze badges
200k10 gold badges229 silver badges455 bronze badges
$begingroup$
Thank you for your answer. I do not know why it does not work in my MMA. hmm.
$endgroup$
– Saesun Kim
8 hours ago
$begingroup$
@SaesunKim what version/os are you using? Are you getting an error message?
$endgroup$
– kglr
8 hours ago
$begingroup$
I copied your code (nice solution) and CommunityGraphPlot isn't working for me with this code. The intermediate values seem fine. Am I doing something wrong? And I'm not getting an error message, but rather, CommunityGraphPlot isn't evaluating. I'm using V12.0.0 on a mac. If I just use CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"]] it seems fine.
$endgroup$
– Mark R
8 hours ago
$begingroup$
@kglr I am using version 11.0. I do not get any error message, and I can plot the CommunityGraphPlot. But when I the code, communicityGroupplot isn't working
$endgroup$
– Saesun Kim
8 hours ago
1
$begingroup$
Got it - you fixed a typo in the original that had "Claro" and "Calro". I did that and get your graph! It is this line in the original data: "Kale", "Texas", "Paul", "Calro"
$endgroup$
– Mark R
7 hours ago
|
show 3 more comments
$begingroup$
Thank you for your answer. I do not know why it does not work in my MMA. hmm.
$endgroup$
– Saesun Kim
8 hours ago
$begingroup$
@SaesunKim what version/os are you using? Are you getting an error message?
$endgroup$
– kglr
8 hours ago
$begingroup$
I copied your code (nice solution) and CommunityGraphPlot isn't working for me with this code. The intermediate values seem fine. Am I doing something wrong? And I'm not getting an error message, but rather, CommunityGraphPlot isn't evaluating. I'm using V12.0.0 on a mac. If I just use CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"]] it seems fine.
$endgroup$
– Mark R
8 hours ago
$begingroup$
@kglr I am using version 11.0. I do not get any error message, and I can plot the CommunityGraphPlot. But when I the code, communicityGroupplot isn't working
$endgroup$
– Saesun Kim
8 hours ago
1
$begingroup$
Got it - you fixed a typo in the original that had "Claro" and "Calro". I did that and get your graph! It is this line in the original data: "Kale", "Texas", "Paul", "Calro"
$endgroup$
– Mark R
7 hours ago
$begingroup$
Thank you for your answer. I do not know why it does not work in my MMA. hmm.
$endgroup$
– Saesun Kim
8 hours ago
$begingroup$
Thank you for your answer. I do not know why it does not work in my MMA. hmm.
$endgroup$
– Saesun Kim
8 hours ago
$begingroup$
@SaesunKim what version/os are you using? Are you getting an error message?
$endgroup$
– kglr
8 hours ago
$begingroup$
@SaesunKim what version/os are you using? Are you getting an error message?
$endgroup$
– kglr
8 hours ago
$begingroup$
I copied your code (nice solution) and CommunityGraphPlot isn't working for me with this code. The intermediate values seem fine. Am I doing something wrong? And I'm not getting an error message, but rather, CommunityGraphPlot isn't evaluating. I'm using V12.0.0 on a mac. If I just use CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"]] it seems fine.
$endgroup$
– Mark R
8 hours ago
$begingroup$
I copied your code (nice solution) and CommunityGraphPlot isn't working for me with this code. The intermediate values seem fine. Am I doing something wrong? And I'm not getting an error message, but rather, CommunityGraphPlot isn't evaluating. I'm using V12.0.0 on a mac. If I just use CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"]] it seems fine.
$endgroup$
– Mark R
8 hours ago
$begingroup$
@kglr I am using version 11.0. I do not get any error message, and I can plot the CommunityGraphPlot. But when I the code, communicityGroupplot isn't working
$endgroup$
– Saesun Kim
8 hours ago
$begingroup$
@kglr I am using version 11.0. I do not get any error message, and I can plot the CommunityGraphPlot. But when I the code, communicityGroupplot isn't working
$endgroup$
– Saesun Kim
8 hours ago
1
1
$begingroup$
Got it - you fixed a typo in the original that had "Claro" and "Calro". I did that and get your graph! It is this line in the original data: "Kale", "Texas", "Paul", "Calro"
$endgroup$
– Mark R
7 hours ago
$begingroup$
Got it - you fixed a typo in the original that had "Claro" and "Calro". I did that and get your graph! It is this line in the original data: "Kale", "Texas", "Paul", "Calro"
$endgroup$
– Mark R
7 hours ago
|
show 3 more comments
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f200744%2fgraphical-representation-of-connection-of-people%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown