Transition to Open Research Practices in Spatial Analysis for Research in LMIC.
Open Research objectives/practices
Making the outputs of research, including publications, data, software and other research materials freely accessible.
Introduction
In my research on undernutrition in children under five in Uganda, I initially relied on ArcGIS, a proprietary software, for spatial data analysis. This software is paid for by the UG and the standard among many colleagues. Recognizing the need for open research practices to enhance reproducibility and accessibility, I transitioned to QGIS, an open-source GIS alternative. However, I discovered that QGIS, while already improving upon ArcGIS, lacked certain functionalities compared to R in terms of transparency and reproducibility. Therefore, I transitioned to R to enhance even further upon the FAIR principles. Unfortunately, some highly beneficial functions in QGIS where not available in R or any R packages. To address this, I developed an R package, spatial.align, designed to replicate 2, in my humble opinion, essential QGIS functionalities in R.
The 'Align' tool in QGIS, which is essential for preprocessing spatial data layers to ensure their features align correctly, a critical step for accurate further spatial analyses. To replicate this functionality in R, I created the spatial.align package, which includes:
-
align_spatial_data: This function aligns spatial data layers to a reference layer.
-
verify_properties: A helper function that verifies the alignment properties to ensure the process has been executed correctly.
Essentially, a user has a reference layer to which all other layers should be aligned. For example, I have three maps: one of Uganda, Europe, and the world. Using the align_spatial_data function, I align the Europe and world maps to the Uganda map, ensuring they share the same spatial properties. This can then be verified afterwards with the verify_properties function.
Motivation
The primary motivation for adopting open research practices was to improve the accessibility and reproducibility of my research methods and outputs. Open-source tools such as QGIS and R ensure that all aspects of the research process are accessible and transparent, enabling other researchers to replicate and build upon my work. This is particularly crucial in global health research, conducted in Low and Middle-Income Countries (LMICs) like Uganda. Their resources are constrained and therefore any relieve of potential barriers should be aspired. Moreover, following these principles enables LMIC researchers to follow along and hopefully learn more from the research.
Lessons learned
Switching from proprietary to open-source tools presented several challenges. While R is powerful and open, it comes with a steep learning curve when aspiring to create your own functions/packages. It is essential to understand the original function to its core to be able to reproduce it in another environment. I would like to mention the immense power of artificial intelligence (AI) in coding nowadays, and in helping with improving your code. I used AI to enhance documentation and error handling. While writing your own packages comes with a learning curve, learning about how to create your own functions and packages in R has provided me with a deeper and richer understanding of the R language and environment.
URLs, references and further information
The spatial.align package is a completed deliverable, available on GitHub. It includes the source code, detailed documentation, and usage examples to guide users through the process of aligning spatial data layers in R.
Last modified: | 13 November 2024 12.56 p.m. |