|
| 1 | += Creating a network from a table of entities and their attributes |
| 2 | +Clément Levallois <clementlevallois@gmail.com> |
| 3 | +2017-02-22 |
| 4 | + |
| 5 | +last modified: {docdate} |
| 6 | + |
| 7 | +:icons: font |
| 8 | +:iconsfont: font-awesome |
| 9 | +:revnumber: 1.0 |
| 10 | +:example-caption!: |
| 11 | +ifndef::imagesdir[:imagesdir: ../../images] |
| 12 | +ifndef::sourcedir[:sourcedir: ../../../../main/java] |
| 13 | + |
| 14 | +:title-logo-image: gephi-logo-2010-transparent.png[width="450" align="center"] |
| 15 | + |
| 16 | +image::gephi-logo-2010-transparent.png[width="450" align="center"] |
| 17 | + |
| 18 | +//ST: 'Escape' or 'o' to see all sides, F11 for full screen, 's' for speaker notes |
| 19 | + |
| 20 | + |
| 21 | +== Presentation of the plugin |
| 22 | +//ST: Presentation of the plugin |
| 23 | + |
| 24 | +//ST: ! |
| 25 | + |
| 26 | +This plugin is created by https://www.clementlevallois.net[Clement Levallois]. |
| 27 | + |
| 28 | +It converts a spreadsheet or a csv file into a network. |
| 29 | + |
| 30 | +//ST: ! |
| 31 | + |
| 32 | +This plugin enables you to: |
| 33 | + |
| 34 | +* Start from a data table in Excel or csv format |
| 35 | +* In the data table, nodes are the entities listed in column A |
| 36 | +* Nodes' attributes must be listed in columns B, C, D, etc. |
| 37 | +* Connections will be created between nodes, when they have identical attributes. |
| 38 | +* Attributes can have values, stored in columns right next to the attribute. |
| 39 | + |
| 40 | +//ST: ! |
| 41 | +==== 1. The input |
| 42 | +//ST: ! |
| 43 | + |
| 44 | +image::https://docs.google.com/drawings/d/1TkShesrj6PsObLdj3fCMLScxTXJgopxTEICPv8CPd4Y/pub?w=840&h=887[align="center", title="An Excel file"] |
| 45 | + |
| 46 | + |
| 47 | +//ST: ! |
| 48 | +==== 2. The output |
| 49 | +//ST: ! |
| 50 | + |
| 51 | +image::en/similarity-computer/result.png[align="center", title="Resulting network"] |
| 52 | + |
| 53 | +== Installing the plugin |
| 54 | +//ST: Installing the plugin |
| 55 | +//ST: ! |
| 56 | + |
| 57 | +image::https://docs.google.com/drawings/d/1dgcXEC-nrQQtLvEtSLCrzKXfAdi2Hy1jCslyf2ky20A/pub?w=956&h=530[align="center", title="Choose the menu Tools then Plugins"] |
| 58 | + |
| 59 | +//ST: ! |
| 60 | + |
| 61 | +image::https://docs.google.com/drawings/d/1u4LqlnQby5DQVmq4csZ6f7sq_Z33F33UqtBZ43eh4pc/pub?w=645&h=406[align="center", title="Click on the tab Available Plugins"] |
| 62 | + |
| 63 | +//ST: ! |
| 64 | + |
| 65 | +image::https://docs.google.com/drawings/d/18hovYg9G5ek39rILj-aRlEpaWnN6doQeg15iX6lU0aY/pub?w=833&h=543[align="center", title="Install the plugin then restart Gephi"] |
| 66 | + |
| 67 | +== Opening the plugin |
| 68 | +//ST: Opening the plugin |
| 69 | +//ST: ! |
| 70 | + |
| 71 | +image::https://docs.google.com/drawings/d/1eu5O9KiGDAXJSkQuXHYq37T8vSvlZCPMgjwpa4C4Bh4/pub?w=1423&h=851[align="center", title="Open the plugin via the menu File - Import"] |
| 72 | + |
| 73 | +== Using the plugin |
| 74 | +//ST: Using the plugin |
| 75 | + |
| 76 | +//ST: ! |
| 77 | +==== First panel |
| 78 | +//ST: ! |
| 79 | + |
| 80 | +image::https://docs.google.com/drawings/d/1T1MfrbkD-0JXU0gJittis1SzC6oTS3TzN2NqwkKtRVE/pub?w=1412&h=920[align="center", title="Select a file"] |
| 81 | + |
| 82 | +//ST: Is your file with a header? |
| 83 | + |
| 84 | +//ST: ! |
| 85 | + |
| 86 | +image::en/similarity-computer/file-without-header-en.png[align="center", title="A file without headers"] |
| 87 | + |
| 88 | +//ST: ! |
| 89 | + |
| 90 | +image::en/similarity-computer/file-with-header-en.png[align="center", title="A file with headers"] |
| 91 | + |
| 92 | +//ST: ! |
| 93 | +==== Second panel |
| 94 | +//ST: ! |
| 95 | + |
| 96 | +image::en/similarity-computer/plugin-4-en.png[align="center", title="Parameter for weight"] |
| 97 | + |
| 98 | +//ST: ! |
| 99 | +==== Third panel |
| 100 | +//ST: ! |
| 101 | + |
| 102 | +image::en/similarity-computer/plugin-5-en.png[align="center", title="Confirmation panel"] |
| 103 | + |
| 104 | +== How is the similarity computed, exactly? |
| 105 | +//ST: How is the similarity computed, exactly? |
| 106 | +//ST: ! |
| 107 | + |
| 108 | +We use the cosine similarity. Sounds complicated, but it is not. http://stackoverflow.com/questions/1746501/can-someone-give-an-example-of-cosine-similarity-in-a-very-simple-graphical-wa[Check here]. |
| 109 | + |
| 110 | +The source code for the cosine calculation is in this https://github.com/gephi/gephi-plugins/blob/master-forge/modules/SimilarityComputer/src/main/java/net/clementlevallois/computer/CosineCalculation.java[file], at https://github.com/gephi/gephi-plugins/blob/master-forge/modules/SimilarityComputer/src/main/java/net/clementlevallois/computer/CosineCalculation.java#L110[this place]. |
| 111 | + |
| 112 | +== FAQ / special notes on the plugin |
| 113 | +//ST: FAQ / special notes on the plugin |
| 114 | +//ST: ! |
| 115 | + |
| 116 | +==== 1. Excel files should be .xlsx, not .xls |
| 117 | + |
| 118 | +Because they represent two slightly different files formats, and the plugin supports only .xlsx |
| 119 | + |
| 120 | +//ST: ! |
| 121 | + |
| 122 | +==== 2. csv files are ok. |
| 123 | + |
| 124 | +If you select a http://www.computerhope.com/issues/ch001356.htm[csv file], you will be asked to indicate the field delimiter and optionally the text delimiter. |
| 125 | + |
| 126 | +image::en/similarity-computer/plugin-6-en.png[align="center", title="When a csv file is selected"] |
| 127 | + |
| 128 | +//ST: ! |
| 129 | + |
| 130 | +==== 3. You can't use numerical values in the attributes |
| 131 | + |
| 132 | +image::en/similarity-computer/numerical-attributes-en.png[align="center", title="Age is a numerical attribute"] |
| 133 | + |
| 134 | +This is too bad. If there is enough demand for it I'll add this feature, which is not trivial. |
| 135 | + |
| 136 | +//ST: ! |
| 137 | + |
| 138 | +==== 4. Each entity should appear only on one line |
| 139 | + |
| 140 | +image::en/similarity-computer/plugin-7-en.png[align="center", title="An entity appearing twice"] |
| 141 | + |
| 142 | +David appears on lines 2 and 5 (because he made two purchases). Only the latest line where David appears (line 5) will be taken into account. |
| 143 | + |
| 144 | +== The end |
| 145 | +//ST: The end! |
| 146 | + |
| 147 | +Visit https://www.facebook.com/groups/gephi/[the Gephi group on Facebook] to get help, |
| 148 | + |
| 149 | +or visit https://seinecle.github.io/gephi-tutorials/[the website for more tutorials] |
0 commit comments