Tag: prefuse

  • Part 8: Who’s Talking About The Future of Newspapers?

    Part 8: Who’s Talking About The Future of Newspapers?

    I’m working on a paper on topical communities, and as part of that I’ve come back to this dataset to explore the social network that emerges through @ mentions.

    To start with, I looked at the social network that emerges when we look at the people on the list.

    Future of the News Network
    Future of the News Network

    This network is pretty densely connected, with the exception of two users on the list. You can see their nodes floating away in the image below:

    Future of the News Network - Outliers
    Future of the News Network – Outliers

    The network graph that emerges from all the tweets connected is really busy, but may show who the most engaged users are.

    Future of the News Network - Full
    Future of the News Network – Full

    There’s just too much information here, so I started filtering it by eliminating nodes that had fewer than a specified minimum number of connections. Because of the dataset available, non-news-influencer nodes cannot be connected to each other. Thus, I was specifying how many influencers needed to mention a user for them to make it into the graph.

    Future of the News Network - Minimum 2
    Future of the News Network – Minimum 2

    Setting the minimum to two dramatically reduces the size of the graph. Many of the nodes remaining are also well known, for example @jack and @alyssa_milano.

    Future of the News Network - Minimum 3
    Future of the News Network – Minimum 3

    We can also see popular websites, like @techcrunch and @boingboing as well as @google (not surprising given how often google showed up in the earlier visualizations of tweet content.

    Future of the News Network - Minimum 4
    Future of the News Network – Minimum 4
    Future of the News Network - Minimum 5
    Future of the News Network – Minimum 5
    Future of the News Network - Minimum 6
    Future of the News Network – Minimum 6
    Future of the News Network - Minimum 7
    Future of the News Network – Minimum 7
    Future of the News Network - Minimum 8
    Future of the News Network – Minimum 8
    Future of the News Network - Minimum 9
    Future of the News Network – Minimum 9
    Future of the News Network - Minimum 10
    Future of the News Network – Minimum 10

    I find the graphs for minimum 8+ fascinating – I think they start to show who influences the influencers.

    Future of the News Network - Minimum 11
    Future of the News Network – Minimum 11

    Eventually, of course, we get back to our original graph.

     

  • Fun With Prefuse

    Couple of things I found using Prefuse that I’ll document here for reference (I had a hard time finding the answer to these).

    1. NullPointerException thrown by GraphMLReader

    This means there’s an issue in the XML, even if it’s valid according to W3Schools (which mine was). Double check it, for me it was an issue where I declare my keys – I’d created a key called “dist” but then I was referring to it by “type”. That kind of thing will cause an NPE, but no better explanation (and can be a total pain to fix).

    2. NullPointerException thrown in ColorAction

    If  you create an OrdinalMap for your DataColorAction, but at run time you’re getting an NPE or other exception (colors not showing) check that everything you have for that field is in your OrdinalMap. For instance, if your map contains “A”, “B” and “C”, but your GraphML refers to a “D” you’ll get an exception but no explanation as to what is missing, which can make it difficult to work out what’s going on.

    3. Converting to Applet

    Use JPrefuseApplet for this. Extend that for your applet class, and then you’ll want something like:

    this.getContentPane().add(new MyPrefuseCreation(graph));

    Where MyPrefuseCreation extends the Prefuse Display Object. You’ll probably need to change some bits of your code in accordance with this. Also, Display has a field called m_vis, which holds the visualization when you call the Display(Visualization) constructor.

    You’ll need to get in your graph by loading it from a URL, which you can make a parameter in your applet html embed code.

    Finally, when it came to embedding the applets, the html was fairly simple working from an example applet – check out the prefuse gallery and click view source to see how they do it.

    Loads of new graphs uploaded, see them here.