Interactive Visualizations with Shiny

Last week, the guys from RStudio released Shiny, a neat new tool to create “interactive web applications”. It seems to focus on R users that are not very common with other languages than R and can help them to easily create web applications only using a few lines of code (look here for a comparism with gWidgetsWWW2.rapache) . The new package has been widely registered among the community with more than 70 retweets of the announcement tweet. Christopher Connell already showed a nice example of how to use it.

As Shiny is quite flexible and easy to handle, I decided to use it to build an interactive visualization tool for the Enron email data. I stumbled upon the data a while ago and updated it a little bit.

Visualizing the data using igraph looks quite nice. Each node is a former employee from Enron. The size of the nodes symbolizes the degree and edges stand for emails between two employees. Brighter edges show more email activity between the two nodes.

plot_n_all

But the network is also very tight and it is hard to identify single connections between employees. That’s where Shiny comes into play:

shiny_enron_emails

Adding a drop-down field for choosing the type of mail (all, direct, cc, bcc) and two sliders for selecting nodes with a given degree and edges with a given weight. All of this took no longer than 2 hours including testing, debugging and polishing. Additionally, I added a second plot with community detection. This allows one to play around with the data and directly see the changes.

The code is available on github. Have fun playing around with my small example Zwinkerndes Smiley

[UPDATE]
The example is now also available on Rstudio’s server.

Best regards
Arne

Dieser Beitrag wurde unter R, Visualisierung abgelegt und mit , , , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

Eine Antwort auf Interactive Visualizations with Shiny

  1. my site sagt:

    Excellent pieces. Keep writing such kind of info on your page.
    Im really impressed by it.
    Hi there, You have done an excellent job. I will certainly
    digg it and for my part recommend to my friends.
    I’m confident they will be benefited from this site.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *


+ vier = 12

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">