Monday, September 16, 2013

India : A map of Sex Ratios Districtwise

I have not spent much time on javascript and have always avoided any opportunity to work with javascript related frameworks. Recently after many postponements I started working on D3.js and here is the output of what I could achieve over a weekend.



If you want to use the svg along with state and district codes visit my github repo

A few of the observations that I could made from the graph are
  1. Coastal regions have a better sex ratio.
  2. South India does better when compared to North India.
  3. I was assuming that Karnataka would have a better ratio than that of Bangalore. But I was surprised to find that AP does better than Karnataka.
  4. In-fact a viz done by a friend of mine addresses precisely that. As per the viz there is a lot of improvement over the last decade which kind of justifies my surprise ;)

Read further for credits and my learning resources.
Note that this is a very crude implementation. I wanted to get the working map out there and then work on improving features and code quality.
  1. DashingD3JS helped me get started and thinking with joins helped me understand joins better.
  2. I used the color palettes form Color Brewer. It has a nice set of palettes and comes shipped with D3. A nice graphical view of the same is a smart implementation done using D3.js and ColorBrewer again.
  3. I used some sample codes from here.
  4. I used the svg map from wikimedia
  5. It used the names and didn't use the district codes assigned by the Census 2011. There was no easy way of mapping these details.
  6. I used the official document from census and used this temporarily identify the missing codes and names.
  7. Most of the changes were because of the spelling mistake or abbreviations. I had to fix these manually.
  8. I ignored that fact that there can be different districts with same name in different states. This caused a little headache and tookup more than 3-4 hours to sort it out.
  9. I have shared the update svg map along with state and district codes on github

4 comments:

Jayaprakash Reddy said...

It's Nice article, sir in the same i want to develop some thing please send me links you have.

sqiar said...

It's actually a cool and useful piece of info. I am glad that you simply shared this useful info with us. Please keep us up to date like this. Thanks for sharing, You can also check out this http://www.sqiar.com

Larissa Dundon said...

Thanks for sharing Interesting post. Thanks for taking this opportunity to discuss this, I appreciate with this and I like learning about this subject. If possible, as you gain information, please update this blog with more information. and also see my blog post Vancouver pr agency. I have found it really useful.

Erie Tree Trimmers said...

Very great post. I simply stumbled upon your blog and wanted to say that I have really enjoyed browsing your weblog posts. After all I’ll be subscribing on your feed and I am hoping you write again very soon!
Best reagrds
stump removal erie pa