This project has been created to resolve the lack of geographic coordinates of Turkey that can be used in data analysis and put together the data in a single source. Data has been collected from OpenStreetMap with overpass-turbo and cleanised with Pentaho Data Integration. You can find previously created repositories in the below;
Overpass Turbo is a tool to make it easy to query of OSM data provided by OpenStreetMap through the browser. It has an API for developers and there is a project in order to use in Python.
According to OpenStreetMap documentation admin_level
described as;
The admin_level key describes the administrative level of an object within a government hierarchy. A lower level means higher in the hierarchy.
The description of administrative borders of Turkey are;
- admin_level=2 : Country border
- admin_level=4 : Province border
- admin_level=6 : Town border
- admin_level=8 : Neighbourhood border
The data are very limited for admin_level=8. Google Maps API or Yandex Map API can be used to complete the data.
In order to collect layers with these border codes the below code should be run.
[out:json];
(area["name"="Türkiye"] -> .a;);
(rel(area)["admin_level"="<CHANGEIT>"];);
out geom;
In order to see all layers together, the below code should be run.
[out:json];
(area["name"="Türkiye"] -> .a;);
(rel(area)["type"="boundary"]["boundary"="administrative"];);
out geom;
According to Overpass Turbo documentation osmtogeojson library is used to convert raw OSM data to geojson
. The data in geojsons
folder are created with this library.
Overpass turbo uses the osmtogeojson library to convert the raw OSM data output it gets from the Overpass API to GeoJSON.
💥 💥 Due to bandwidth quota json files can be downloaded with this link.
Parsel Sorgu can be used to collect geographic coordinates. tkgm_postman_collection.json
has been created to query this api. Import it into Postman and run it hierarchically. But neighbourhood level data is not as good as OpenStreetMap data and query limit is very low but you know the trick.
In order to use flows download Pentaho PDI and open .ktr
files where you can find in the pentaho-flows
folder. Please, do not hesitate to open an issue or send email to me if you have any problem during installation. It can also be created these flows with any other ETL tool.
-
GeoJSON from TKGM.ktr: It is created to automate HTTP queries in the
tkgm_postman_collection.json
file. It contains city codes of Istanbul in the format that the TKGM needs. In the end of this flow geojson file wil be produced. -
Remove Admin Center.ktr: It is created to remove center points of
.geojson
files. The difference can be seen below;
- A heatmap can be created using
R
library with these geographic coordinates.
- Bus routes can be mapped using the coordinates provided by İstanbul Metropolitan Municipality. You can find the project here which uses KeplerGL.