Applying machine learning and geolocation techniques to social media data (Twitter) to develop a resource for urban planning

PLoS One. 2021 Feb 3;16(2):e0244317. doi: 10.1371/journal.pone.0244317. eCollection 2021.

Abstract

With all the recent attention focused on big data, it is easy to overlook that basic vital statistics remain difficult to obtain in most of the world. What makes this frustrating is that private companies hold potentially useful data, but it is not accessible by the people who can use it to track poverty, reduce disease, or build urban infrastructure. This project set out to test whether we can transform an openly available dataset (Twitter) into a resource for urban planning and development. We test our hypothesis by creating road traffic crash location data, which is scarce in most resource-poor environments but essential for addressing the number one cause of mortality for children over five and young adults. The research project scraped 874,588 traffic related tweets in Nairobi, Kenya, applied a machine learning model to capture the occurrence of a crash, and developed an improved geoparsing algorithm to identify its location. We geolocate 32,991 crash reports in Twitter for 2012-2020 and cluster them into 22,872 unique crashes during this period. For a subset of crashes reported on Twitter, a motorcycle delivery service was dispatched in real-time to verify the crash and its location; the results show 92% accuracy. To our knowledge this is the first geolocated dataset of crashes for the city and allowed us to produce the first crash map for Nairobi. Using a spatial clustering algorithm, we are able to locate portions of the road network (<1%) where 50% of the crashes identified occurred. Even with limitations in the representativeness of the data, the results can provide urban planners with useful information that can be used to target road safety improvements where resources are limited. The work shows how twitter data might be used to create other types of essential data for urban planning in resource poor environments.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Accidents, Traffic / statistics & numerical data*
  • City Planning / methods*
  • Humans
  • Kenya
  • Machine Learning*
  • Motorcycles
  • Social Media*

Grants and funding

• Initials of the authors who received each award: (1) SM,GB,SW,AL; (2) SM,GB,SW,AL • Grant numbers awarded to each author: N/A • The full name of each funder: (1) UK Foreign, Commonwealth & Development Office and (2) the World Bank’s Knowledge for Change Program • URL of each funder website: (1) https://www.gov.uk/government/organisations/foreigncommonwealth-development-office; (2) https://www.worldbank.org/en/programs/knowledge-for-change.