Skip to content

msradam/third-place-persona

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Third Place Persona: Measuring Social Characteristics of Bookstores

Analyzing the relationship between urban network centrality and third place characteristics of bookstores in Brooklyn and Queens, NYC.

Overview

This project uses computational methods to measure whether a bookstore's position in the street network predicts its function as a "third place": a social space outside home and work where people gather informally.

Key Finding: Network centrality does not predict third place characteristics (r = -0.15, p = 0.24), but distinct bookstore archetypes emerge with clear geographic clustering patterns.

Methodology

  1. Network Analysis: Extract street networks for Brooklyn & Queens from OpenStreetMap, compute closeness and betweenness centrality for all nodes
  2. Bookstore Data: Collect bookstore locations from OSM, map to nearest network nodes
  3. Review Collection: Gather Google Places reviews for all bookstores, filter out closed locations
  4. LLM Classification: Use Qwen 2.5 14B to classify each review against 8 third place dimensions from Langlais & Vaux (2022)
  5. Aggregation: Calculate per-location scores (proportion of reviews mentioning each dimension)
  6. Analysis: Correlate centrality metrics with third place scores, derive composite archetypes

Third Place Dimensions

Based on Langlais & Vaux (2022) framework:

  • Relationship Initiation & Maintenance
  • Equalizer (welcoming to all)
  • Communication as Main Activity
  • Active & Passive Engagement
  • Reciprocity (regulars, recognition)
  • People Over Place
  • Playful Mood
  • Cognitive Separation & Reprieve

Bookstore Archetypes

Three distinct types emerged from dimension patterns:

Sanctuary (quiet refuge for cognitive separation)

  • High: cognitive_separation, equalizer
  • Low: communication_activity
  • Examples: Head Hi, Kew & Willow Books, Greenlight Bookstore

Social Hub (buzzing conversation and social energy)

  • High: communication_activity, relationship_initiation, playful_mood
  • Examples: Books Are Magic, Center for Fiction Bookstore

Local Living Room (intimate space for neighborhood regulars)

  • High: reciprocity, people_over_place, equalizer
  • Rare but distinctive pattern
  • Examples: Taylor & Co., Eichler's Religious Articles

Key Findings

  1. No correlation between network centrality and third place function

    • Closeness centrality: r = -0.151, p = 0.241
    • Betweenness centrality: r = -0.122, p = 0.343
    • No individual dimensions showed significance
  2. Strong geographic clustering

    • Northwest Brooklyn (Williamsburg, Greenpoint, Park Slope areas) shows highest concentration of Sanctuaries and Social Hubs
    • Local Living Room archetype is rare across all neighborhoods
    • Suggests neighborhood context matters more than street network position
  3. Sample characteristics

    • 60 bookstores analyzed
    • 291 total reviews
    • Average 4.8 reviews per location
    • Aggregate third place scores: mean 0.30, range 0.00-0.63

Data

  • Borough boundaries: NYC Open Data (included in data/shapefiles/)
  • Street networks: Generated via OSMnx
  • Bookstore locations: OpenStreetMap features
  • Reviews: Google Places API
  • Final outputs: data/processed/ (centrality scores, location scores)

Setup

  1. Clone repository
  2. Create .env file with Google Places API key:
GOOGLE_PLACES_API_KEY=your_key_here
  1. Install Ollama and pull Qwen model:
ollama pull qwen2.5:14b
  1. Setup Python virtual environment and install requirements:
pip install -r requirements.txt

Notebooks

Run in order:

  1. 01-data-prep.ipynb - Download networks and bookstore locations
  2. 02-centrality-metrics.ipynb - Calculate network centrality
  3. 03-collect-reviews.ipynb - Fetch Google Places reviews
  4. 04-classify-bookstores.ipynb - LLM classification of bookstores based on reviews
  5. 05-analysis.ipynb - Correlation analysis and visualization

Visualizations

Interactive maps available in figures/:

  • bookstore_map.html - Overall third place scores
  • archetype_sanctuary.html - Sanctuary archetype distribution
  • archetype_social_hub.html - Social Hub archetype distribution
  • archetype_local_living_room.html - Local Living Room archetype distribution

Limitations

  • Review-based measurement may underrepresent certain characteristics (e.g., reciprocity rarely mentioned explicitly)
  • Sample size (60 bookstores) limited to active locations with sufficient reviews
  • LLM classification dependent on review text quality and prompt engineering
  • Cross-sectional analysis; no temporal component

Citation

Rahman, M. (2025). Third Place Persona: Measuring Social Characteristics of Bookstores. 
GitHub: github.com/msradam/third-place-persona

References

Langlais, M. R., & Vaux, D. E. (2022). Establishing and Testing a Quantitative Measure for Evolving Third-Place Characteristics. International Journal of Technology and Human Interaction, 18(1), 1-15.

License

MIT License Copyright (c) 2025 Adam Munawar Rahman

About

πŸ“š Measuring social characteristics of bookstores using network analysis and LLMs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors