Note that there are some explanatory texts on larger screens.

plurals
  1. PORow manipulation in python
    primarykey
    data
    text
    <p>I'm trying to get a csv into a .gexf format file for a dynamic gephi graph. The idea is to have all the parallel edges (edges with the same source and target but different post dates) contained in the attribute data. In the example, all of the dates in the attribute correspond to the posting dates for John answering Jan's question in a discussion forum for an online course.</p> <p>How do I get a csv looking like this:</p> <pre><code>Jan John 2012-04-07 2012-06-06 Jan Jason 2012-05-07 2012-06-06 Jan John 2012-03-02 2012-06-07 Jan Jason 2012-03-20 2012-06-08 Jan Jack 2012-03-26 2012-06-09 Jan Janet 2012-05-01 2012-06-10 Jan Jack 2012-05-04 2012-06-11 Jan Jason 2012-05-07 2012-06-12 Jan Jack 2012-05-09 2012-06-13 Jan John 2012-05-15 2012-06-14 Jan Janet 2012-05-15 2012-06-15 Jan Jason 2012-05-20 2012-06-16 Jan Jack 2012-05-23 2012-06-17 Jan Josh 2012-05-25 2012-06-18 Jan Jack 2012-05-28 2012-06-19 Jan Josh 2012-06-01 2012-06-20 </code></pre> <p>into a format looking like this:</p> <pre><code>&lt;edge source="Jan" target="John" start="2012-02-20" end="2012-06-06" weight="1" id="133"&gt; &lt;attvalues&gt; &lt;attvalue for="0" value="1" start="2012-04-07" end="2012-06-06"/&gt; &lt;attvalue for="0" value="2" start="2012-06-06" end="2012-06-06"/&gt; &lt;attvalue for="0" value="3" start="2012-06-06" end="2012-06-06"/&gt; &lt;/attvalues&gt; &lt;/edge&gt; &lt;next edge... &lt;/next edge&gt; </code></pre> <p>The way I've attempted this is not working out so well. I've tried to create two lists, and for each entry in the first list, search to find a match of the first two entries in the second list. If there's a match, then my script would delete the row in the second list and append the pair of dates. With each row representing the complete number of correspondences between a questioner and an answerer, I would then write a script to convert the row into the edge / attribute data. I've been using <a href="http://andreew.userpage.fu-berlin.de/ruby/picon.txt" rel="nofollow">this as some sort of guide</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload