Back to projects
Data 2024

Mapping Turkey's Closed Neighborhoods

Creator

Key Achievement

Matched 1,100+ neighborhoods across datasets with fuzzy matching despite Turkish character encoding challenges.

Skills

Problem SolvingProgrammingResearch

Technologies

RQGISKepler.gl

Team Size

1 person

View project

When Turkey’s Presidency for Migration Management announced that over 1,100 neighborhoods would be closed to foreign residence registration, they published the data as an Excel spreadsheet. I wanted to understand the geographic scope of this policy—and knew a map would communicate the story far better than rows and columns.

1,100+ Neighborhoods mapped
99.5% Match rate
50k→15k Search space reduced

The Challenge

Turning a list of neighborhood names into a map required:

  1. Finding geographic data: Locating a dataset with boundaries for all ~50,000 Turkish neighborhoods
  2. Matching names across sources: Connecting PMM’s neighborhood list to the geographic dataset
  3. Handling Turkish text: Dealing with characters like İ/i, Ş/ş, and Ğ/ğ that break standard matching

Reducing the Search Space

The geographic dataset I found contained nearly 50,000 neighborhoods—too many for efficient matching. By first filtering to only subprovinces known to contain closed neighborhoods, I reduced potential matches from 49,597 to 15,429 candidates.

Fuzzy Matching with Turkish Quirks

Standard string matching fails when comparing “AŞAĞIÇAMURCU” to “ASAGICAMURCU”—they’re the same place, just encoded differently. Turkish poses particular challenges: the uppercase dotless I (I) won’t match the uppercase dotted İ, creating false negatives.

My approach:

  1. 1

    Transliterate

    Convert all text to ASCII using R's stringi package (Ş→S, İ→I, etc.)

  2. 2

    Standardize

    Normalize abbreviations and formatting ("MAH." → "MH.")

  3. 3

    Exact Match

    Capture perfect matches first to establish baseline.

  4. 4

    Fuzzy Match

    Apply Jaro-Winkler distance algorithm to remaining records.

Tools Used

  • R for data processing and fuzzy matching
  • QGIS for joining geographic and policy data
  • Kepler.gl for interactive map visualization

The final map reveals the geographic concentration of this policy in ways the spreadsheet never could, showing how restrictions cluster across the country.

Explore the Interactive Map

View the closed neighborhoods visualization on Kepler.gl

kepler.gl