Mortality rates
From among all Spanish provinces, 10 were selected as representative of the behavior of Spanish regions in terms of thermal extremes, according to previous studies [9, 11, 32].
The dependent variable was made up of the rate of daily mortality due to natural causes (ICD X: A00-R99) in municipalities with over 10,000 inhabitants in selected Spanish regions during the 1983–2018 period. These data were provided by the National Statistics Institute (INE). Based on daily mortality data, and using population data also supplied by INE, the rate of daily mortality per 100,000 inhabitants was calculated.
Temperature data
The data were provided by the State Meteorological Agency (AEMET). Maximum daily temperature in the summer months (Tmax) was the independent variable, registered in the meteorological observatory of reference in each region during the analyzed period corresponding to 1983–2018.
Tmax was used, because it is the variable that presents the best statistical association with daily mortality during heat waves [11, 18].
In addition, we used the rate of evolution of maximum daily temperature (Tmax) in the summer months for the 1983–2018 period and for future Tmax foreseen for the 2051–2100 time horizon under an RCP8.5 emissions scenario. Data were taken from previous papers: [16] and Díaz et al. 2019, respectively.
Determination of threshold temperatures (Tthreshold)
In order to eliminate the analogous components of trend, seasonality and autoregressive character in the series of temperature and mortality, we used a pre-whitening procedure with the Box–Jenkins’ methodology [4].
These prewhitened series constitute the residuals obtained through ARIMA modeling and represent the anomalies that correspond to the mortality rate. The series was modeled for the entire 1983–2018 period.
Find below the equation of the ARIMA regression model in the general form:
$$\begin{array}{*{20}c} {Y_{t} = b + \beta_{1p} \varphi_{pt} + \beta_{2q} \theta_{qt} + \beta_{3P} s\varphi_{Pt} + \beta_{4Q} s\theta_{Qt} + \beta_{5} n1_{t} + \beta_{6\alpha } \cos \left( {\alpha t} \right) + \beta_{7\alpha } {\text{sen}}\left( {\alpha t} \right) + \varepsilon_{t} ,} \\ {\varepsilon_{t} \sim N\left( {0,\sigma } \right),} \\ \end{array}$$
where \(Y_{t}\) is mortality on day t; \(b\) is the intercept; \(\beta\) are the coefficient of each variable in each case; \(\varphi\) is the non-seasonal autoregressive parameter of order p on day t; \(\theta\) is the non-seasonal mobile average of order q on day t; \(s\varphi\) is the seasonal autoregressive parameter of order P on day t;\(s\theta_{Qt}\) is the seasonal mobile average of order Q on day t; n1 is the trend on day t; \(\cos \left( {\alpha t} \right){\text{and sin }}\left( {\alpha t} \right) \,\) are seasonal functions of \(\upalpha\) {365, 180, 120, 90, 60, 30} periods on day t; and \(\varepsilon\) is the residuals which performs a normal distribution of mean = 0, and \(\sigma\) is the standard deviation of the \(\varepsilon\). Since trend was included as an independent variable, the integrated parameter was I = 0. Lastly, it were fixed a period of 7 days for seasonal part of the regression model.
Later, for each year, a dispersion diagram (scatter plot) was constructed such that the X-axis represents maximum daily temperatures in 2 ºC intervals, and the Y-axis represents the value corresponding to these residuals, averaged for these intervals, with the corresponding confidence intervals. Using this methodology, it was possible to relate statistically significant mortality anomalies that were detected at a determined temperature. The value of Tmax, the point at which mortality increases in an anomalous way, was denominated Tthreshold. This methodology has been used in multiple other studies [6, 7, 11, 23, 30].
By way of example, Fig. 2 shows the process by which residuals were obtained and the later determination of Tthreshold in the case of Barcelona for the 1983–2018 period.
Calculation of the rate of temporal evolution of Tthreshold
Once Tthreshold was calculated for each year and region, a linear fit process was carried out for the results obtained. The values on the X-axis represent the years between 1983 and 2018, and the Y-axis show the values of Tthreshold for each year, when it was possible to calculate this value. The slope of the line obtained in the linear fit model represents the rate of evolution of Tthreshold during the period of analysis.
Comparison with the evolution of MMT
In other recent studies in Spain for the same period (1983–2018), the rate of evolution of MMT was calculated [16]. If both rates are compared and bivariate correlations are established between the annual series of Tthreshold and MMT during the study period, it is possible to describe a potential association between them.
Also, cross-correlation functions (CCF) were calculated between the series, which allowed for the analysis of a possible time lag between the values of MMT and Tthreshold.
Determination of the increase in Tthreshold
Given that we were working with spatial data, the time evolution of the results was analyzed using a linear mixed model (link = identity). In this model, the Tthreshold values were used, calculated as a dependent variable, the independent variable of fixed effects was the year, and region was used as a factor of random effects, by way of the following equation:
$${\text{geeglm}}\left( {{\text{formula }} = {\text{ d}}\$ {\text{Tumbral }}\sim {\text{ d}}\$ {\text{year}},{\text{ data }} = {\text{ data}},{\text{ id }} = {\text{ d}}\$ {\text{Provincia}}} \right).$$
This analysis was carried out using the statistical software package SPSS 27. The linear mixed models used the geeglm() function of the geepack package of free R software.