flatin.es Town or development
Menu

How we calculate the figures

How every figure on the municipality pages is calculated.

Each figure carries its period (a year, a quarter or a census date) and a numbered source note naming the body that publishes the data. Where a figure is our own calculation, such as the years of income a home costs, the page says so and the calculation is explained here step by step.

The “What sets it apart” text for each municipality comes from fixed rules applied to the data: it compares the place with its province, the rest of Spain and the neighbouring municipalities, and mentions only what crosses those thresholds. The “For and against” block applies fixed rules that are the same for every municipality: it is not an opinion or a recommendation, and the same data produces the same sentence anywhere.

How we calculate recorded crime

The Interior Ministry's Balance de Criminalidad publishes offences recorded by the police in municipalities with more than twenty thousand inhabitants and in provincial capitals, as totals accumulated from January to the end of each quarter. To compare towns over a full year, we use the latest twelve months: this year's total to date, plus last year's full-year total, minus last year's total to the same quarter. At the end of the year it is simply the annual total. If last year's figures are missing, there is no value.

We then give two rates per thousand people. The first divides by registered residents (the Padrón). The second divides by residents plus the people staying in tourist flats, estimated as tourist-let beds times the province's average occupancy of tourist flats over the same months. In resort towns the second rate is closer to the number of people actually present. If occupancy data is missing for those months, only the first rate is shown.

Recorded crime depends on how often people report and on police activity, not only on how much crime there is.

How we calculate gross rental yield

Gross yield is the median monthly rent per square metre for flats from the Ministry of Housing's SERPAVI index, multiplied by twelve, divided by the Ministry's average appraised value per square metre. Both periods are shown, because the rent index is published more than a year later than appraisals. It is a figure before property tax, community fees, insurance, empty months and income tax, and it covers declared long-term lets, not holiday rentals. It is information for comparing places, not investment advice.

How we assign weather and air stations

Climate and air are measured at stations, not across a municipality. We take the municipality's main settlement and look for the nearest station: for air, an urban or suburban background station within 10 km whose valid readings cover at least 75% of the year, never a traffic or industrial station; for climate, an AEMET station within 25 km. The station's name and its straight-line distance are shown with the figure. If no station qualifies, the block says “no data”: we do not interpolate or borrow from a neighbouring town.

How we measure distances

Distances to the nearest airport, railway station, beach and hospital are measured in a straight line from the municipality's main settlement, not along roads, so the real journey is longer and its time depends on traffic. Airports come from the official aeronautical publication of Spain (AIP, ENAIRE), stations from Renfe's open timetable data, beaches from the National Geographic Institute's Basic Geographic Gazetteer of Spain (IGN, NGBE), and hospitals from the Ministry of Health's national hospital catalogue.

What the flood-risk figure means

The figure is the share of the municipality's area inside the hundred-year flood zone of the National Flood Zone Mapping System (SNCZI) of the Ministry for the Ecological Transition. The map so far covers 33.3% of the main river courses in Spain, so the absence of a flood zone on the map does not mean the absence of risk: the river or ravine near a home may simply not be mapped yet. It does not include coastal flood zones, which SNCZI publishes as a separate layer. Before buying, check the exact plot in the SNCZI viewer and ask the town hall.

How we calculate zone and province figures

Where no figure is published for the area itself, a zone or province figure is calculated from its municipalities and states how many of them it is based on. Counts, such as population or tourist lets, are added up only if every municipality has the figure. Prices, percentages and amounts are averaged, weighted by population, and the average is published only if the municipalities with data account for at least half of the zone's or province's population. Some statistics are published only for larger municipalities: the appraised value of the Ministry of Housing and Urban Agenda, for those with more than 25,000 inhabitants; in a zone with many small villages, the average mostly reflects the towns where most people live. When an agency publishes a value directly for the province, we do not replace it with our own calculation: we use the published value and say so, or give no province figure. So a province's appraised value is the one the Ministry publishes for the province as a whole, while a zone's is our population-weighted average, with the number of municipalities and the share of the population it rests on; that is why the two can differ. A combined figure describes the area as a whole; towns within it can differ a lot, and their own pages show it.

How we calculate affordability

We use the same year for the numerator and the denominator: the latest year with income from INE’s Household Income Distribution Atlas for the municipality. That income is the average (not median) net income per household and comes from residents’ tax returns: it does not include foreign pensions or non-residents’ income, so in municipalities with many foreign residents the figure overstates the years needed.

Buying: average appraised value of free-market housing per square metre (Ministry of Housing), averaged over the four quarters of that year, times 80 m², divided by household income for the same year. If a quarter is missing, there is no value. The Ministry publishes appraised values only for municipalities with more than 25,000 inhabitants.

Renting: median rent per square metre from the SERPAVI index for the same year, times 80 m² and twelve months, over household income. We do not mix years or bring old figures “up to date”. We give no province figure and no “unaffordable” threshold.

What an empty or occasionally used home is

The figures come from INE’s table “Dwellings by intensity of use” in the 2021 Population and Housing Census, built from each dwelling’s electricity use. “Empty” is a dwelling with no appreciable electricity use in the year; “occasionally used” is one using between 251 and 750 kWh a year, typical of a second home or a few weeks of use. INE’s separate “low consumption” category is added to neither.

Each share is calculated over the total number of dwellings in the same municipality in the same table. INE publishes larger municipalities separately; small ones are grouped by province and are shown here without data. “Empty” does not mean abandoned or for sale: it may be under renovation, awaiting an inheritance or simply closed by its owner.

How we choose what sets each municipality apart

For each municipality we compare every indicator with the other municipalities of its province, with the rest of Spain and with its nearest neighbours. We compare only when there is data for at least 80% of the municipalities the source applies to: appraised values only cover municipalities with more than 25,000 inhabitants; crime, those with more than twenty thousand. A fact makes it into the text only if it clearly stands out: among the top or bottom three of the province when at least 20 municipalities have data; 1.5 times the provincial median or more, or 0.67 or less; within the 10% of Spanish municipalities with the highest or lowest value; the extreme among the neighbours with a gap of 1.25 times over the next; or a yearly change among the largest in the province, with a minimum base.

We rank by how marked the difference is and show at most 12 sentences, 2 per topic. With fewer than 3, there is no block. Sentences are not reworded to look different: two municipalities with the same data would get the same text. A rule met by more than one municipality in five distinguishes nothing and is tightened or dropped.

How the “for” and “against” rules work

Each line is a fixed rule applied to the municipality’s own figure, never its province’s: appraised value above or below the provincial median, affordability within the 25% of Spanish municipalities needing the fewest years of income or the 10% needing the most, straight-line distance to a hospital or airport, fibre coverage, the climate at the nearest weather station. If a figure is missing, the rule stays silent: missing data never becomes an “against”. We do not balance the columns: there may be five lines on one side and none on the other.

Two cautions. INE atlas income comes from residents’ tax returns, without foreign pensions or non-residents’ income; where the share of foreign residents is among the highest in Spain, affordability does not count as “against”. Crime counts as “against” only if it exceeds the provincial median both per resident and including the seasonal population, and not where occasionally used homes abound, since their occupants are in neither denominator.

Sources

All figures come from official sources whose licences allow commercial use: the National Statistics Institute (INE), the Ministries of Housing and Urban Agenda (MIVAU), of the Interior, of Finance (Hacienda), for the Ecological Transition (MITECO) and for Digital Transformation and the Civil Service (MTDFP), the State Meteorological Agency (AEMET) and the European Environment Agency (EEA). We do not use data from the Notaries (Notariado) or the Land Registrars (Registradores), because their terms prohibit commercial use.

You may reuse our compilations with a link to flatin.es: a link to the domain is required and a link to the specific page is recommended. Please also cite the original source as its terms require.

Get new builds in Spain by email