A master thesis - A study of an online forum in Sweden

Using Topic Modelling to Explore the Association between Neighborhood Reputations and Demographic Composition

Lijun Peng, Linköping University

Supervisor: Benjamin Jarvis, Hendrik Erz

Background and research question

This part introduces the background of this study and the research question.

Data and methods

This part describes 3 datasets and 3 methods, including analyzing procedure.


This part shows the main results and some interactive maps.


The part discusses the limitations and potential further research.

Background & research question

What is neighborhood reputations?

Neighborhood reputations are assessments of communities from residents and non-residents.

What are the effects of Neighborhood reputation?

Neighborhood reputations can influence

  • residents’ community satisfaction1,
  • social trust and well-being2,3,
  • social networks4, housing and schooling choices4
  • have potential consequences for residential inequality and segregation.
  • Previous research method: Survey and questionnaires; These approaches assume reputations fall along a single scale, from good to bad. While the specific dimensions of neighborhood reputations remain unclear.
  • Previous research findings: neighborhoods’ ethnic composition1,5 and economic status5 are strong predictors for neighborhood reputations.
  • Social media platforms facilitate research

Research questionWhat is the relationship between online perceived neighborhood reputations and neighborhood demographic composition?

Data & methods

Data 1: Neighborhood name list (Stockholm county/Län)

  • Sweden regional statistical areas (RegSo
  • OpenStreetMap (OSM)
  • Församlingar (parish division)
  • Utsatta områden (vulnerable areas listed by police)

Data 2: Flashback posts (text data)

  • Flashback is a Swedish online open forum.
  • Subforums: home, lifestyle, society
  • Year range: Jan 2000–Jan 2021

Total posts: 14 million; selected posts: 150 thousand

Data 3Neighborhood demographics in Stockholm county (län)

6 Variables: Year, Education, Birth region, Age, Household type, Economic standard

Methods: LDA, Poisson model, Pearson correlation coefficient


What is LDA:

LDA is an unsupervised and popular topic modelling method. It can calculate the probability of words that belong to a document and a topic. In my thesis, I applied LDA to define topics among Flashback posts.


Poisson model is used to predict the probability of mentions on Flaskback given the demographics.


Pearson correlation coefficient explores the relationship between topic scores and demographics.


Results – Poisson model

The neighborhoods’ population and the number of non-European-born residents positively relate to neighborhood mentions on Flashback.

Education can weaken the effect of the two abovementioned factors.


The maps are Stockholm municipality

Gray areas: no mentions

No river shapefile.

Map demographics

Demographic data are in the year 2020.

Areas with more residents with low economic standards have a high proportion of less-educated residents.

Areas that have more residents with high standard economic status have more highly educated residents.

Map topics

The topic of crime and immigrant are prevalent in communities with more residents with low economic status and low educational attainments.

The topics of high status and housing queue are related to neighborhoods with more residents having high socioeconomic status.


To conclude, the results imply that ethnic composition, financial status and education still have a close relationship with the online reputations of communities.


Informal neighborhood names and posters’ neighborhoods boundaries
Missing actual crime rate that might influence the effect of other variables

Potential further research:

Include the actual crime rate
Explore posters’ background
Include posts from all subforums

Examine the dynamics of reputation change  and explore contributors


1. Krysan, M. (2002a). Community Undesirability in Black and White: Examining Racial Residential Preferences through Community Perceptions. Social Problems, 49(4), 521–543.

2.Kullberg, A., Timpka, T., Svensson, T., Karlsson, N., & Lindqvist, K. (2010). Does the Perceived Neighborhood Reputation Contribute to Neighborhood Differences in Social Trust and Residential Wellbeing? Journal of Community Psychology, 38(5), 591–606. https://doi.org/10.1002/jcop.20383

3.Tran, E., Blankenship, K., Whittaker, S., Rosenberg, A., Schlesinger, P., Kershaw, T., & Keene, D. (2020). My Neighborhood Has a Good Reputation: Associations between Spatial Stigma and Health. Health & Place, 64, 102392. https://doi.org/10.1016/j.healthplace.2020.102392

4.Bader, M. D., Lareau, A., & Evans, S. A. (2019). Talk on the playground: The neighborhood context of school choice. City & Community, 18(2), 483–508.

5.Permentier, M., Van Ham, M., & Bolt, G. (2008). Same Neighbourhood \ldots Different Views? A Confrontation of Internal and External    Neighbourhood Reputations. Housing Studies, 23(6), 833–855. https://doi.org/10.1080/02673030802416619