Skip to main content
QUICK REVIEW

[Paper Review] Web scraping: a promising tool for geographic data acquisition

Alexander Brenning, Sebastian Henn|arXiv (Cornell University)|May 31, 2023
Geographic Information Systems StudiesSocial Sciences7 citations
TL;DR

This paper advocates for web scraping as a cost-effective, real-time tool for geographic data acquisition, particularly for urban dynamics like rent trends and gentrification. It demonstrates its application in a Leipzig apartment rent study using random forest and GAM models, achieving low prediction error (RMSE: 1.08 €/m²), while highlighting ethical, legal, and methodological challenges unique to geospatial web data.

ABSTRACT

With much of our lives taking place online, researchers are increasingly turning to information from the World Wide Web to gain insights into geographic patterns and processes. Web scraping as an online data acquisition technique allows us to gather intelligence especially on social and economic actions for which the Web serves as a platform. Specific opportunities relate to near-real-time access to object-level geolocated data, which can be captured in a cost-effective way. The studied geographic phenomena include, but are not limited to, the rental market and associated processes such as gentrification, entrepreneurial ecosystems, or spatial planning processes. Since the information retrieved from the Web is not made available for that purpose, Web scraping faces several unique challenges, several of which relate to location. Ethical and legal issues mainly relate to intellectual property rights, informed consent and (geo-) privacy, and website integrity and contract. These issues also effect the practice of open science. In addition, there are technical and statistical challenges that relate to dependability and incompleteness, data inconsistencies and bias, as well as the limited historical coverage. Geospatial analyses furthermore usually require the automated extraction and subsequent resolution of toponyms or addresses (geoparsing, geocoding). A study on apartment rent in Leipzig, Germany is used to illustrate the use of Web scraping and its challenges. We conclude that geographic researchers should embrace Web scraping as a powerful and affordable digital fieldwork tool while paying special attention to its legal, ethical, and methodological challenges.

Motivation & Objective

  • To establish web scraping as a viable, affordable method for acquiring near-real-time geographic data, especially for socio-economic and urban processes.
  • To address the unique legal, ethical, and methodological challenges of web scraping in geographic research, particularly concerning geospatial data, privacy, and data integrity.
  • To demonstrate the practical workflow of web scraping in geography, including geoparsing, geocoding, and data enrichment using real-world examples.
  • To promote responsible, open science-compliant practices in web scraping for academic and teaching applications in geographic information science.

Proposed method

  • Web scraping is employed to extract object-level geolocated data from real estate platforms, focusing on apartment listings with explicit or implicit location references.
  • Toponymy and address resolution (geoparsing and geocoding) are applied to convert textual location references into spatial coordinates.
  • Machine learning models—random forest and generalized additive models (GAM)—are used to predict apartment rents based on features like size, age, amenities, and proximity to transport.
  • Variable selection via shrinkage in GAM and feature importance in random forest are used to assess predictor relevance and reduce overfitting.
  • Model performance is evaluated using a hold-out test set of 5,245 apartments not used in training.
  • Spatial prediction maps are generated to visualize rent predictions across Leipzig under standardized apartment conditions.

Experimental results

Research questions

  • RQ1How can web scraping be effectively used to acquire near-real-time, geolocated data for geographic research on urban processes such as gentrification and housing markets?
  • RQ2What are the key legal, ethical, and technical challenges associated with web scraping when dealing with geospatial data and privacy-sensitive information?
  • RQ3To what extent can machine learning models trained on scraped data accurately predict geographic phenomena like apartment rents, and how do different modeling approaches compare?
  • RQ4How can geoparsing and geocoding be integrated into the web scraping workflow to enable spatial analysis of unstructured textual data?

Key findings

  • The random forest model achieved the lowest prediction error (RMSE: 1.08 €/m²) on the test set, outperforming both the GAM with shrinkage (RMSE: 1.22 €/m²) and the initial GAM (RMSE: 1.27 €/m²).
  • Despite similar RMSE values, prediction maps from the random forest and GAM models showed notable differences, likely due to distinct modeling capabilities such as smooth vs. step-function relationships.
  • Web scraping enables real-time data acquisition for socio-economic processes, offering a timely alternative to infrequent census or survey data.
  • Geospatial data enrichment through geoparsing and geocoding is essential for transforming unstructured textual location references into analyzable geographic information.
  • The study demonstrates that web scraping can democratize access to data, especially when official sources are restricted or costly.
  • Ethical and legal constraints—such as privacy, intellectual property, and website terms of service—remain critical barriers, even when data is publicly accessible.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.