Data report
What explains crime rates in Catalonia? A comarca-level analysis
Published 28 July 2026
Reported offences per 1,000 residents span an almost fourfold range across Catalonia, from Terra Alta at 24.1 to Barcelonès at 91.3. We test four common explanations against the dataset behind this site: urbanization, poverty, unemployment and immigration. One survives intact, one flips sign under controls, one disappears entirely, and one turns out to be statistically inseparable from another.
Summary of findings
- Urbanization dominates. Crime rate against population density gives a rank correlation of 0.76, far stronger than any other variable we can measure. Most other "explanations" of crime are this one fact wearing different clothes.
- The poverty hypothesis fails on the raw data (0.18: richer comarques actually report slightly more crime) but is supported once density is held constant (−0.47). Among comarques of similar urbanization, lower income goes with more reported crime.
- Unemployment has no independent effect. Its raw correlation of 0.39 collapses to 0.01 when density is controlled.
- The foreign-born share correlates with crime (0.38) and, unlike unemployment, survives the density and tourism controls (0.45). It weakens to 0.28, below our significance threshold, once income joins the controls. With 40 aggregate observations, the immigration and poverty effects cannot be separated, and comarca-level data cannot attribute any offence to anyone.
The question and the data
The outcome variable is the number of offences reported to the Mossos d'Esquadra per 1,000 registered residents in 2024, available for 40 of 43 comarques. It is the same figure that powers our safest comarques ranking, and its source and coverage are described on the methodology page.
The candidate explanations come from the rest of the dataset: average household income (Idescat, 2022, as ranked in highest household income), the unemployment rate (lowest unemployment), the share of residents born outside Spain (most international comarques), population density (the inverse of most rural), tourist accommodation per resident (least touristy), median age, the Latin-America-born share, and the share of residents who can speak Catalan (where Catalan is most spoken).
Each hypothesis below is stated the way it circulates in public debate, then tested the same way: first the raw association, then the association after removing what urbanization already explains.
Method: rank correlations and what counts as evidence
All associations are Spearman rank correlations. Comarca metrics are heavily skewed (the Barcelonès has roughly twenty times the density of the median comarca), and rank correlation is invariant to such distortions: it asks only whether higher values of one variable go with higher values of the other, not whether the relationship is linear.
To hold a third variable constant we use partial rank correlation: every variable is converted to ranks, the two ranks of interest are each regressed on the control ranks, and the residuals are correlated. The controls are population density (urbanization) and tourist beds per capita (visitor exposure, explained below). For the immigration hypothesis we add income as a third control, for reasons that section makes clear.
With n = 40, a rank correlation is statistically significant at p < 0.05 (two-sided) when its absolute value exceeds roughly 0.31; each control variable in a partial correlation spends one further degree of freedom and nudges that bar slightly higher. We report around twenty coefficients in this article, so at the 5% level one borderline "significant" value would be expected by chance alone. We therefore lean on magnitudes, robustness checks and consistency across specifications, not on any single threshold crossing.
Everything here is observational, ecological (comarca-level aggregates, not individuals) and from a single period. Correlation, with or without controls, is not causation; the conclusions section spells out exactly which statements the data supports.
Hypothesis 1: crime is an urban phenomenon
Supported, and it is not close. The rank correlation between reported crime and population density is 0.76. The three highest rates are Barcelonès (91.3 offences per 1,000 residents), Alt Empordà (83.8) and Tarragonès (73.3); the three lowest are Terra Alta (24.1), Ripollès (26.2) and Pallars Sobirà (26.5), all rural.
Total population behaves the same way (raw 0.70) and collapses to −0.10 once density is controlled: it is the same fact, not a second one. This is the baseline every other hypothesis must beat, because almost everything else about a comarca (income, age structure, migration, language) also varies with urbanization. A raw correlation with crime is therefore never, by itself, evidence of a distinct mechanism.
Hypothesis 2: poorer comarques have more crime
The raw data appears to refute this: the correlation between household income and crime is 0.18, slightly positive. Richer comarques report somewhat more crime, because the richest comarques are the urban ones and urban means crime.
Holding density constant flips the sign to −0.47, a textbook case of confounding (often described as Simpson's paradox): comparing comarques of similar urbanization, the poorer one tends to report more crime. The two panels of Figure 2 show the reversal directly.
Honesty requires the robustness checks that weaken it. Restricted to inland comarques (more than 20 km from the coast, n = 25) the adjusted correlation fades to −0.12; dropping the eight most tourist-heavy comarques leaves −0.35 (n = 32). A substantial part of the "poor and high-crime" signal therefore lives on the coast. And when the foreign-born share is added to the controls, the income effect moderates to −0.31: income and immigration overlap so strongly across comarques that, at this sample size, the data cannot fully separate them (see Hypothesis 4). Verdict: supported at equal density, moderately, with the caveat that the effect concentrates in coastal Catalonia.
Raw
Density held constant
Hypothesis 3: unemployment drives crime
Not supported. The raw correlation is 0.39 (n = 35), which looks like evidence until density is controlled: the partial correlation is 0.01, indistinguishable from zero. Unemployment is higher in the urban and southern coastal comarques, which is where crime is higher for reasons the density control already captures. Of the four hypotheses this is the cleanest negative result: no specification we ran leaves an unemployment effect.
Hypothesis 4: more immigration means more crime
This is the claim most often made with the least care, in both directions, so we report it in full. The raw correlation between the foreign-born share and reported crime is 0.38, and it does not behave like the unemployment artifact: it survives the density control (0.45) and the density plus tourism control (0.45). It is also stable to deleting any single comarca (leave-one-out range 0.39 to 0.56). A commentator claiming the data shows no association would be wrong.
But the association does not survive contact with income. Adding household income to the controls weakens it to 0.28, below the significance bar, and the effect is symmetric: income's own adjusted correlation moderates from −0.46 to −0.31 when the foreign-born share is controlled. Foreign-born residents concentrate in exactly the lower-income comarques (agricultural Lleida, the service economies of the tourist coast), so with 40 aggregate observations the two variables carry largely the same information. The data genuinely cannot tell "immigration is associated with crime" apart from "poorer areas have both more immigration and more crime".
Two further facts argue for restraint. First, the composition problem: the foreign-born share lumps together retired EU citizens on the Empordà coast, Latin American service workers and West African farm labourers. The Latin-America-born share illustrates how misleading a subgroup correlation can be: raw 0.49, apparently one of the strongest relationships in the table, yet it vanishes to −0.01 under the density and tourism controls. That is what a pure geography artifact looks like.
Second, the ecological fallacy: these are comarca-level aggregates. A correlation between a comarca's foreign-born share and its offence rate says nothing about who commits the offences. High-immigration comarques are dense, transited and touristed places where offences against anyone are more frequent. Nothing in this dataset identifies perpetrators, and no comarca-level analysis can. Verdict: a real, robust raw association that cannot be separated from poverty, cannot be attributed to any group, and shrinks in every subset we probed (inland only: 0.35; without the eight most touristic comarques: 0.32).
Correlations that dissolve under controls
The table below collects every variable we tested. The pattern to notice is how many impressive raw correlations share a single explanation. Median age (−0.49 raw: younger comarques report more crime) collapses to −0.10 because young comarques are urban comarques. The Catalan-speaking share (−0.67 raw, one of the strongest values in the table) drops to −0.30: it tracks rurality, not any protective property of the language. Anyone mining this dataset for a striking crime correlation will find one; the density control is the first question to ask of it.
| Variable | n | Raw ρ | Density controlled | Density + tourism | Reading |
|---|---|---|---|---|---|
| Household income | 40 | 0.18 | −0.47 | −0.46 | Supported at equal density |
| Unemployment rate | 35 | 0.39 | 0.01 | 0.04 | No independent effect |
| Foreign-born share | 40 | 0.38 | 0.45 | 0.45 | Inseparable from income |
| Latin-America-born share | 40 | 0.49 | 0.23 | −0.01 | Urbanization artifact |
| Median age | 40 | −0.49 | −0.10 | −0.12 | Urbanization artifact |
| Total population | 40 | 0.70 | −0.10 | −0.08 | Urbanization artifact |
| Can speak Catalan | 40 | −0.67 | −0.30 | −0.20 | Urbanization artifact |
What this data cannot tell you
The denominator problem. Crime rates divide offences by registered residents, but offences happen to everyone present, including visitors. In tourist comarques the numerator includes crimes against people the denominator does not count, inflating the rate. The data shows the fingerprint: tourist beds per capita correlate with crime at only −0.12 raw, but at 0.41 once density is controlled, which is why Alt Empordà, a comarca of modest density, posts the region's second-highest rate. We control for tourist accommodation throughout, but it is an imperfect proxy for visitor flows: the Barcelonès has few beds per resident and enormous daily visitor numbers.
The composition problem. "Offences" aggregates bicycle theft with violent crime. The mix almost certainly differs between urban and rural comarques in ways a single total cannot show, and property crime against visitors is a large share of the coastal totals.
Scope. One period (2024), 40 observations, aggregate units. None of the coefficients here identify a causal effect; controls remove the confounders we can measure, not the ones we cannot (policing intensity, reporting propensity, and age structure of the population at risk are all unmeasured).
Conclusions
Ranked by how firmly the data supports them: (1) Reported crime in Catalonia is above all an urbanization phenomenon; density alone orders the comarques better than any social variable we can measure. (2) At comparable urbanization, poorer comarques report more crime, a moderate effect concentrated on the coast. (3) Unemployment adds nothing once urbanization is accounted for. (4) The foreign-born share carries a real raw association that survives the geographic controls but cannot be separated from income, cannot survive every subset, and, being ecological, cannot attribute a single offence to anyone. The defensible summary of hypothesis 4 is not "no relationship" and not "immigration causes crime"; it is that comarca-level data is the wrong instrument for the question, and anyone quoting a single correlation from it is overreaching.
For a household choosing where to live, the practical reading is simpler: the low-crime comarques are the rural inland ones, and the safest comarques ranking together with the most rural ranking already encodes most of what these correlations can offer.
Explore the data behind this report
Every variable used here has a public page: safest comarques, household income, unemployment, foreign-born share, immigration growth 2007 to 2022, population density and tourism pressure. Sources, periods and coverage for every dataset are on the methodology page.
All statistics in this report are computed at build time from the public dataset behind this site (crime: Mossos d'Esquadra via Idescat, 2024; income: Idescat 2022; origins: Idescat municipal register). Method: Spearman rank correlations; partial correlations by OLS on ranks. This page regenerates whenever the dataset updates, so the figures above always match the rankings they link to.