Extract data from Open Street Map with Overpy overpass API in CSV, Excel format using Python code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello this is Nikhil I'm going to show you how to extract the data from I think all past ago using or pass EPA in Excel format if you want to extricate a member you can use this overpass turbo interface and if you wanted it if you want data in Excel format and pre-processed you can use Python code us to extract data from let me open it in sublime this is the data ask file so in this code I have used over PI module to get the a axis of the overpass it is pretty much heavily communicate gold so if anyone want to understand the code there will be no problem mostly there are functions to build the query in overpass ql language corpus QL is the query language that is used on overpass servers to extract data from the overpass database OpenStreetMap database and there are some API calls in the below in these two functions this is the overpass EP and we get the response or result and we process it and export it into Excel files so let me show you how to run this code I'm going to see mg CD desktop run this file and what this could do is it will ask you for let you today longitude of the location and search for search radius so it will search all the data in the given search radius from the target location okay for example we are going to enter the coordinates of New Delhi five eight four five six nine and this is seventy-seven point 21 you can enter any coordinates you want to data extract from particularly you can enter that coordinates of the location so what will be the skin radius that mentor I think forty thousand that is means forty thousand bitters it means forty kilometers so it will search the 40 kilometer area around the noodle so what type of data you want yeah you can change the code according to your need I have written code for this five option you can change the query and by going to all pass wiki or overpass reference overpass API reference and so let me enter here but to get the data of hospitals in the 40 kilometer area of this location okay let me press enter so it is going to cause I okay so we got the output or in output data dot CSV file if you want to understand code you just read the permits or if you are a developer it will be very simple for you to understand the code let me check the output so this is the output data dot CSV created by this program let me open it and show you so these are the hospitals in the 40 kilometer area of New Delhi there are a lot of hospitals five we got five eighty five hundred and eighty entries and what type of data this is mostly this is the I think postal code address name of the hospital and it is all the data that are available on the open statement for these hospitals latitude longitude and what type of this wheelchairs or craters website of the horse so that's how we can extract data in Excel format and if you want data in JSON format you can do you can also do it by this code okay that is pretty much if you want to use this code you can go to my github account I will leave the link in description so that is my github repository for this Python program OpenStreetMap data extraction you can use a part of this code or the whole code for detects extension according to your need if you want me to explain or give further more details or about my research for the OpenStreetMap you can comment and I will try to fulfill the requirements in the comment section ok so that was pretty much ok have a good Jeff
Info
Channel: Nikhil Nagar
Views: 1,734
Rating: 5 out of 5
Keywords: openstreetmap, OSM, API, Python, code, learn, excel, data, extraction, hospital, schools, road, csv, overpass, turbo, overpy
Id: DnKJ5HrS_NI
Channel Id: undefined
Length: 5min 22sec (322 seconds)
Published: Wed Apr 29 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.