{"id":931,"date":"2011-11-03T18:48:09","date_gmt":"2011-11-04T01:48:09","guid":{"rendered":"http:\/\/miriamposner.com\/blog\/?p=931"},"modified":"2011-11-03T19:00:42","modified_gmt":"2011-11-04T02:00:42","slug":"customize-your-network-visualization","status":"publish","type":"post","link":"https:\/\/miriamposner.com\/blog\/customize-your-network-visualization\/","title":{"rendered":"Customize your network visualization"},"content":{"rendered":"<p><a href=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/Screen-Shot-2011-11-03-at-9.44.44-PM1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-936\" title=\"Screen Shot 2011-11-03 at 9.44.44 PM\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/Screen-Shot-2011-11-03-at-9.44.44-PM1-300x246.png\" alt=\"\" width=\"300\" height=\"246\" srcset=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/Screen-Shot-2011-11-03-at-9.44.44-PM1-300x246.png 300w, https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/Screen-Shot-2011-11-03-at-9.44.44-PM1.png 717w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>In my <a href=\"https:\/\/miriamposner.com\/blog\/?p=909\">last post<\/a>, I explained how you can visualize a network of film personnel (really, any kind of network) using Cytoscape. When I left off, we&#8217;d created a network visualization, but it didn&#8217;t look exactly terrific. Here&#8217;s how you can customize the look of your network visualization so that you can see what you need to see.<\/p>\n<div class=\"LessonContent\">\n<div class=\"LessonSummary\">\n<p>Let&#8217;s assume you&#8217;re starting with the default network view.<\/p>\n<p><!--more--><\/p>\n<\/div>\n<div class=\"LessonStep top\">\n<h2 class=\"StepTitle\"><span style=\"color: #db5043;\">Switch to the VizMapper pane<\/span><\/h2>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/media_1320277164769.png\" alt=\"media_1320277164769.png\" width=\"257\" height=\"339\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Click on the right-facing arrow next to the word <strong>Network<\/strong> to bring it up.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h2 class=\"StepTitle\"><span style=\"color: #db5043;\">Click on the source-target diagram<\/span><\/h2>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/media_1320277248692.png\" alt=\"media_1320277248692.png\" width=\"273\" height=\"127\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>This will bring up the appearance pane.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h2 class=\"StepTitle\"><span style=\"color: #db5043;\">Start playing with properties<\/span><\/h2>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/media_1320277338062.png\" alt=\"media_1320277338062.png\" width=\"540\" height=\"299\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Start by clicking on <strong>Node_Fill_Color<\/strong>. As you&#8217;ll see, you can customize lots of aspects of your diagram. By clicking to the Edge and Global panes, you can also change many characteristics of edges and overall colors.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h2 class=\"StepTitle\"><span style=\"color: #db5043;\">Looks pretty good!<\/span><\/h2>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/media_1320277731997.png\" alt=\"media_1320277731997.png\" width=\"540\" height=\"441\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Much easier to see! But at a glance, it&#8217;s hard to distinguish films from people. Let&#8217;s look at ways we can distinguish among the kinds of data we have.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h2 class=\"StepTitle\"><span style=\"color: #db5043;\">Create a node attributes file<\/span><\/h2>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/media_1320370130204.png\" alt=\"media_1320370130204.png\" width=\"226\" height=\"309\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Unfortunately, this is a little harder than it should be in Cytoscape.You have to create something called a node attribute file in order to tell Cytoscape to divide your nodes into two types: source nodes and target nodes.<\/p>\n<p>So head back to your original network spreadsheet and save it as something new. Delete your middle column &#8212; the one that has all the relationships in it. Then cut the entire contents of column B &#8212; the one with the film titles in it \u2014 and paste them into column A, below the names. The idea is to have one long column. Finally, in column B, type the word <strong>source<\/strong> for every person and <strong>target<\/strong> for every film. Label column A <strong>node_id<\/strong> and column B <strong>node_type<\/strong>.<\/p>\n<p>You&#8217;re welcome to use <a href=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/node_attributes.xls\">my spreadsheet<\/a> as an example.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h2 class=\"StepTitle\"><span style=\"color: #db5043;\">Import your node attributes<\/span><\/h2>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/media_1320278490174.png\" alt=\"media_1320278490174.png\" width=\"540\" height=\"353\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>Go to <strong>File<\/strong>, <strong>Import<\/strong>, and then <strong>Attribute from Table (Text\/MS Excel)&#8230; <\/strong>Select your file and click <strong>Import<\/strong>.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h2 class=\"StepTitle\"><span style=\"color: #db5043;\">Change the settings for individual attributes<\/span><\/h2>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/media_1320370602368.png\" alt=\"media_1320370602368.png\" width=\"253\" height=\"89\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>In the list of attributes under the words <strong>Visual Mapping Browser<\/strong>, click on <strong>Node Color<\/strong>. In the column on the right of Node Color, hoose <strong>node_type<\/strong>. Then, for <strong>Mapping Type<\/strong>, choose <strong>Discrete Mapping<\/strong>. Now you can specify different colors for the <strong>source<\/strong> nodes (the actors) and the <strong>target<\/strong> nodes (the films) by clicking on the ellipses (<strong>&#8230;<\/strong>) button.<\/p>\n<\/div>\n<\/div>\n<div class=\"LessonStep top\">\n<h2 class=\"StepTitle\"><span style=\"color: #db5043;\">Repeat until you&#8217;re happy!<\/span><\/h2>\n<div class=\"StepImage\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/miriamposner.com\/blog\/wp-content\/uploads\/2011\/11\/media_1320370956150.png\" alt=\"media_1320370956150.png\" width=\"540\" height=\"437\" \/><\/div>\n<div class=\"StepInstructions\">\n<p>You can repeat this process for lots of different variables, like <strong>Node Opacity<\/strong> and <strong>Node Size <\/strong>(use numbers for each of these values). Play around and see what you like! There&#8217;s no right way for your visualization to look. The idea is to explore your data and then present its interesting features as legibly as you can.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In my last post, I explained how you can visualize a network of film personnel (really, any kind of network) using Cytoscape. When I left off, we&#8217;d created a network visualization, but it didn&#8217;t look exactly terrific. Here&#8217;s how you can customize the look of your network visualization so that you can see what you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-931","post","type-post","status-publish","format-standard","hentry","category-tools"],"_links":{"self":[{"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/posts\/931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/comments?post=931"}],"version-history":[{"count":8,"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/posts\/931\/revisions"}],"predecessor-version":[{"id":942,"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/posts\/931\/revisions\/942"}],"wp:attachment":[{"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/media?parent=931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/categories?post=931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/miriamposner.com\/blog\/wp-json\/wp\/v2\/tags?post=931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}