programming language of choice (Python, Scala, Java and R) to interact with their suite of tools.

In addition to a processing engine such as Apache Spark, in some cases, when we cannot write our own code to perform data analysis, we need off-the-shelf software packages for analyzing the mobile data. In this regard, we report on specialized software packages for analyzing mobile data. Here, we cover only open-source-based software packages, as opposed to proprietary software, because it is easy to share the analysis outputs with a wider community of users. At the time of writing, there were two open-source packages for analyzing mobile data on the market: Flowkit<sup>8</sup> and CDR Data Analysis Tools.<sup>9</sup> Both are designed specifically for analyzing CDRs although they can easily be extended to analyze GPS-based or other trajectory type data sets. The next question may be how to choose one over the other. There are several aspects that can guide that decision, but one we would mention here is the available programming APIs. Flowkit has a Python API which may appeal to people who work with Python, while the CDR analysis tool has a command line interface only. However, one can easily use both software packages in a single project because they have different features.

# **CONCLUSIONS**

In this paper, we have shown that opportunistic data such as CDR coming from mobile phones bring the opportunity to understand mobility in a very low-cost manner, as opposed to relying only on traditional surveybased approaches. These data can become very useful to rapidly track and monitor mobility patterns that could help governments to evaluate the efficiency of different mobility restrictions, in efforts to control the spread of COVID-19.

It is worth mentioning that CDRs need to be integrated with other background data such as that from a census, to capture the socioeconomic characteristics of the target population. We have provided several lessons and experiences which should be useful to others who would like to replicate similar work. We summarize these key lessons in the following paragraph.

The first and perhaps most crucial step when dealing with CDR data is to negotiate access to the data. We have learned from this project and others that although there are several avenues to access the data, including the use of third-party firms, if there is time and financial resource constraints, then working with the telecom regulators and involving all key stakeholders works best. Once the permission to access the data has been granted and a memorandum of understanding has been signed, the data need to be properly stored. For this, we recommend the use of a Hadoop-based system for both data storage and, subsequently, data processing. We have produced two main categories of outputs in this work, as follows: OD matrices and individual-based mobility characteristics. We have shown that these analysis results do match with expected and prior studied results. We investigated how individual-based mobility characteristics (radius of gyration and average number of trips) vary by wealth and found a slight correlation between wealth and shorter trips.

# **ACKNOWLEDGMENTS**

We thank NATCOM for agreeing to share the CDR data which we used in particular thank _Victor Barber Richards_ , and the Ministry of Transport for their leadership. The team would like to acknowledge the timely and valuable support, guidance and advice received from _Gayle Martin_ , Country Manager of Sierra Leone, _Nicolas Peltier_ , Practice Manager for Transport AFR and _Olivier Dupriez_ , Manager for DECAT. Special thanks colleagues, _Georges Bianco Darido_ , Lead Urban Transport Specialist and Global Lead for Urban Mobility GSG, _Holly Krambeck_ , Senior Economist, _Vivien Deparday_ , Disaster Risk Management Specialist and to _Andrew Nelson,_ graduate student at UC Berkeley. The team also received logistics support from _Konjit Negash Gebreselassie_ , Program Assistant, _Balume Alpha Abonabo_ , Team Assistant and _Allan Dunstant Odulami Cole_ CO Program Assistant.

This work was financed through a grant provided by the Global Facility for Disaster Reduction and Recovery (GFDRR).

> 8 https://github.com/Flowminder/FlowKit 9 https://github.com/shibalab/CDR-analysis-tools-s

20