Introduction to a data tool well suited to spatial inequality research

7 May 2020

Developing the skills of prospective users is one element of the DataFirst mission, alongside providing open data infrastructure for discovering and accessing data. Part of this skills development agenda is a series of regular training workshops on survey data analysis for African quantitative social scientists, including the use of data analysis tools like R and Stata.

Dr Takwanisa Machemedze, ACEIR’s data officer and researcher at DataFirst, is assisting ACEIR with data capacity development. He is no stranger to R – he has been using R for remote sensing analysis, an interdisciplinary field that uses satellite data to make sense of trends and patterns on the landscape.

“There are several advantages to using R over paid-for software. R is a free open source software that is flexible to adapt to different kinds of analyses. R has a wider range of functions and, in some cases, new statistical methods are implemented more quickly than in commercial software. However, this does not stop you from using your favourite statistical language because it is possible to use R from within, for example, Stata, SPSS or SAS.”

“Apart from academia, there are also several top-tier companies and institutions that use R for data analysis”, he explains. The BBC visual and data journalism teams are one group who works with graphics in R.

For a partnership between DataFirst and the UK Data Service, Takwanisa worked on a study to get a better understanding of the rural electrification landscape by using night light data captured through satellites. R was used for the data analysis and mapping.

It is such mapping that will be useful for ACEIR’s future research on spatial inequality in African countries, says ACEIR Ghana’s Dr Monica Lambon-Quayefio, who attended the training: “The mapping tools will allow us to show different types of inequalities in a dynamic and interactive manner. This will enable us to produce research outputs that will be more engaging especially for our policymakers. For example, showing economic inequality and inequality in the access to social services in an interactive manner, using R, across different regions in a country can tell a more compelling story to get policymakers to act swiftly than relying on text and static maps alone.”

Her colleague, Dr Nkechi Owoo, agrees: “R is both freely available and provides very professional-looking maps and other output. So, this is a definite plus.” The software does require some skill to master it, though: “I struggled a bit with the amount of programming and coding that is required for a simple statistical operation. For non-coders like me, this represents a steep learning curve. But with practice, this challenge may be easily surmountable.”

Fellow workshop participant, Fabio Andres Diaz Pabon from ACEIR South Africa, based at SALDRU, points out a longer-term benefit of the training other than learning to use specific functions of spatial representation in R to map inequalities: “Understanding the use of open source packages allows us to undertake research that can be more easily replicable and validated.”

The R training is offered by DataFirst on a bi-annual basis, although training has currently been suspended due to the COVID-19 pandemic. For more information, contact

 Article by Charmaine Smith, ACEIR communication manager.

COVID-19. For official information and updates visit