Friday, November 21, 2014

Drug Sales by Year googleVis motion charts giving data a new dimension.

I really like videos made by Hans Rosling on Gap minder on which he presents all the the data with the motion charts  Now using his idea and a small assignment which was given to the students of data science course at IU for which they need to analyze year wise sales data I made the data to talk using the googleVis package creating a similar type of motion charts and it just cool way to view longitudinal / Time series data. One can easily interact with the plots with mouse. The googleVis package provides an interface between R and the Google Charts API. It uses internal R HTTP server to display the output locally into a browser. If you want to create stories bring data to life i would recommend such tools for you. The graph below shows the yearly sales data (2003-2013) collected from by scraping the internet page. All codes are done in R. I am not releasing the R codes here but if you want them mail me with caption "drug sales code".