## 3 Research Method
### Data Preprocessing  
In our study, the original PM\({}_{2.5}\) data is China's high-resolution PM\({}_{2.5}\) concentration data. In order to focus on the study area of Nanning urban area and ensure that the equipment can run the code normally, the PM\({}_{2.5}\) data of all years are cropped using the Nanning urban area mask (Figure 3). The cropping process uses the rasterio and geopandas libraries to ensure the accuracy and efficiency of data processing.  
After cropping, the data needs to be further processed and divided into training sets and test sets. The specific steps are as follows:  
Data reading and stacking: By generating a list of year and month strings from January 2012 to December 2023, traversing and reading the corresponding cropped TIFF files, the data from 2012 to 2022 are stacked into a training set, and the data from 2023 are stacked into a test set.  
Missing value and outlier processing: Check the training set data. If there are missing values, fill them with the mean of the corresponding column. For outliers, determine the upper and lower boundaries by calculating the interquartile range, and trim the values that exceed the boundaries to within the boundaries to improve data quality.  
SARIMA model: The training set data is differentiated to ensure stationarity, and the last month of training data is recorded for back-difference in subsequent forecasts.  
Prophet model: With the help of pandas' date_range function, with 1 January 2012 as the starting date and month as the frequency, a date sequence is generated according to the length of the monthly time series data, and combined with the PM\({}_{2.5}\) concentration into a format containing a date column ds and a target value column y.  
LightGBM model: After extracting the time series from the training set data by pixel, create a DataFrame containing date and month features, and use the month as the input feature of the model.  
We selected the trimmed and processed PM\({}_{2.5}\) data from 2012 to 2022 as the training set and the processed data from 2023 as the test set, mainly based on the following considerations:  
Data characteristics and trends: The 11 years of data form a coherent time series that can fully reflect the long-term trend and seasonal characteristics of PM\({}_{2.5}\) concentration. Affected by factors such as interannual climate, urban development, and environmental protection policies, the concentration change trend can be observed to provide information for model learning. At the same time, the data covers multiple complete seasonal cycles, which helps the model capture the seasonal variation patterns under Nanning's subtropical monsoon climate and enhance the SARIMA and Prophet models' ability to predict PM\({}_{2.5}\) concentration changes.  
Model training and validation: Sufficient data is the key to model training. 11 years of data allows the model to fully learn the relationship between PM\({}_{2.5}\) concentration and various potential influencing factors. For example, LightGBM can mine complex nonlinear relationships. Using data from 2012 to 2022 for training and data from 2023 for validation can effectively test the generalization ability of the model and avoid overfitting.  
Research purpose and application: In environmental forecasting, the accuracy of near-term forecasts is of great significance to environmental management and decision-making. Selecting 2023 for verification can evaluate the current forecasting performance of the model and understand its adaptability to environmental changes. By comparing the 2023 forecast value with the true value, the advantages and disadvantages of the model can be summarized, providing a reference for future forecasts and environmental  
Figure 3: Trimming of Original Data (The arrow represents the process of cropping from the original data range to the study area range).  
management decisions, and helping to formulate scientific and effective environmental protection policies.