Sunday, February 2, 2014

Know India through Visualisations - 1

I'm going to produce just a couple of charts, a teaser of sorts in this post. In the forthcoming posts I'll dig deeper.

I was amazed with the existing list of R packages to work with spatial data, without needing to get into much of the technical details. Various R packages I've used are described along with the code.

I've obtained the state level power supply position data for the November 2004 (just a random choice) from the data portal of the government of India website. The spatial data for India with state boundaries was obtained from Global Administrative Areas website.



Above plot is generated using spplot() function from sp package, below is a similar plot generated using ggplot() function from ggplot2 package. In the plot, darker shades of blue signify higher severity of electricity shortage and lighter shades signify lower severity as can be seen from the legend. The numbers in the legend are in MU i.e. Million Units (equivalent to gigawatt hour).


The advantage of using ggplot() is that I can add additional layers onto this map easily. For e.g. I can add labels of the states as can be seen below.


The R Code for this post is shown below and can also be found on this GitHub Gist


Saturday, February 1, 2014

Introduction

Through this blog I intend to work on some data analysis projects, publish the results here and get feedback from other data experts. I have exposure to R, Python, MATLAB and would be using suitable one of them based on needs. My interests range from Web scraping to Data visualization to Statistical modelling.