Mapping MPs with criminal cases

36 views
Skip to first unread message

Saurabh Datar

unread,
Jul 11, 2014, 4:44:07 AM7/11/14
to data...@googlegroups.com
Hi everyone,

I'm new here; still taking baby steps in data visualisation and coding. Have been going through discussions on this forum for the past few days and am amazed at the work you guys have done. Thank you. It's really helpful.

I'm doing a small project of my own, in which I am plotting the MPs with criminal cases against them, on a map. I also wish to put up a viz of crorepati MPs on the same map.

Problem 1:
I came across the shapefiles you guys have made and converted it into a Fusion table. However, one issue I found is a gap near MP/Raj border - near the Kota and Gwalior constituencies. Have attached a screenshot for your reference.

I wanted to ask you if I went wrong somewhere? I downloaded the raw files from Github and converted them to KML using shpescape.com. I'm still wondering where I made a mistake

Problem 2: When I mapped my data sheet with the shape sheet, only those cells with values (MPs with criminal cases) showed up. The rest disappeared. And I think a Fusion Table doesn't allow you to add a column. Is there any way to show all the constituency shapes, and also show the individual cases of MPs with map icons?

Please let me know. 

Thanks again!

Sajjad Anwar

unread,
Jul 15, 2014, 8:48:17 AM7/15/14
to data...@googlegroups.com
Hello Saurabh,


Problem 1:
I came across the shapefiles you guys have made and converted it into a Fusion table. However, one issue I found is a gap near MP/Raj border - near the Kota and Gwalior constituencies. Have attached a screenshot for your reference.

My guess is that something went wrong during conversion, or Fusion Tables is doing something nasty. To clarify, see the screenshot I'm attaching.
 
Problem 2: When I mapped my data sheet with the shape sheet, only those cells with values (MPs with criminal cases) showed up. The rest disappeared. And I think a Fusion Table doesn't allow you to add a column. Is there any way to show all the constituency shapes, and also show the individual cases of MPs with map icons?

I'm sure there's a feature to keep all the unmatched records in Fusion Tables. May be you should merge the data using something like QGIS. See - http://gis.stackexchange.com/questions/6398/join-non-spatial-csv-to-spatial-data-in-qgis#6401

Also, if you want to share the spreadsheet with any of us, we can also help you with merging the data properly.

HTH.

Cheers,
Sajjad.
Screen Shot 2014-07-15 at 2.41.40 pm.png

Saurabh Datar

unread,
Jul 17, 2014, 3:41:13 AM7/17/14
to data...@googlegroups.com
Hi,

Here are the two spreadsheets I'm working on. I've been unable to merge either of these two documents with the shapefile. Also attached a screenshot of what happened when I tried.

I even tried doing it with QGIS, but it somehow didn't work. All the merged cells showed null values. Now trying my luck with Tilemill (which works fine, but is a dull product, and I don't yet know much of Javascript). CartoDB seems good, but only allows 5 visualisations for a free account.


--
Datameet is a community of Data Science enthusiasts in India. Know more about us by visiting http://datameet.org
---
You received this message because you are subscribed to a topic in the Google Groups "datameet" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/datameet/srloeXEP5kc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to datameet+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Best regards,
Saurabh Datar
Merge fail.jpg
Criminal MPs.xlsx
MP assets.xlsx

Sajjad Anwar

unread,
Jul 17, 2014, 9:41:26 AM7/17/14
to data...@googlegroups.com
Hello Saurabh,

The data you sent does have issues - some of the geometry columns are
empty. Plus, there are 544 constituencies in the shapefile but the
criminal dataset has only 184 data points, and the MP assets dataset
has only 443.

I've did the spatial join as you require and uploaded them here -
http://sajjad.in/datameet/
Let me know if it looks okay.

HTH.

Cheers,
Sajjad.

Saurabh Datar

unread,
Jul 17, 2014, 9:43:59 AM7/17/14
to data...@googlegroups.com
Hi,

Is it a mistake on my part? Because I used the shapefiles and converted it using shpescape. Also, is it necessary to have all data points to merge? E.g. does my sheet need all 544 constituencies, even though relevant data is only for a smaller number?



HTH.

Cheers,
Sajjad.

--
Datameet is a community of Data Science enthusiasts in India. Know more about us by visiting http://datameet.org
---
You received this message because you are subscribed to a topic in the Google Groups "datameet" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/datameet/srloeXEP5kc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to datameet+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sajjad Anwar

unread,
Jul 17, 2014, 10:16:31 AM7/17/14
to data...@googlegroups.com


On Jul 17, 2014 3:43 PM, "Saurabh Datar" <brocks...@gmail.com> wrote:
>
> Hi,
>
> Is it a mistake on my part? Because I used the shapefiles and converted it using shpescape. Also, is it necessary to have all data points to merge? E.g. does my sheet need all 544 constituencies, even though relevant data is only for a smaller number?

Not necessarily. But you had to tell the join operation to keep the records without matches as well.

> You received this message because you are subscribed to the Google Groups "datameet" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to datameet+u...@googlegroups.com.

Saurabh Datar

unread,
Jul 21, 2014, 3:01:26 AM7/21/14
to data...@googlegroups.com
Hi,

Thanks a ton for helping me out :) But Fusion table is still doing the same. Only keeping constituencies that have values. I think it is something to do with shpescape.

Saurabh Datar

unread,
Jul 28, 2014, 4:50:15 AM7/28/14
to data...@googlegroups.com
Hi all,

I didn't manage to do it on Fusioon Tables, but I did it with Tableau (which is a little slow at times). I started a small datablog of my own. I'd love if you could check it out, give feedback.

I'd really like to learn and make this better. Thank you.

Reply all
Reply to author
Forward
0 new messages