Regarding Village Level location cordinates

226 views
Skip to first unread message

Mohit Daga

unread,
Jun 4, 2015, 9:32:31 AM6/4/15
to data...@googlegroups.com
Hi

Can some one guide me to get village level location coordinates or shape files for Rajasthan.

Thanks
Mohit

Srini Vasudevan

unread,
Jun 4, 2015, 10:04:54 AM6/4/15
to data...@googlegroups.com
This is pretty neat website: http://india.csis.u-tokyo.ac.jp/default/howto
They have village coordinates linked to the 2001 census.

Best
Srini

Srini

Mohit

--
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.

Nikhil VJ

unread,
Jun 7, 2015, 8:19:00 AM6/7/15
to datameet
Wow this website is amazing.. the interface for drilling down to sub-district (visual shape select) is totally worth replicating for so many similar projects, like polling booth location. Or even just geography learning.

Well, I have no clue how one would go about it, but it would be awesome if someone did it and made a generic state-district-subdistrict selector javascript library that can be used by anyone.

--
Cheers,
Nikhil
+91-966-583-1250
Pune, India
Self-designed learner at Swaraj University <http://www.swarajuniversity.org>
http://nikhilsheth.blogspot.in


Mohit Daga

unread,
Aug 27, 2015, 1:07:46 PM8/27/15
to datameet
Hi Folks,

Sorry for a late reply. But I am sure this post is still useful for people craving for locations.

I used the suggested website for a research project.

I wrapped this in a python module. Available below.

https://github.com/zerolevel/Locations

I hope you will find it interesting and star it as well. ;)

mohit.

Johnson Chetty

unread,
Aug 27, 2015, 3:44:19 PM8/27/15
to data...@googlegroups.com
Hey,

Good stuff Mohit!
Can confirm, the calls look good!

Regards,
Johnson
>>>> an email to datameet+u...@googlegroups.com <javascript:>.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> 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 <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
> --
> 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.
>


--
Regards,
Johnson Chetty

Nikhil VJ

unread,
Aug 28, 2015, 3:30:23 AM8/28/15
to datameet
Hi Mohit,

This must be great.. sorry for being such a noob.. but can you please explain how to use this for the benefit of people who don't know python programming?

( https://github.com/zerolevel/Locations )

You've given these instrucitons:

To find coordinates for Mumbai use the following code:
import Locations as LC

lc_i = LC.Location()
mum_cord = lc_i.getCoordinates("Mumbai")
>> Where do I put this?


--
Cheers,
Nikhil
+91-966-583-1250
Pune, India
Self-designed learner at Swaraj University <http://www.swarajuniversity.org>
http://nikhilsheth.blogspot.in




Johnson Chetty

unread,
Aug 28, 2015, 9:45:04 AM8/28/15
to datameet

Hey nikhil...

You would need to have Python installed on your system. (Linux /Mac/ windows)

After that , you would need to download the code repository available at the link.  (There is an option to download as zip file)
This is the download link:
https://github.com/zerolevel/Locations/archive/master.zip

Unzip the file and then run python in the folder where you have unzipped the folder..

Then type:
python

This will open a prompt and then input the code

import Locations as LC
lc_i = LC.Location()
mum_cord = lc_i.getCoordinates("Mumbai")



I hope that should whet your appetite!

Mohit Daga

unread,
Aug 28, 2015, 10:33:26 AM8/28/15
to datameet
Thanks Johnson for answering this.

Adding to what you wrote,

I advise you to go through https://docs.python.org/2/using/index.html . This has detailed description of getting setting up python based upon your system.

Secondly I have detailed the steps of using Locations in "HOW TO USE" section.

Also added few more examples.

Hope it will be of your use.

Thanks

Mohit.

shantanu oak

unread,
Sep 11, 2015, 11:14:42 AM9/11/15
to datameet
Hi Mohit,
Does it return all the places if there are more than 1 village with the same name?
For e.g. I tried a place that I know (it is in Mahad Taluka and not in Khalapur as returned)

lc_i = LC.Location(state="Maharashtra", district='Raigarh')
mahad_cord = lc_i.getCoordinates("Mahad")

mahad_cord
18.809567 73.302246 Maharashtra Raigarh Khalapur Village MAHAD

If there is more than 1 village with the same name. It should return a list.
The Location method should have a third input of taluka. It is named Sub-district on that page.

-- Shantanu

shantanu oak

unread,
Sep 11, 2015, 11:47:30 PM9/11/15
to datameet
Hi Mohit,
It seems that sub_districts are called "tahsil" in the database. So after getting all the results, can you check it against the supplied value of sub-district using something...

if self.sub_district == marker.getAttribute("tahsil"):

This will allow me to call the tehsil in the class object something like this...

lc_i = LC.Location(state="Maharashtra", district='Raigarh', sub_district='Mahad')

If the sub_district is not supplied (None) then your current result is acceptable. I tried to write the code but my python is not as good :)


-- Shantanu


On Thursday, 4 June 2015 19:02:31 UTC+5:30, Mohit Daga wrote:

Mohit Daga

unread,
Sep 13, 2015, 2:45:32 AM9/13/15
to datameet
Hi shantanu,

Sub-districts(taluka or tehsils) are not added because a large number of tehsils have been created in after 2001 census. Note that 2011 census (census) data is not available from the Census Department.

However you are right that only a single coordinates details is given to the user. Although this is the most appropriate result as per the query (because of the use of fuzzy logic) but sometimes it might not be correct due to name-conflict.

I have thus added another feature in the code where in user can give the number of coordinates required. This can be anything between 1-10 [defaults to 1].

I hope this solves it.

Mohit.

Sharad Lele

unread,
Sep 13, 2015, 10:08:19 PM9/13/15
to datameet
Hi Mohit:

Thought I will mention that 2011 village amenities tables have now be posted by Census of India: http://www.censusindia.gov.in/2011census/dchb/DCHB.html

While the village boundary maps are still not included in the pdf, the village list and the new sub-district names for all villages are listed in the Village Amenities (DCHB_VillageReleasexxxx) files.

Might be of use in updating.

Sharad

shantanu oak

unread,
Sep 14, 2015, 4:21:02 AM9/14/15
to datameet
Hi,
I have written a python script that will download and merge all excel files of village Amenities across all states.

https://gist.github.com/shantanuo/55646e47602f140e82f5

I can confirm the 2 columns "Sub District Name" and "Village Name". The other columns those might be interesting are "Agricultural Commodities" (like potato and orange), "District Name", "PIN Code", "State Name"

-- Shantanu Oak

shantanu oak

unread,
Sep 15, 2015, 3:25:46 PM9/15/15
to datameet
Hi,
I have merged all excel files and created a single CSV that can be downloaded from here....

http://oksoft.s3.amazonaws.com/all_state_data.csv.gz

This is 100 MB gzip compressed file. Contains 800 MB CSV data of all states merged into a single file. Here are the steps how to download and import the data in MySQL database. It will take a few minutes to import the data in SQL - This is better option than using excel.

1) download and unzip the file

wget http://oksoft.s3.amazonaws.com/all_state_data.csv.gz
gunzip all_state_data.csv.gz

2) Download the table structure:

wget https://gist.githubusercontent.com/shantanuo/302f2d983c5282e56124/raw/442a11b33b3a5284644886a0a3876a4a014ed3e5/create_table.sql

3) create table

 mysql test < create_table.sql

4) load data

mysql>  load data  infile '/home/ubuntu/datameet/tmp/all_state_data.csv' into table temp_aaa fields terminated by ','  optionally enclosed by '"' ignore 1 lines;

_____

This query shows that a village named "mahad" is in 3 tehsils of Maharashtra.

mysql> select Sub_District_Name344  from temp_aaa where State_Name340 = 'Maharashtra' and  Village_Name390 = 'Mahad' limit 10;
+----------------------+
| Sub_District_Name344 |
+----------------------+
| Baglan               |
| Khalapur             |
| Mahad                |
+----------------------+
3 rows in set (3.94 sec)

If I omit the state name from the where clause of the query, I can see that a village with the same name also exist in Rajasthan and Uttarakhand.
_____

This query shows that there are 83 Crore people living in villages.

select sum(Total_Female_Population_of_Village364) as female, sum(Total_Male_Population_of_Village366) as male, sum(Total_Population_of_Village367) as total from temp_aaa;

+--------------------+--------------+--------------+
| female             | male         | total        |
+--------------------+--------------+--------------+
| 405953826          | 427824396    | 833647211    |
+--------------------+--------------+--------------+

_____

Some interesting facts:

1) The data is collected from 35 files starting with number 01 to 35. for e.g. DCHB_Village_Release_3500.xlsx

2) 0900 is the biggest file with 195 MB data followed by 2300 (100 MB) and 2100 (95 MB) While 0400, 3100 and 2500 are smallest files with size around 50,000 bytes.

3) There are around 6.5 lakh villages across all states.

# wc -l all_state_data.csv
646170

4) There are around 24,000 villages growing potato as their primary or secondary crop.
# grep POTATO all_state_data.csv  | wc -l
24069

Several columns like nearest village / town will be obsolete if geo co-ordinates are linked with this data.

-- Shantanu

CA Vimal Bajoria

unread,
Sep 24, 2015, 1:07:41 AM9/24/15
to data...@googlegroups.com
Can anyone guide me how to change my e-mail id?
Reply all
Reply to author
Forward
0 new messages