Skip to content

Latest commit

 

History

History
35 lines (16 loc) · 2.49 KB

data_processing.md

File metadata and controls

35 lines (16 loc) · 2.49 KB

Map Kibera Schools Data Processing

Get schools data from Overpass Turbo

Overpass Turbo allows you to query and download data from OpenStreetMap. It’s a powerful query language with many options; the Wizard makes it easy to construct queries.

Here we search for schools with amenity=school. Then hand edit the query generated by the wizard, removing the way and relation lines — we only want points, or nodes in OSM lexicon.

Select Export then download as GeoJSON.

Identify schools in road clearance zone

We are going to use QGIS to identify and add information on which schools are in the road clearance zone. We will reference UAV imagery collected and added to this Mapbox map.

Add the Mapbox layer to QGIS using these instructions. Then click Add Vector Layer, and add the downloaded GeoJSON. Now, it’s not possible to edit GeoJSON in QGIS, so Save as a SpatiaLite file.

Use the Select Features by Freehand tool, and select the schools within the road clearance zone.

Then Open Attribute Table and Toggle editing mode. Click New column, and enter road_clearance for Name. Next Show selected features, and manually enter y in the new column. Finally Save as a GeoJSON file.

Convert to CSV

Use http://geojson.io to convert. Open your file to Upload . Then Save as CSV

There is one manual fix required to the header names. In GeoJSON and in OpenStreetMap, property keys with different capitalization are considered distinct; unfortunately these kinds of errors are present in OSM data sometimes. And in tools like PowerBI, capitalization is not taken into account and will generate errors. So, open the CSV in a text editor and change Operational_status to operational_status_2, and polling_station:Election_year to polling_station:election_year_2, and save.