## 2 Materials and Methods
### Data Preprocessing  
Data preprocessing is a critical step in constructing a reliable analytical dataset from diverse raw data sources. This process involves standardizing formats, addressing inconsistencies, and establishing spatial and temporal connections between data sources. To determine the weather conditions for individual counties, central geographic coordinates of each county are extracted from the National Register of Boundaries (PRG) county dataset. These centroids serve as reference points for estimating meteorological conditions within each county. Accurate kriging interpolation requires geographic data to be represented in a coordinate system that preserves distance relationships. Therefore, geographic coordinates were transformed from the WGS84 geographic coordinate system (EPSG:4326) to the Poland CS92 projected coordinate system (EPSG:2180), which is optimized for Poland's territory. This transformation enables the kriging algorithm to properly account for the spatial distribution of weather stations relative to points of interest. To ensure accurate temporal alignment between accident records and meteorological data, a rounding function is applied to incident timestamps. This function maps each event to the nearest available weather measurement interval--10 min for temperature and humidity data and the nearest full hour for precipitation. Elevation data, incorporated as a drift term to enhance the kriging algorithm's accuracy, underwent a two-step integration procedure. The input elevation data were originally partitioned into tiles, each spanning 10 degrees of both latitude and longitude. Four of these tiles covering Poland's territory were merged and then clipped using extreme geographical points as boundary constraints. The resulting unified elevation model was then sampled at both incident locations and county centroids to associate each point with its corresponding elevation value. Precipitation plays a crucial role not only at the moment of an accident but also in the preceding hours, as residual moisture can influence road conditions. Even if no rainfall is recorded at the exact time of an incident, wet or slippery surfaces may persist due to earlier precipitation. To capture this effect, we introduced the variable _precipitation_cumulative_, \begin{table}
\begin{tabular}{l l} \hline \hline
**Variable Name** & **Meaning** \\ \hline _id_ & Unique GUS identifier for each administrative unit \\ _year_ & Year of the data collection \\ _unit\_type_ & Type of administrative unit (county, voivodeship, or country) \\ _unit\_name_ & Name of the specific administrative unit \\ _population\_per\_1 km\({}^{2}\)_ & Population density (inhabitants per km\({}^{2}\)) \\ _paved\_surface\_length_ & Total length of paved roads (kilometers) \\ _improved\_paved\_surface\_length_ & Total length of high-quality paved roads (kilometers) \\ _motor\_vehicles\_count_ & Number of registered motor vehicles including tractors \\ _passenger\_cars\_count_ & Number of registered passenger cars \\ _total\_buses\_count_ & Number of registered buses \\ _trucks\_count_ & Number of registered trucks \\ _semi\_trailer\_tractors\_count_ & Number of registered semi-trailer tractors \\ _road\_accidents\_count_ & Annual count of traffic accidents \\ _road\_accidents\_casualties_ & Annual count of all victims in traffic accidents \\ _road\_accidents\_fatalities_ & Annual count of traffic accident fatalities \\ _road\_accidents\_injured_ & Annual count of non-fatal injuries from traffic accidents \\ _paved\_roads\_per\_100 km \({}^{2}\)_ & Density of municipal and county paved roads (km per 100 km\({}^{2}\)) \\ _paved\_roads\_per\_10k\_inhabitants_ & Availability of municipal and county paved roads (km per 10,000 residents) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Socioeconomic data by administrative unit. which represents the cumulative rainfall over the 24 h preceding each accident.