Spatial data analysis with R programming for environment

Kaya E., Agca M., Adiguzel F., ÇETİN M.

HUMAN AND ECOLOGICAL RISK ASSESSMENT, vol.25, no.6, pp.1521-1530, 2019 (Journal Indexed in SCI) identifier identifier


The use of open source software, which has been constantly evolving since the mid-2000s, has affected every research discipline. Disciplines using geographic information systems (GIS) and remote sensing (RS) data have been heavily affected owing to this evolution of technology. Researchers working on these data sets have begun to use open source software intensively. The analysis and visualization of spatial data with the help of open source software has caused the emergence of new different features, which are cost effective and editable by other users. In this study, eight sample points have been used for the analysis of water quality in the Mamasin dam in the 2209/A group project of "Assessment and Modeling with GIS and RS Data of the Land Use Effects on Water Quality of Mamasin Dam" supported by the Scientific and Technological Research Council of Turkey (TUBITAK) under its program to support graduate students. While visualizing spatial features of the points, QGIS Desktop 2.18.0 and Studio programs with open source code have been used. The RStudio program is an open source software that allows the use of the functions of the R programming language. This study is an ideal application for spatial analysis studies with the R programming language. The sample points used in the study were analyzed in the laboratories of Department of Environmental Engineering, Aksaray University. Spatial properties of the analyzed data were examined by coding in the Studio program that is free open source software. In the analysis process, first, the libraries, Leaflet(), Leaflet.extras(), rgdal(), sp(), raster(), and magrittr(), which are used in the study, have been uploaded. With the help of these libraries, the locations of the sample points are transferred to the OpenStreetMap using latitudes and longitudes of the geographic coordinate system as base map. The pH, conductivity, PO4-P, PO4, dissolved oxygen, and temperature information of each sample points are assigned to the variables. These variables are added as a feature for each point. The spatial characteristics of the sample points are visualized using the data variable packages and online maps as the base. After the visualization process is completed, the generated map is presented on the website created via Github.