# The Application of Satellite Image Analysis in Oil Spill Detection
## 2 Materials and Methods
### Methodology Description
#### 2.2.4 Short and Long-Term Analysis
In order to check the water level in the studied area, the JRC (Joint Research Centre) Yearly Water Classification History v1.3 data set was used [50], on the basis of which the script in Google Earth Engine was written. The script needs a few additional commands that define, among others, the name for the loaded bands, the minimum and maximum pixel value, and the colour palette. JRC Yearly Water Classification History is a database containing maps of location and maps of temporal distribution of surface waters from 1984 to 2020. Thus, it provides statistics on the range and changes of these water surfaces based on over 4 million images from Landsat 5, 7, and 8. In addition, this dataset includes an annual classification of the seasonal waters based on annual occurrence values, so the detection of water is classified as either still water or seasonal. To determine the change in the water content of the reservoir around the Nornickel factory, 74 images were used from 23 March 1985 to 14 May 1998, from the Landsat 5 mission, 24 images of Landsat 7 from the period of 15 March 1999 until 11 April 2013, and 50 Landsat 8 images from 5 March 2014 to 15 April 2020. Each image has a total cloudiness of no more than 15% and a spatial resolution of 30 m. Furthermore, the image properties have been assessed with Google Earth Engine at scales from 0 to 9, where 0 means very unfavourable imaging (meaning: the image is covered by clouds), and 9 excellent (meaning: the image has no cloud coverage or the % is irrelevant) in terms of further analysis. Moreover, image scenes in Google Earth Engine contain imagery with digital numbers (DNs) that represent scaled radiances. The conversion of DNs to astensor radiances is a linear transformation using coefficients stored in scene metadata [51]. Conversion to TOA (or at-sensor) reflectance is a linear transformation that accounts for solar elevation and seasonally variable Earth-Sun distance. This means that the data used in the analysis are relatively high-quality and low-cloudy, resulting in more reliable results. Then, the scripts were written in the JavaScript programming language. The first one was used to load the data set. After loading the required dataset, the algorithm calculated the NDWI2 and NDVI indices. The indicators were calculated separately for each satellite. Next, the NDWI2 and NDVI data series were combined into a single table. Visual data analysis involves uncomplicated data preparation. These types of interpretations are often easier to understand and read for recipients than complex activities that produce unambiguous results at first glance. Such analysis is particularly used in intense or extensive changes. The most suitable image from Sentinel-2 satellite was selected. The criteria used were cloud coverage that could not cover more than 15% of images from 25 May to 10 July 2020, which is before and after the oil spill. Then, using specific commands and selecting appropriate spectral bands, the NDVI and NDWI2 indices were calculated to simulate the actual and distortion colour images. In addition, the data for the analysis of 2016 and 2021 from the same growth period were used to provide a comprehensive overview of the changes in the Arctic region. The only difference from the previous script was the change of the year in the second line of the formula for 2016 and 2020, respectively. To analyse the cover of snow and ice in the research area, Google Earth Engine was used. This script is used to load a data set (Sentinel-2), as well as to select the most favourable images from a given period of time by the filter (based on cloud coverage). In addition, the script computes the NDSII index. The script was made for the imagery before and 2 days after the leak. The selected dates are: 14 May 2020 and 31 May 2020, respectively.