Re: [datameet] If someone have Shape file for Mumbai ward wise please share.

93 views
Skip to first unread message

Devdatta Tengshe

unread,
Jan 13, 2016, 7:46:36 AM1/13/16
to data...@googlegroups.com
HI Abhay,

Are you looking for Municipal wards? If so, here is the data.


Regards,
Devdatta

On Tue, Jan 12, 2016 at 7:10 PM, Abhay Singh <abhay.p...@gmail.com> wrote:

hi 
I am student of TISS, and working on project where i need mumbai shapefile ward wise. 
If anyone have can please share.

Thanks and regards 

Abhay 

--
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 the Google Groups "datameet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datameet+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mumbai.zip

shantanu oak

unread,
Jan 15, 2016, 2:35:02 AM1/15/16
to datameet
I am attaching a csv file that contain all the pincodes for each ward extracted from this shape file. For e.g. "A" ward is part of Pincode numbers 400001, 400002, 3, 5, 9, 20, 21, 23, 39 etc.

Here is the python code used for this...
https://gist.github.com/shantanuo/05187dd23b96f5e92f6b

The shape file has 24 wards, for e.g. ward "A", ward "B" and so on. Each ward's boundaries are mentioned in the "shape" array. The python script will perform reverse lookup on each point and find the complete address (for e.g. Carnac Road, Ballard Estate, Masjid Bunder, Mumbai, Greater Bombay, Maharashtra, 400003, India). Pincode from this address can be extracted using regular expression. The unique, sorted pincodes for each ward can be exported to csv using indispensable python library called "pandas".

I hope this helps someone.

-- Shantanu
ward_wise_pincode.csv

shantanu oak

unread,
Jan 15, 2016, 3:15:47 AM1/15/16
to datameet
And if you need to find which ward does a location is situated, you can use point_in_poly function.

some_place_lat=19.1645972
some_place_lon=72.8496286

for id in range(len(r.shapes())):
    geom = r.shape(id)
    if point_in_poly(some_place_lon, some_place_lat, geom.points):
        print r.records()[id][2]

This is a loop that considers all wards and checks if the given location (some_place) falls within it. The above code will return "P/S" (P south) which I guess is correct. The function point_in_poly can be found here...

https://gist.github.com/shantanuo/05187dd23b96f5e92f6b


-- Shantanu

On Wednesday, 13 January 2016 18:16:36 UTC+5:30, Devdatta Tengshe wrote:

shantanu oak

unread,
Jan 15, 2016, 4:27:38 AM1/15/16
to datameet
Here is the API access that will return the ward once you provide Latitude and Longitude.

https://291w32lbja.execute-api.us-east-1.amazonaws.com/stag/mward?lat=19.1645972&lon=72.8496286

The above page is correctly returning P/S (p south)
This may be useful if someone wants to add the ward lookup feature in their application (for e.g. mobile app)


-- Shantanu


On Wednesday, 13 January 2016 18:16:36 UTC+5:30, Devdatta Tengshe wrote:
Reply all
Reply to author
Forward
0 new messages