Friday, 6 June 2014

rCharts Parcoords x Simpsons x Blocks



Interactive Parallel Coordinates with Multiple Colours

For my research project, I need a tool to visualise results from multi-objective optimisations. Below is one of my early attempts using base R and parcoord in the MASS package, I have no problem using them for publication. However, these charts are all static. For a practical decision support tool (something I am working on), I need the charts to be interactive so that users can adjust the range/thresholds in each parameter and narrow down the things to display in real time.


Many thanks to Ken (timelyportfolio) who kindly pointed me to his code examples. Based on that, I developed a prototype version of the interactive parallel coordinates plot with multiple colours (as shown above). OK, the values in the chart are totally unrelated to my research - I just used the 'Theoph' dataset in R for testing purposes. Yet, this is a much needed exercise to see if I can use rCharts parallel coordinates for my research. The answer, of course, is YES. It also works with my customised colour palette too (using Bart Simpson this time)!



Here is the R code for the above chart:


Showing your rCharts on bl.ocks.org

In the process of making this plot, I also discovered how to display rCharts (d3, html or practically any code) on Mike Bostock's site "bl.ocks.org". If you haven't seen his site, do check this out. It is one of the coolest things on earth.



I wanted to have a gallery like that too ... but I didn't know how. I used to think that Ramnath and Ken must have bought Mike a beer so that they can have their stuff hosted on bl.ocks.org (see bl.ocks.org/ramnathv and bl.ocks.org/timelyportfolio). I was very wrong, everyone with a GitHub account can do it. All you need are your imagination (and some gists). The site automatically pulls your gists and displays them as beautiful blocks gallery.

In order to display your cool rCharts on bl.ocks.org, you can either:
  1. publish the rCharts to gist using the '$publish' function (e.g. r1$publish('name.of.gist', host = 'gist')  where r1 is the rCharts object)
  2. save the rCharts as a stand-alone HTML (e.g. r1$save('index.html', cdn = TRUE)) and then include it in a gist.
For optimal display, I would recommend setting your rCharts size to 960 x 500 (same as the display size on bl.ocks.org). You can also include a 'README.md' file and a 'thumbnail.png' to provide more information. I think the best resolution for the thumbnail is 230 x 120 (about the same aspect ratio as full display). You will need to manually push the png file (see this post for more details).

So here are the parallel coodinates plot as shown on bl.ocks.org ...


... and my gallery at bl.ocks.org/woobe


Latest on Colour Palette Generator

First, let me point you to Russell Dinnage's blog post. It is easily one of the finest R blog posts I've read so far. All these colours and graphs. Wow! It's yet another #RCanDoThat moment for me (so good it needs a hashtag).



So many thanks to his effort and cool ideas, we continue to add more functions to the rPlotter package. It is also a great opportunity for us to better understand the pull/merge GitHub mechanism.

Credits

Again, I would like to thank Ken for his help (not only this time but many times before this on visualisation stuff) as well as Ramnath, Mike and Russell.


40 comments:

  1. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    http://chennaitraining.in/bi-bw-training-in-chennai/
    http://chennaitraining.in/solidworks-training-in-chennai/
    http://chennaitraining.in/autocad-training-in-chennai/
    http://chennaitraining.in/ansys-training-in-chennai/
    http://chennaitraining.in/revit-architecture-training-in-chennai/
    http://chennaitraining.in/primavera-training-in-chennai/

    ReplyDelete
  2. Thanks for sharing this content..
    Leanpitch provides online training in Advanced Scrum Master during this lockdown period everyone can use it wisely.
    Advanced Scrum Master training

    ReplyDelete
  3. Informative article,Great work
    Leanpitch provides online training in Advanced Scrum Master during this lockdown period everyone can use it wisely.
    Advanced Scrum Master training

    ReplyDelete
  4. Thanks for sharing this informative content , Great work
    To crack scrum master interview : Scrum Master Interview Questions

    ReplyDelete
  5. Thanks for sharing this informative content , Great work
    Scrum Master Certification online

    ReplyDelete
  6. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in Advanced Scrum Master during this lockdown period everyone can use it wisely.
    Advanced Scrum Master Training Online

    ReplyDelete
  7. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in Coaching agile transitions during this lockdown period everyone can use it wisely.
    Coaching agile transitions

    ReplyDelete
  8. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in Product prototyping during this lockdown period everyone can use it wisely.
    Product Prototyping

    ReplyDelete
  9. Thanks for sharing this informative content , Great work
    Read this PSM vs CSM blog from Leanpitch to get a better conclusion : PSM vs CSM

    ReplyDelete
  10. Thanks for sharing this informative content , Great work
    Leanpitch provides crash course in Conducting User Interview during this lockdown period everyone can use it wisely
    Conducting user interview

    ReplyDelete
  11. Thanks for sharing this informative content , Great work
    To crack Agile coach interview : Agile coach interview questions

    ReplyDelete
  12. Thanks for sharing this informative content , Great work
    To crack Agile coach interview : Agile coach Interview Questions

    ReplyDelete
  13. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in Devops during this lockdown period everyone can use it wisely.
    Devops Online Training

    ReplyDelete
  14. Thanks for sharing this informative content , Great work
    Read this Blog to become a perfect Product Manager : Best Books for Product managers

    ReplyDelete
  15. Thanks for sharing this informative content , Great work
    Devops Online Training
    Leanpitch provides online training in Devops during this lockdown period everyone can use it wisely.

    ReplyDelete
  16. Thanks for sharing this informative content , Great work
    To crack Agile coach interview : Agile coach interview questions

    ReplyDelete
  17. NICE BLOG
    That's Great & Giving so much information after reading your blog.For RentaPC : Laptop on Rent | PC | Tablets | Macbooks
    Great thanks to you
    Laptop on Rent
    Latest News

    BT Mail

    ReplyDelete
  18. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in Enterprise Agile coaching during this lockdown period everyone can use it wisely.
    Enterprise Agile Coaching

    ReplyDelete
  19. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in Product Management Launchpad during this lockdown period everyone can use it wisely.
    Product Management Launchpad

    ReplyDelete
  20. Thanks for sharing this informative content , Great work
    Leanpitch provides online certification in scrum master during this lockdown period everyone can use it wisely.
    Scrum master certification

    ReplyDelete
  21. Thanks for sharing this informative content , Great work
    Leanpitch provides online certification in Enterprise agile coaching during this lockdown period everyone can use it wisely.
    Enterprise Agile Coaching

    ReplyDelete
  22. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in devops during this lockdown period everyone can use it wisely.
    Devops Online Training

    ReplyDelete
  23. Thanks for sharing this.,
    Leanpitch provides online training in Scrum Master during this lockdown period everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.

    CSM training online

    ReplyDelete
  24. Thanks for sharing this.,
    Leanpitch provides online training in Scrum Master during this lockdown period everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.

    CSM online certification

    ReplyDelete
  25. Thanks for sharing this.,
    Leanpitch provides online training in Scrum Master Certifiation during this lockdown period everyone can use it wisely.
    Join Leanpitch 2 Days CSM Certification Workshop in different cities.

    Scrum master certification online

    CSM certification online

    ReplyDelete

  26. Thanks for sharing this.,
    Leanpitch provides crash course in Brain hacks using NLP everyone can use it wisely.

    Brain hacks with NLP

    NLP training

    ReplyDelete
  27. Thanks for sharing this.,
    Leanpitch provides crash course in Brain hacks using NLP everyone can use it wisely.
    NLP training

    NLP crash course

    ReplyDelete
  28. Your site is truly cool and this is an extraordinary moving article and If it's not too much trouble share more like that. Thank You..
    Digital Marketing Course in Hyderabad

    ReplyDelete
  29. Thank a lot. You have done excellent job. I enjoyed your blog . Nice efforts
    Data Science Certification in Hyderabad

    ReplyDelete
  30. I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog.
    Business Analytics Course in Bangalore

    ReplyDelete
  31. Wow, happy to see this awesome post. I hope this think help any newbie for their awesome work and by the way thanks for share this awesomeness, i thought this was a pretty interesting read when it comes to this topic. Thank you..
    Artificial Intelligence Course

    ReplyDelete
  32. I need to thank you for this very good read and i have bookmarked to check out new things from your post. Thank you very much for sharing such a useful article and will definitely saved and revisit your site.
    Data Science Course

    ReplyDelete
  33. Excellent Blog! I would like to thank you for the efforts you have made in writing this post. Gained lots of knowledge.
    Data Analytics Course

    ReplyDelete


  34. Thanks for sharing this.,
    Leanpitch provides crash course in Facilitating change everyone can use it wisely.

    Reducing barrier for change

    Facilitating change

    ReplyDelete

  35. Thanks for sharing this.,
    Leanpitch provides crash course in Facilitating change everyone can use it wisely.
    Facilitating change

    Facilitating change in the workplace

    ReplyDelete

  36. Thanks for sharing this informative content.,
    Turient is an All-in-one platform for all our teaching needs. If Teaching is your passion ,enabling is ours
    Read the Informative blog - 11 Free Teaching Tools for Online Teachers

    11 Free Teaching Tools for Online Teachers
    Free Teaching Tools

    ReplyDelete
  37. Thanks for sharing this informative content.,
    Leanpitch provides online training in Agile team facilitation during this lockdown period everyone can use it wisely.

    Agile team facilitation

    ICP ATF

    ReplyDelete