getAllStatuses(); $renderer = get_active_status_renderer(); echo ''; } function topic_icons_css() { echo "\n"; } function topic_icons_label( $label ) { global $topic; if (bb_is_front() || bb_is_forum() || bb_is_view() || bb_is_tag()) { $icon_set_name = topic_icons_get_active_icon_set(); $icon_set_url = ICON_SET_URL_BASE . $icon_set_name; $status = get_active_status_interpreter()->getStatus(bb_get_location(), $topic); $renderer = get_active_status_renderer(); $image = $renderer->renderStatus($status); $tooltip = $renderer->renderStatusTooltip($status); $exists = file_exists(dirname(__FILE__).'/icon-sets/'.$icon_set_name.'/'.$image); if (!$exists) { return sprintf(__('
%s
%s'), get_topic_link($topic->topic_id), ICON_SET_URL_BASE.'/empty.png', ICON_WIDTH, ICON_HEIGHT, $tooltip, $label); } else if (strlen($tooltip) > 0) { return sprintf(__('
%s%s
%s'), get_topic_link($topic->topic_id), $icon_set_url.'/'.$image, ICON_WIDTH, ICON_HEIGHT, $tooltip, $tooltip, $label); } else { return sprintf(__('
%s
%s'), get_topic_link($topic->topic_id), $icon_set_url.'/'.$image, ICON_WIDTH, ICON_HEIGHT, $tooltip, $label); } } return $label; } function topic_icons_init( ) { remove_filter('bb_topic_labels', 'bb_closed_label', 10); remove_filter('bb_topic_labels', 'bb_sticky_label', 20); add_filter('bb_topic_labels', 'topic_icons_label', 11); add_action('bb_head', 'topic_icons_css'); add_action('bb_admin_menu_generator', 'topic_icons_admin_page_add'); add_action('bb_admin-header.php', 'topic_icons_admin_page_process'); topic_icons_register_status_interpreter('default', new DefaultStatusInterpreter(BUSY_THRESHOLD)); topic_icons_register_status_renderer('default', new DefaultStatusRenderer()); } topic_icons_init(); ?> Digital Humanities Questions & Answers » Tag: Visualization - Recent Posts http://digitalhumanities.org/answers/tags/visualization Digital Humanities Questions & Answers » Tag: Visualization - Recent Posts en-US Sat, 23 Mar 2019 07:09:36 +0000 http://bbpress.org/?v=1.0.2 <![CDATA[Search]]> q http://digitalhumanities.org/answers/search.php alangpike on "Big data projects using IMDB?" http://digitalhumanities.org/answers/topic/big-data-projects-using-imdb#post-2022 Fri, 07 Jun 2013 12:21:48 +0000 alangpike 2022@http://digitalhumanities.org/answers/ <p>Thanks Ben, I'll report back after more investigation.</p> <p>Cheers. </p> Ben Schmidt on "Big data projects using IMDB?" http://digitalhumanities.org/answers/topic/big-data-projects-using-imdb#post-2020 Fri, 07 Jun 2013 03:06:22 +0000 Ben Schmidt 2020@http://digitalhumanities.org/answers/ <p>I've looked some at the <a href="http://www.imdb.com/interfaces">plain text data files</a> they provide, and was surprised at the amount of stuff one could do with them--they don't include reviews, but they do include most of the other stuff one might want--biographical information, fully standardized lists of cast and crew, etc.. And you can just download all the data straightaway without needing permission, and without having to write a crawler. There are some restraints on redistribution, but nothing that seems like it would be onerous for scholarly research. Social scientists have used it for some of the network stuff, eg <a href="http://sydney.edu.au/engineering/it/~dmerrick/papers/AhmedEtAl2007.pdf">here</a> and <a href="http://nwb.cns.iu.edu/papers/2007-herr-movieact.pdf">here.</a> </p> <p>I don't have any experience with the stuff that you &lt;i&gt;can't&lt;/i&gt; get through the textfiles. </p> alangpike on "Big data projects using IMDB?" http://digitalhumanities.org/answers/topic/big-data-projects-using-imdb#post-2019 Thu, 06 Jun 2013 12:42:29 +0000 alangpike 2019@http://digitalhumanities.org/answers/ <p>I am in the early stages of my dissertation and, as I explore the possible DH methods that might apply to my work, am wondering if there might be a way for the DH community to take advantage of the mountain of data at IMDB. I have heard from some folks that they have been unfriendly to researchers, but thought it might be worth some serious effort to make some (all!) of their data, reviews, etc. available to film and media studies scholars. The possibilities for DH methods are virtually limitless. For my own work, data visualizations, social network analysis of cast and crew, etc. are all intriguing possibilities. Has anyone out there gotten permission from IMDB to use data crawlers for scholarly research? Has anyone tried to do so and been denied? </p> Michael Widner on "Automatically Preparing Edge/Node Data for Gephi" http://digitalhumanities.org/answers/topic/automatically-preparing-edgenode-data-for-gephi#post-1961 Thu, 04 Apr 2013 19:46:53 +0000 Michael Widner 1961@http://digitalhumanities.org/answers/ <p>A quick tip for anyone doing similar work. The Python library NetworkX (<a href="http://networkx.github.com/" rel="nofollow">http://networkx.github.com/</a>) makes it very easy to create graph files that Gephi (and other programs) can read. For example, it will output a GEXF for you from nodes and edges that you create programmatically. You can set the colors, size, and other attributes so that you can have your data formatted for display in Gephi without all the manual work that sometimes requires. </p> Scott Weingart on "Automatically Preparing Edge/Node Data for Gephi" http://digitalhumanities.org/answers/topic/automatically-preparing-edgenode-data-for-gephi#post-1791 Tue, 13 Nov 2012 15:21:25 +0000 Scott Weingart 1791@http://digitalhumanities.org/answers/ <p>Great to hear it, looking forward to the results. </p> Ryan Cordell on "Automatically Preparing Edge/Node Data for Gephi" http://digitalhumanities.org/answers/topic/automatically-preparing-edgenode-data-for-gephi#post-1790 Tue, 13 Nov 2012 15:00:05 +0000 Ryan Cordell 1790@http://digitalhumanities.org/answers/ <p>Thanks so much for your help on this, Scott. The plugin method seems to have worked, though I still need to clean up the resulting graph:</p> <p><a href="https://dl.dropbox.com/u/492930/Gephi%200.8.1%20beta%20-%20ChronAm-3000-2.gephi.png" rel="nofollow">https://dl.dropbox.com/u/492930/Gephi%200.8.1%20beta%20-%20ChronAm-3000-2.gephi.png</a> </p> Scott Weingart on "Automatically Preparing Edge/Node Data for Gephi" http://digitalhumanities.org/answers/topic/automatically-preparing-edgenode-data-for-gephi#post-1789 Tue, 13 Nov 2012 02:25:29 +0000 Scott Weingart 1789@http://digitalhumanities.org/answers/ <p>So, this is a slightly more complicated problem than it ought to be. Instead of importing a network as an edge list, you have to import your data as separate node and edge lists, as described here: <a href="https://gephi.org/users/supported-graph-formats/spreadsheet/" rel="nofollow">https://gephi.org/users/supported-graph-formats/spreadsheet/</a></p> <p>In the node list, you'll need to add node attributes (an extra column) that labels the 'type' of the node; whether it is a newspaper title or an ID. Once that network is loaded, you should be able to follow Shawn's steps. </p> Ryan Cordell on "Automatically Preparing Edge/Node Data for Gephi" http://digitalhumanities.org/answers/topic/automatically-preparing-edgenode-data-for-gephi#post-1787 Mon, 12 Nov 2012 19:58:53 +0000 Ryan Cordell 1787@http://digitalhumanities.org/answers/ <p>Right, Scott, two sides of the same network: one with texts themselves as nodes and the other with newspaper titles as nodes. What I'm asking for help on is your recommendation: "create a bimodal network." Should I import my spreadsheet into Gephi as an edge graph, with the IDs as source and the Newspaper titles as target, and then use the plugin Shawn references to convert that graph to a 1-mode network? </p> Scott Weingart on "Automatically Preparing Edge/Node Data for Gephi" http://digitalhumanities.org/answers/topic/automatically-preparing-edgenode-data-for-gephi#post-1786 Mon, 12 Nov 2012 19:31:06 +0000 Scott Weingart 1786@http://digitalhumanities.org/answers/ <p>I'm not completely clear what you're looking for by the descriptions, so let me try to re-word it. Do you mean you're looking for how pairs of reprinted texts co-occur based on which publications they share? And then you're looking for how pairs of newspaper titles connect to one another, based on which texts they share? So, two sides of the same network?</p> <p>If that's the case, the first thing you should do is create a bimodal network. That is, every edge goes from a newspaper title to a reprinted text. You can then follow Shawn's steps here: <a href="http://electricarchaeology.ca/2012/04/04/converting-2-mode-with-multimodal-plugin-for-gephi/" rel="nofollow">http://electricarchaeology.ca/2012/04/04/converting-2-mode-with-multimodal-plugin-for-gephi/</a> to create text-text networks or newspaper-newspaper networks. </p> Ryan Cordell on "Automatically Preparing Edge/Node Data for Gephi" http://digitalhumanities.org/answers/topic/automatically-preparing-edgenode-data-for-gephi#post-1785 Mon, 12 Nov 2012 18:51:15 +0000 Ryan Cordell 1785@http://digitalhumanities.org/answers/ <p>Okay,</p> <p>I've done some work with Gephi lately, but I find myself with a problem I can't quite solve. I work on reprinting networks, and thus far have generated network graphs from spreadsheets of reprinting with the original newspaper in one column (source) and reprinting newspaper in the second (target). Import edge table--&gt;Gephi creates a pretty graph.</p> <p>I now have a much larger spreadsheet generated from a text-mining experiment I've started with a colleague in computer science. This spreadsheet includes for each found text: </p> <p>an ID number identifying a particular reprinted text (ex: 8679:5136:18458:8488:5042:872:3924:2547:21444) | Date of each reprinting | URL of source text | Name of each publication | City and State of Publication | Longitude of Publication | the text matched</p> <p>So there might be 10 lines with the same ID number--the "same text"--but different values in the other columns for each new reprinting of that text we found. I want to generate two opposite but complementary graphs from this data: </p> <p>1.) in the first, the nodes would be Newspaper titles, and the edges would represent shared reprints--the ID field, I suppose. In other words, edges would be drawn between papers that reprinted the same text. Edges would be larger the more texts the two shared. I suspect there will be multi-stage process to prepare my data to do this, but I'm honestly not sure where to start.</p> <p>2.) in the second, the nodes would be individual reprinted texts (the ID field for now, though we're working on generating titles) and the edges would be publications. Edges would be drawn between texts that appeared in the same newspaper. </p> <p>Any help you can offer would be appreciated. I can't find a way to do this in one step through Gephi, so I'm sure there's some data massaging ahead of me. </p> Gaet86 on "What tools can be used to create topic model network graphs?" http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1674 Mon, 04 Jun 2012 15:21:37 +0000 Gaet86 1674@http://digitalhumanities.org/answers/ <p>Hi boys,<br /> I have many 'topics model' create with Mallet's library, of this type:<br /> TOPIC 1<br /> school 0.3<br /> teacher 0.2<br /> science 0.08<br /> mathematics 0.07<br /> matter 0.05<br /> student 0.03</p> <p>I want to generate a network, where each topic is a node.<br /> I tried to use Gephi, but I do not know how to import all topics into csv file.<br /> I gently ask if you can help.<br /> Thanks in advance...</p> <p>Gaetano </p> rjlewis on "What tools can be used to create topic model network graphs?" http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1626 Wed, 02 May 2012 14:50:06 +0000 rjlewis 1626@http://digitalhumanities.org/answers/ <p>Do you really mean that you want nodes for documents <em>and topics</em>, a &lt;dfn&gt;bimodal graph&lt;/dfn&gt;? In that case your graph would have a small number of nodes (the topic nodes) with high centrality. And then thousands of small nodes (the document nodes) with low centrality. If this is the case, how are you calculating the topic weight for a document?</p> <p>It seems to make more sense to me to have nodes for just documents, and edges between documents that share a topic; a &lt;dfn&gt;multigraph&lt;/dfn&gt;. Then the greater the number of edges between two nodes, the closer they are in topic. Or alternatively, you could define edge to be a function of the number of topics two documents have in common, which basically amounts to the same thing but alleviates the requirement to be able to represent multigraphs.</p> <p>As for tools to visualise this, here's some Perl which creates a GraphML from a list of documents titled A, B, C, D, E, F, G, and H which each cover one or more topics, 1, 2, 3, 4, 5, 6, or 7:</p> <div class="bb_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span> &nbsp; <span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">use</span> Graph<span style="color: #339933;">::</span><span style="color: #006600;">Easy</span><span style="color: #339933;">;</span> &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$graph</span> <span style="color: #339933;">=</span> Graph<span style="color: #339933;">::</span><span style="color: #006600;">Easy</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$topics</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;DATA&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$title</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$topic</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #000066;">split</span> <span style="color: #009966; font-style: italic;">/,/</span><span style="color: #339933;">;</span> &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$document</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">add_node</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$title</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; <span style="color: #0000ff;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">add_edge_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$document</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$topics</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$topic</span><span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; <span style="color: #000066;">push</span> <span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$topics</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$topic</span><span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$title</span> <span style="color: #b1b100;">or</span> <span style="color: #0000ff;">$topics</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$topic</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$title</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> &nbsp; <span style="color: #000066;">print</span> <span style="color: #0000ff;">$graph</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">as_graphml</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">__END__</span> A<span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span> A<span style="color: #339933;">,</span><span style="color: #cc66cc;">4</span> B<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span> B<span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span> B<span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span> C<span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span> C<span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span> D<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span> D<span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span> D<span style="color: #339933;">,</span><span style="color: #cc66cc;">5</span> D<span style="color: #339933;">,</span><span style="color: #cc66cc;">7</span> E<span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span> E<span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span> F<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span> F<span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span> F<span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span> G<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span> G<span style="color: #339933;">,</span><span style="color: #cc66cc;">5</span> G<span style="color: #339933;">,</span><span style="color: #cc66cc;">6</span> G<span style="color: #339933;">,</span><span style="color: #cc66cc;">7</span> H<span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span> H<span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span> H<span style="color: #339933;">,</span><span style="color: #cc66cc;">4</span> H<span style="color: #339933;">,</span><span style="color: #cc66cc;">7</span></pre></div></div> <p>I tried importing the output of this in Gephi and it looked basically correct.</p> <p>By the way, when you say "topic model", are your topics just keywords? Or are you talking about vectors of word frequencies? </p> Lisa Rhody on "What tools can be used to create topic model network graphs?" http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1625 Wed, 02 May 2012 14:47:21 +0000 Lisa Rhody 1625@http://digitalhumanities.org/answers/ <p>Shawn,<br /> Yes! That's what I was looking for. I'm sorry that I somehow missed it on your blog, but I'm grateful that you took the time to explain it here. For some reason I couldn't wrap my head around how the .csv file needed to be formatted to get it the way I wanted it in Gephi. I haven't tried it yet, but I'm about to. Thank you for the generous reply!<br /> -Lisa </p> Shawn on "What tools can be used to create topic model network graphs?" http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1623 Wed, 02 May 2012 14:15:54 +0000 Shawn 1623@http://digitalhumanities.org/answers/ <p>Hi Lisa,</p> <p>I've written about this sort of thing on my blog a few times - <a href="http://electricarchaeologist.wordpress.com/" rel="nofollow">http://electricarchaeologist.wordpress.com/</a> </p> <p>Take your topic modeling composition data. Create a spreadsheet where you have three columns, source, target, and weight. Put your docs and topics under source and target as appropriate, and then the percentage composition under weight. Save as a csv file.</p> <p>Then, in Gephi, create a new project. Click on 'data laboratory'. Click on 'edges' under 'data table'. Click 'import spreadsheet'. Navigate to your csv file. Make sure the 'as table' is set to edges table. click next, click finish.</p> <p>Then, go back to the 'overview' pane, and down the left hand side under layout you can select different algorithms that'll take the edge weight into account. </p> <p>...is that the kind of thing you had in mind? You can also include a 'type' column in your csv file, with 'directed' or 'undirected' as appropriate. </p> Lisa Rhody on "What tools can be used to create topic model network graphs?" http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1622 Wed, 02 May 2012 14:02:41 +0000 Lisa Rhody 1622@http://digitalhumanities.org/answers/ <p><em>Replying to @<a href='http://digitalhumanities.org/answers/profile/parezcoydigo'>parezcoydigo</a>'s <a href="http://digitalhumanities.org/answers/topic/what-tools-can-be-used-to-create-topic-model-network-graphs#post-1621">post</a>:</em></p> <p>That tool looks fantastic because of its flexibility and because it can be worked right into the running of the model. Unfortunately, at this point I don't have the Python scripting ability to really use it right away. Do you know of something with a GUI interface with the same flexibility? </p>