Graphical representation of connection of peopleObtaining Size Of Graphical ObjectsAdjacency List...

Folding basket - is there such a thing?

How dangerous are set-size assumptions?

How can I write 1105 as the sum of 2 squares other than 33 & 4?

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 White Castle?

3D Crossword, Cryptic, Statue View & Maze

The Target Principal Name Is Incorrect. Cannot Generate SSPI Context (SQL or AD Issue)?

Why is C++ initial allocation so much larger than C's?

Should developer taking test phones home or put in office?

Impossible darts scores

“D’entre eux” to mean “of them”

Swapping rooks in a 4x4 board

How to make clear to people I don't want to answer their "Where are you from?" question?

What is the legal status of travelling with methadone in your carry-on?

Can Ogre clerics use Purify Food and Drink on humanoid characters?

How can I politely work my way around not liking coffee or beer when it comes to professional networking?

First-year PhD giving a talk among well-established researchers in the field

Is it damaging to turn off a small fridge for two days every week?

How do I turn off a repeating trade?

Hot coffee brewing solutions for deep woods camping

How would a drone work in centrifugal force generated "gravity"?

If the world have massive single giant world tree can it stop earthquake?

How was Hillel permitted to go to the skylight to hear the shiur



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;
}







2












$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



enter image description here



What is a good way to start?










share|improve this question











$endgroup$



















    2












    $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



    enter image description here



    What is a good way to start?










    share|improve this question











    $endgroup$















      2












      2








      2





      $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



      enter image description here



      What is a good way to start?










      share|improve this question











      $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



      enter image description here



      What is a good way to start?







      list-manipulation graphics graphs-and-networks






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      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






















          1 Answer
          1






          active

          oldest

          votes


















          4












          $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}]]] &]

          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
          ImageSize->Large]


          enter image description here



          An alternative definition of groups produces something closer to your picture:



          groups = GroupBy[list, #[[2]] &, #[[All, 1]] &];
          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #] & /@ RandomColor[Length @ Keys @ groups]),
          ImageSize -> Large] /. BezierCurve -> ( Line[#[[{1, -1}]]] &)


          enter image description here






          share|improve this answer











          $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
            8 hours ago
















          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
          });


          }
          });














          draft saved

          draft discarded


















          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









          4












          $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}]]] &]

          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
          ImageSize->Large]


          enter image description here



          An alternative definition of groups produces something closer to your picture:



          groups = GroupBy[list, #[[2]] &, #[[All, 1]] &];
          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #] & /@ RandomColor[Length @ Keys @ groups]),
          ImageSize -> Large] /. BezierCurve -> ( Line[#[[{1, -1}]]] &)


          enter image description here






          share|improve this answer











          $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
            8 hours ago


















          4












          $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}]]] &]

          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
          ImageSize->Large]


          enter image description here



          An alternative definition of groups produces something closer to your picture:



          groups = GroupBy[list, #[[2]] &, #[[All, 1]] &];
          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #] & /@ RandomColor[Length @ Keys @ groups]),
          ImageSize -> Large] /. BezierCurve -> ( Line[#[[{1, -1}]]] &)


          enter image description here






          share|improve this answer











          $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
            8 hours ago
















          4












          4








          4





          $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}]]] &]

          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
          ImageSize->Large]


          enter image description here



          An alternative definition of groups produces something closer to your picture:



          groups = GroupBy[list, #[[2]] &, #[[All, 1]] &];
          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #] & /@ RandomColor[Length @ Keys @ groups]),
          ImageSize -> Large] /. BezierCurve -> ( Line[#[[{1, -1}]]] &)


          enter image description here






          share|improve this answer











          $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}]]] &]

          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #]& /@ RandomColor[Length@Keys@groups]),
          ImageSize->Large]


          enter image description here



          An alternative definition of groups produces something closer to your picture:



          groups = GroupBy[list, #[[2]] &, #[[All, 1]] &];
          CommunityGraphPlot[Graph[edges, VertexLabels -> "Name"],
          Values @ groups,
          CommunityLabels -> Keys[groups],
          CommunityRegionStyle -> (Opacity[.5, #] & /@ RandomColor[Length @ Keys @ groups]),
          ImageSize -> Large] /. BezierCurve -> ( Line[#[[{1, -1}]]] &)


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 4 mins 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
            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$
            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
            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$
          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
          8 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
          8 hours ago




















          draft saved

          draft discarded




















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...