KaniyamFoundation / ProjectIdeas

A Place to write down the project ideas and to plan them
40 stars 3 forks source link

Draw plots of schools in Chennai with openstreetmaps and R, python #133

Open tshrinivasan opened 3 years ago

tshrinivasan commented 3 years ago

Check this tutorial

https://dominicroye.github.io/en/2018/accessing-openstreetmap-data-with-r/

sample map - https://mobile.twitter.com/chtnha/status/1342074392143020032

We can plot many images like schools, colleges, lakes, bus stands, public toilets etc in chennai or taminadu or any region.

As first task, Draw plots of schools in Chennai and share here.

tshrinivasan commented 3 years ago

Here is a code for python

https://pastebin.com/dTrJBw1i

import osmnx as ox import contextily as ctx place = 'Bengaluru,India' tags = {'amenity':'atm'} gdf = ox.geometries_from_place(place, tags) gdf=gdf.to_crs(3857) map = gdf.plot(markersize=6,figsize=(7,7)) ctx.add_basemap(map)

 

Detailed code is here.

https://github.com/gboeing/osmnx-examples/blob/master/notebooks/00-osmnx-features-demo.ipynb