## 2 Materials and Methods
### Data Preprocessing
This value is computed using a sliding window algorithm applied to hourly precipitation data, summing the previous 24 hourly measurements for each timestamp in the dataset. By incorporating recent precipitation history, this approach provides a more comprehensive representation of potential weather-related hazards affecting road safety. To prevent erroneous merging during county data integration, a compound key approach was implemented, combining county name and voicyodship for all joining operations. This was essential as multiple counties across Poland share identical names but exist in different voicyodships. Two distinct methodologies were employed for administrative unit association: for geographical data, voicyodships were assigned to counties through spatial joins between county centroids and voicyodships' administrative boundary shapefiles from the PRG; for socioeconomic data, encoding-based administrative matching utilized the first two digits of the standardized seven-digit county identifier. This latter approach required treating identifiers as strings to preserve leading zeros, which contained critical positional information within the administrative hierarchy. The distinct methodologies--spatial joins for geographical data and encoding-based matching for socioeconomic data--were essential for facilitating county weather data interpolation through kriging, as well as for merging socioeconomic data with incident data and generating choropleth visualizations of regional indicators, ensuring accurate synthesis and proper identification of all data sources. Data integration employed relational join operations across multiple dimensions: SEWIK incident records were merged with BRD Observatory data through shared identifiers, while incident- socioeconomic linkage utilized a three-key join strategy based on year, county, and voicyodship identifiers. For weather conditions at incident locations, interpolated values were calculated using the adjusted timestamps to perform universal kriging. Daily county-level weather parameters were derived by applying the same kriging methodology to weather station measurements at county centroids, incorporating mean daily averages for temperature and humidity that we calculated, while leveraging the already available daily precipitation measurements from the IMGW dataset without further processing. A consistent missing data handling strategy is implemented by inserting NaN markers in cases where source data are unavailable or interpolation algorithms fail to generate reliable estimates. This approach preserves analytical integrity by explicitly flagging incomplete records rather than introducing artificial values that could distort the analysis. Outlier detection for weather parameters combines statistical methods with domain-specific constraints to ensure data quality. Extreme values are identified through distribution analysis of both input weather station data and resulting interpolated outputs. Manual review of the smallest and highest values in the dataset, supported by histogram visualization, helped identify questionable measurements. Physical limits--such as humidity constrained between 0 and 100% and non-negative precipitation--are enforced. To enhance meteorological plausibility, a minimum threshold is applied, classifying precipitation below 0.01 mm as zero, with this threshold being the minimum non-zero value observed in the input precipitation data. This combination of techniques ensures that only realistic and scientifically valid weather data are used in subsequent analyses. By implementing rigorous data validation, interpolation, and quality control measures, we ensure that the processed dataset remains both reliable and analytically robust. These steps mitigate potential inaccuracies arising from missing values, outliers, and spatial inconsistencies, providing a solid foundation for further analysis of the relationship between weather conditions and road traffic incidents.