Transit Accessibility Mapping in R

A proof of concept for ranking hotels by public-transit access to the places travelers want to visit, using geospatial data, routing APIs, H3 clustering, and R.
Analysis
R
Geospatial
Author

Aleksei Prishchepo

Published

May 18, 2026

Project Overview

Most hotel search interfaces treat location as a distance problem: how close is a hotel to the city centre or another point on the map? But distance is only a rough proxy for what travelers actually experience. A hotel a few kilometres away can be much easier or harder to reach depending on the public-transit network.

This project explores a different approach: rank hotels by total transit time to the places a traveler wants to visit. Berlin was used as a proof-of-concept city, with hotels, points of interest, public-transit routing, and traveler scenarios combined into a single analytical workflow.

The result is a geospatial model that turns transit accessibility into a measurable feature and makes differences that are invisible in conventional distance-based maps visible at a glance.

NoteRole

Data Analyst & Developer

NoteTools

R, sf, H3, Google Maps API, gstat, ggplot2

NoteDomain

Geospatial Analysis, Travel Technology, Product Analytics

Key Features & Components

Transit time instead of geographic distance

Reframes hotel location as an accessibility problem rather than a proximity problem, using actual public-transit travel time between hotels and destinations.

Real-world geospatial data

Combines an OpenStreetMap extract of Berlin with hotel locations and points of interest, then enriches destinations with Google Places review data to identify popular locations.

H3 spatial clustering

Reduces 455 hotel locations to 189 H3 spatial cells before routing, cutting the potential routing workload from 22,750 to 9,450 origin-destination pairs while retaining useful spatial resolution.

Resilient API processing

Handles thousands of routing requests with rate limiting, error handling, and intermediate data storage so that individual API failures do not interrupt the analysis and completed API calls do not need to be repeated.

Scenario-based analysis

Tests the accessibility model against different traveler profiles and sets of destinations rather than relying on a single generic definition of a “good location.”

Continuous accessibility surfaces

Interpolates sparse transit-time measurements into continuous spatial surfaces with isolines, turning point-level routing results into maps that reveal the geography of accessibility.

NoteFull Articles

Research & Development

  • Defined hotel location as an accessibility problem and formulated total transit time to user-selected destinations as the core measure.

  • Collected Berlin points of interest from OpenStreetMap and filtered them to culturally and commercially relevant destination types.

  • Enriched the POI dataset with Google Places ratings and selected popular destinations for the scenario analysis.

  • Collected 455 hotel locations and used H3 spatial indexing to group nearby hotels into 189 cells before routing.

  • Calculated thousands of public-transit travel times through a routing API, with rate limiting, error handling, and cached intermediate results.

  • Aggregated travel times across destination sets representing different traveler interests.

  • Used spatial interpolation and isolines to convert discrete travel-time measurements into continuous accessibility maps.

Outcomes & Impact

Demonstrates that geographic proximity and public-transit accessibility produce substantially different views of hotel location.

Reduces a 22,750-request routing problem to 9,450 requests through spatial clustering while preserving useful geographic detail.

Turns API-based point measurements into an interpretable spatial model that can be explored visually across different traveler scenarios.

Provides a reusable analytical pattern for accessibility, catchment-area, and location-based decision problems.

Skills Demonstrated

Geospatial analysis • Spatial data engineering • API integration • R programming • H3 spatial indexing • Routing analysis • Spatial interpolation • Data visualization • Scenario modelling • Analytical problem solving

Apply This to Your Business

If you need to turn location, operational, or customer data into a model that supports a real business decision, feel free to reach out via the contact page to discuss how I can help.

See Also

Back to top