You may think of R as a tool for complex statistical analysis, but it's much more than that. From data visualization to efficient reporting, to improving your workflow, R can do it all. On this podcast, I talk with people about how they use R in unique and creative ways.
Hi. I'm David Keyes, and I run r for the rest of us. You may think of r as a tool for complex statistical analysis, but it's much more than that. From data visualization to efficient reporting to improving your workflow, R can do it all. On this podcast, I talk with people about how they use R in unique and creative ways.
David Keyes:Well, I'm delighted to be joined today by Ahmadou Dicko. Amadou is a Senegal based statistician who works for the United Nations High Commissioner for Refugees. In this work, Ahmadou and his team have developed unique strategies using R to manage, analyze, and communicate with data. In this conversation, I'll ask Ahmadou about his work, and he'll give me a walk through of some of the packages that he and his team have created to facilitate their work with humanitarian data. Ahmadou, welcome, and thanks for joining.
Ahmadou DIcko:Thanks for having me. I'm really thrilled to be, part of this podcast, particularly talking to you about, you know, my current data and what we're doing. So really excited.
David Keyes:Great. Well, maybe we can start out. I wanna get some information about your background, and I'm curious kind of how you got into R. But maybe actually starting out, if you don't mind just giving an overview of the type of work that you do today, what does your daily use of R look like?
Ahmadou DIcko:Thank you. Good question. As you said, I'm a statistician working from UNHCR, so the high commissioner for for refugees. So we are basically working on forced displacement, and I'm working from what we call a regional bureau. So I'm covering several countries in a specific region.
Ahmadou DIcko:In my case, I'm covering West and Central Africa. So the whole West Africa, Senegal, Mali, Burkina, and also Central Africa, all these countries, like, Cameroon, Central African Republic. And I think if you watch your news, you know, there's a lot of conflict, and conflict mean also lot of false displacement. So we are trying really to work with this population to find solution, also international protections. So we are dealing with a lot of data.
Ahmadou DIcko:And I think for the organization, statistics is, is not new, but, definitely, we are more and more new roles like data scientists, statisticians, like me, and was not there back then. And I think we are really trying to push for a new way to use data to improve and be basically, more efficient with it. So my role is definitely, like, some sort of mentor and data scientist. So creating data product, processing information to make sure that we are we do proper allocation, use the data the right way. So, basically, a bunch of predictive models, working on our official statistics because we also run a lot of surveys.
Ahmadou DIcko:And, so it's involved also a lot of methodology, and I'm really, really serving, actually, because I think getting the right data is key. So yeah. So a lot of a lot of work. Really really exciting work, to be honest, and a lot of challenges because we are working in really fragile situation where you don't have much and, where also it's really difficult sometimes to do a lot of things. You know?
Ahmadou DIcko:I mentioned service. How to run a server when you have conflicts around. So how are these type of challenges actually? So that's pretty much what we do as a statistician in the organization.
David Keyes:Yeah. That's great. I wonder if you could give maybe a specific example of a project that you've worked on recently just to help kind of make it concrete for people. Because I think, you know, when I think about the UNHCR, I think a lot about programmatic work, like going and helping people who are refugees directly. But, obviously, that's not the work that you are directly involved with.
David Keyes:So, yeah, I'm wondering if you could give me a a specific example to help understand the work that you do. Yeah.
Ahmadou DIcko:Sure. We have situation where we have population refugees that in our area, I mean, for, like, couple years, even more. And I think they are in a situation where also they need help. It's not like, let's say, the onset of a crisis, but they are still in in another country in need of international protection and support. One thing we did recently in Burkina Faso, where we have a lot of e internally space people was to run a survey that we call a result monitoring surveys, where we collect a lot of indicators actually on them and to see, you know, like, the level of well-being and, understanding the needs.
Ahmadou DIcko:That's really key and important. This is like a basic household survey. But I was mentioning the challenge of doing it in an area where, I mean, you don't have access to many, many conflicts, zone, and then the rest is really fragile. Also, it's really complicated. But, nonetheless, with my team and the the work we we did there, we managed with really good partners on the ground booking now to collect data on this population, and, we are actually processing the data now.
Ahmadou DIcko:The the goal will be really to create some sort of reports for the senior managers to understand exactly the dynamic of the situation because on the first survey, we're answering last survey in the past to understand if ticks improve, got worse for whatever reason, and, also, what can we do now to improve? Because, of course, we also have a lot of programs that we are doing. Is it working or not? Something we'll start doing more and more, and I'm also really excited about this. It's definitely evaluating what we are doing.
Ahmadou DIcko:We would like to push this further and efficiently use every, single dollar we're using for for the response. So that's one example. This is basically collecting data, analyzing data, and giving information to a senior manager to have, you know, all information they need to improve the life of this population. Some of them are in need of documentation. That's basically only the the only thing they need, you know, to just keep some of them the jobs and everything.
Ahmadou DIcko:And then you have to understand also the dynamic of the local job market and everything. It means analyzing also data from the post countries. So that is my priority of analysis. You can do the type of data we are collecting. But an idea is always pushing for definitely solution and finding a way to improve the lives of these people.
Ahmadou DIcko:And maybe the one of the big changes is really to also be more and more data driven. Right? Well, of course, because you always have human in the loop, but at least to get inside that, not be able to probably get to the past. And now with the tool we have and the capacity, we we have way more information.
David Keyes:Yeah. That makes a lot of sense. Great. Well, let's go back just a little bit because, obviously, these are a lot now. I'm curious kinda what your introduction to r was.
Ahmadou DIcko:Yeah. R and I, I think it's a long story now because, I'm a statistician, as you said. Basically, moral session slash econometrician, and, I was doing my grad school here in .com back in 20 I started in 20 9. And I remember back then I was the only one using r for whatever reason. I didn't know anything about r.
Ahmadou DIcko:That was funny because I think all my colleagues and the problem, they were just pushing for Stata, you know, because Stata is really, like, widely used by economists and econometricians. And, I was, like, really some sort of advocate for open source back then. I still run my Linux books and everything. I was pushing for open source. And I didn't want to have Stata because it was not, like, free, and it was quite expensive, actually.
Ahmadou DIcko:It still is, I I guess. And it and so I was looking for something. So I play with, Octave, the free version of MATLAB. I was so satisfied. And I found Art, and it was, like, 3 09.
Ahmadou DIcko:And it was funny because I didn't know how to do all of this, but I was really just pulling to this thing. And, yeah. So that's how I started, actually. And we didn't have much in terms of, books and everything. You know?
Ahmadou DIcko:And I was just holding on to one PDF I found online from, I think, the University of Toulouse, 1 professor. And I the only source of information I got for, like, almost a year. And the professor also was not using it, so I was basically on my own. They were but they were cool enough to let me experiment with it. But, so, yeah, I started, I think.
Ahmadou DIcko:Yeah. 09, back then. So it's been a while, I'd say, yes. Right? A little bit.
David Keyes:Wow. And I'm curious kind of, you know, over the years, what have been kind of milestones or, like, changes in terms of how you've used R in your work life?
Ahmadou DIcko:To be honest, I think it's going so fast, and, I think you would see I still use, Emax to to R because back then, we didn't have RStudio, and I'm just so used to it that I'm still using it. RStudio, first big milestone, to be honest, having, like, a proper idea to play with R. Back then, we had tin r or something, r quad. It was not that good, and Emacs was probably the best, but you have to learn Emacs, which is not always easy. But, this, of course, I mean, the the impact of our studio and everything, you know, the the the whole ecosystem and building really the community around the tidyverse and all these tools.
Ahmadou DIcko:I remember when I was starting, I was still thinking, should I know a ggplot? Was it a new thing? And or or Lattice, which was, like, really more established with the book and everything. For whatever reason, I picked Digiplot, and I don't regret because it was a really good investment. And, so, yeah, I think the ecosystem, more mostly around RStudio, they did a lot to push R to where it is here.
Ahmadou DIcko:Maybe one other thing is, like, RCPP and all these packages to provide more example of how to build c plus plus in r even c. And I think I remember back then the issue with r. It was always, oh, r is slow. R is so r is very slow. People were saying this, actually.
Ahmadou DIcko:And, also, we we cannot do big data analysis with r. I don't hear many people saying this now, actually, and I think for a long time, which is really cool because I remember back then was just a thing. And that's why I think RCPP and the the Tidyverse and all these packages, yeah,
David Keyes:interesting to hear you say that it r was slow. It couldn't handle big data because I I think now, in many ways, for people coming from, say, Excel, one of the reasons that they come is because of limitations on data size in Excel. So it's interesting to hear about a time when R was on the flip side of that.
Ahmadou DIcko:Yeah.
David Keyes:So in your work now, I I know it's not just you, and we were talking before, we hit the record button about other members of your team and kind of the work that they do. So I'm curious if you can kind of give a an overview of your team, what their roles are, what your collaboration in R looks like.
Ahmadou DIcko:Yeah. That's thank you. I don't even know if you can say team. We are we are chatting on a daily basis, working together, but we are also not on the same base. They are working, what, in each year, so we are on the same organization.
Ahmadou DIcko:1 is statistician. Another one is what we call information manager, but more like something between data science and data visualization. And all this work on r is really with these two people. So the first one is Hisham. Hisham is a statistician working in Panama.
Ahmadou DIcko:We have a regional bureau covering the Americas. And the other person I'm working a lot with is Cedric Cedric Vidon. He's also he's the information manager in Geneva and the go to person for everything data visualization and the design, also GIS. He's really good with this thing, and and he loves all. So so that's really cool.
Ahmadou DIcko:And, basically, why I'm saying, not a team per se because I think it was just like something ad hoc and organic. You know? Just naturally, we just found ourselves talking more and more. Oh, maybe it'd be cool if you can start working on this. I have this issue.
Ahmadou DIcko:I have the same issue. Let's do this Right? So it was not like, let's say, our supervisors and everything say, oh, you should work together or something from the top down. It was definitely something organic. But it's also because of many other people.
Ahmadou DIcko:For example, one colleague, Edouard, Edouard, who sort of pushed a lot for this internal art community, within the organization, our chief statistician, and many people really also making sure that we have the right environment to do this type of collaboration. But, yeah, I think, yeah, these 2 people the probably the top I'm working the most on this type of project. Maybe I will quickly present, but, but it'll just be a brief presentation because I think the thing is I collaborate with them, but they are usually the expert on this thing. They they know way more than than I do on on on on this. Yeah.
Ahmadou DIcko:But it's cool.
David Keyes:Well, that's really interesting that it wasn't, you know, you working. You weren't put together with them, you know, by your organization. It sounds like the r users kind of found each other, and found ways to collaborate given that you you're all our users and have have an interest in it. So that's that's really interesting. Talk about you you work, of course, a lot with humanitarian data, and, of course, you use R a lot.
David Keyes:So I'm curious, you know, why is R an effective tool for that type of work versus any other tool that that people doing that work might consider using?
Ahmadou DIcko:That's a good point. Really good question, actually. And, probably be very biased because I have a little bit of strong opinion about this. But it's not really. For me, it's more like, open source first.
Ahmadou DIcko:So it can be Python tomorrow, can be Julia or whatever, even if I prefer you that Python. But, anyway, but it can be any of these tools. Actually, I believe that the humanitarian principle and when people think about humanitarian work and everything, I think it goes well with the open source philosophy. I was lucky enough to have always worked into the public setting. I was a researcher before being a humanitarian, so I always worked on the use of data for social good.
Ahmadou DIcko:And I would talk to myself, it makes sense to push for this community based tool building around because Open Source is just free. You have a community behind. You have people. They have they are sharing, and you have a lot of all these things that I feel like really goes hand to hand with what we do as humanitarians. So that's the first aspect.
Ahmadou DIcko:And the second aspect, actually, as a statistician, I think r is just natural. You can do a lot. You have done the library. And, of course, now in many graduate program, people are trained in R. So it's much easier also to find other people using it and to collaborate with them.
Ahmadou DIcko:So, yeah, now it's much easier. Back then, it was more complicated and I think we are still pushing to have our having, like, a more prominent role in the humanitarian data world, actually. I see more and more for example, lately, are being pushed in the pharma. I know the pharma industry was more like SaaS. It's still SaaS, to be honest, but I see, like, more push, and I think I I would love humanitarian the remainder of the world also to be the same.
Ahmadou DIcko:And I think we are just trying to showcase what we can do because the best way to show that the tool is working and you can do the work is definitely with, okay, this is the tool I built. This is what I can do. This type of report, this type of analysis. So in terms of just capacity flexibility and what you can do, it's just limitless. Right?
Ahmadou DIcko:It's just like your imagination, your own time, and also surrounding yourself with people that have different skills and they can support and help you and also with the same passion. And that's probably the hardest, you know, finding the right person to work with. You're gonna do everything by your own. As you mentioned at the work, we don't control too much our agenda. I can talk to you now, and then call me tomorrow.
Ahmadou DIcko:And so there's this thing you have to go to this country, and that's it. So the small amount of time we have to work on this thing, I think, having really dedicated people, much related about it, is really key. And and that's why also I think I was lucky enough to have worked with a lot of colleagues in your management data space, very good in our and also using it to make a difference on the field. And in terms of capacity, yeah, building on top of all these, nice tools from the tidyverse in terms of data manipulation, data release with ggplot and all these tools, but those all sort of analysis from classical stuff, machine learning, econometrics. You name it.
Ahmadou DIcko:You have everything in R. So I feel like R is really a really nice tool. And to date, we have so many courses, books, everything in a very large community. Maybe the one one thing that is a little bit missing or not is, like, for us by us, I mean, usually, I don't know, a classical humanitarian organization, UN or not UN NGO. They would rather have a contract with someone rather than, you know yeah.
Ahmadou DIcko:This is probably the same for a company, also a private company. So having, like, more companies like RStudio in France, ThinkUp, and even you, what you are doing, you know, with the consulting work and everything, which is key because then you have someone that can you know, you can call if something is not working. And I think probably need more and more people around and also pushing to to to work with humanitarians. I think that probably be also one of the changes because people like myself, really passionate is one thing, but at at at some point, we need to sign a contract, we need to talk to senior management, they need to put us on resources and everything, and that's probably also where I feel like we need. There is something that can be done to to to to just be at the next level, have maybe way more people using it.
David Keyes:That makes a lot of sense. Just out of curiosity, what other data tools are are you seeing? I mean, you mentioned, for example, in pharma, there's a pretty strong push to move to r, from SAS, like you said, in in that industry. In the humanitarian data space, what what are the main tools that you see people using?
Ahmadou DIcko:Excel Excel is king. And I think yeah. And I'm not really an Excel publisher, to be honest. I use it for to look at the data, to do things here and there, not real analysis. But I think it's just everywhere.
Ahmadou DIcko:And when you start your machine, at least work machine, you have Excel. So when you think about your management, someone that can send, like, after an earthquake somewhere, which just has laptop and everything. So having good Excel skills is really, like, you know, something key. But Excel and GIS, we do a lot of mapping a lot. And so you have, like, Esri all the Esri things because of legacy and everything.
Ahmadou DIcko:I will say it's biased. It is my own opinion. It's not really marketing strategy or whatever. For example, I'll push for QGS because it's open source, and it's really, really good now. It's not what it used to be back then compared to Args.
Ahmadou DIcko:But, yeah, Excel, Arjis, and then now all the BI tools. Probably, I have been using some organization. It can be some others are using Tableau. For example, the WFP, they use a lot of Tableau first. It's Power BI, and it has changed the game, to be honest, because I remember pre and now what's
David Keyes:what
Ahmadou DIcko:it is now. Back then to do a dashboard, it was more static dashboard, and it was mostly with Adobe tools like illustrator and stuff like this. You take your time to design your your document. I think people still do do this for some documents, but now it's much easier with Tableau, Power BI, So, yeah, Excel, Power BI, Tableau. One of these JS tool, it's a QGS or or or RGS.
Ahmadou DIcko:Probably the main tools for
David Keyes:Yeah.
Ahmadou DIcko:Humanitarian data people.
David Keyes:Yeah. That makes sense. Great. Well, I wanna switch gears just a little bit and talk about, some of the work that you've done. So you and your team have developed several packages to work with data from various sources that are, I think, you know, relevant to working with humanitarian data.
David Keyes:You've built one to work with, Covo, and one to work with UNHCR data and another package to work with humanitarian exchange platform data. Can you just talk about the kind of motivation to make those packages? Where did that come from? You know, what have the packages done since you've made them?
Ahmadou DIcko:Yeah. Thanks. I usually develop to solve my own problem. Usually, not all the time. Sometimes I also like to collaborate with people if they come with the issue and I find it exciting, I work with them.
Ahmadou DIcko:But most of the time, I do things just to solve something because frustrating for me. And Chrome bot toolbox is basically, the go to, tools to do a data collection for humanitarian worker. So, basically, you have a server where you host your your survey, and you have clients and can even be on your phone working offline and everything. It's really widely used in the humanitarian community and not just with HR, but many other agencies. So we expect usually people in that space to know a little bit about Cobalt toolbox.
Ahmadou DIcko:But when you collect the data, the the data is on Excel on the server. I have my report. I did I do my survey. I ask the question to people, and then the data go to the server. And then I have to go there every time I download.
Ahmadou DIcko:I put it in a folder and I do my analysis. Well, it's not really, like, an ideal setup for me, and I wanted something really, like, faster in terms of just refresh and, for example, building pipelines and everything. And, luckily enough, I think they they were also, like, working on some sort of API, a new version of the API, the version 2, which is worth, like, with an upgrade compared to the first version. But we didn't have much. I I I don't remember.
Ahmadou DIcko:We are now package using the v 2 when I started working on this. So I said, well, why not just wrapping this? And to be honest, I was highly influenced by our website. I really love the work they are doing. I forgot to mention them when I mentioned, like, game change in our community.
Ahmadou DIcko:I think our Open side pushing for reproducibility and all these packages to to access data. It's, like, something that's really resonated a lot with me. So, yeah, it was the first one package called, I o t k on our website. And o d k is like basically like Kobo toolbox more or less. Kobo is some sort of fork of o d k.
Ahmadou DIcko:So I was saying, wow. This is really cool what they did actually, and I was really impressed. And so when I had the opportunity, I said, yeah. We're not working on this, but I really took my time. It was really slow.
Ahmadou DIcko:Like, one fight at a time, one one commit at a time until it was, like, really usable, and I just pushed it pushed it to crap. But I'm I'm using it really on a daily basis. It's really, really it'll be super useful, and I'm really happy to see that also all the colleagues even outside of Ulyashia in manual community are using it. And it's funny because there's a lot of silent user. You don't even know how many people are using your package usually.
Ahmadou DIcko:You just know when it's not working, you have an issue or sometimes people say, hi. Oh, I'm using it. It's really cool. But most of the time you you are you are surprised when people say, oh, I used it. But I find it really useful for my for my line of work.
Ahmadou DIcko:I can do a part of a trials report we did. And, yeah, really helpful.
David Keyes:Well, I would say I was I was almost a silent user. I was working with a client recently. They do post conflict surveys in countries where there's been war. And so they did some surveys in Colombia and Sri Lanka using Kobo to collect the data. And I said, I think there's a package.
David Keyes:I I've heard of this package. I've never used it. And I was trying to get us to use it. It didn't actually work out because they needed to do a bunch of things with the translation after the data came in. I don't know.
David Keyes:Maybe there are ways to do that built into Kobo toolbox, but given our time frame, it didn't make sense to use it. But, that's how I came across it recently.
Ahmadou DIcko:That's nice. And it
David Keyes:looked like a a a great package. So just overall, I mean, it seems like I've used, for example, there's a Qualtrics package to access data or Google Sheets 4, I think of kind of in a similar vein where you have data that lives in some source. And then as opposed to going and downloading the data, you can just access it directly. It sounds like your package, r Kobo toolbox, is that exact same thing for Kobo. Is that right?
Ahmadou DIcko:Exactly. That's exact the the exact same thing. And then after that, you just put your design decision here and there. But that's exactly it. Actually, Qualtrics is a good example.
Ahmadou DIcko:And but, for Google, I was not familiar with it, actually. So I'll probably look it up. But, yeah, Qualtrics is a really good example, actually, the way they they did it. But we don't use Qualtrics. So, I didn't
David Keyes:I mean, I know it's expensive. Yeah. And I don't know offline, you know, how much it works offline. Obviously, you have specific needs in terms of the the places where you're doing surveys. Hey, David here.
David Keyes:Just wanted to let you know that at this point in the conversation, we switched to a screencast. Now obviously, showing code doesn't work very well in an audio podcast. So if you wanna see the rest of this conversation, check out the video version of this podcast on YouTube. You can find a link to that in the show notes. Great.
David Keyes:Well, this is super helpful just to see I I mean, I think, you know, the value of a package like this or or the other packages is just that you can access that data so easily. And at that point, it's just a data frame that you can do whatever else you do with data frames. So all of the, you know, tidyverse syntax that you're familiar with is gonna work just the same with this once you once you bring the data in.
Ahmadou DIcko:I'm very excited about the humanitarian data science Yeah.
David Keyes:I can tell.
Ahmadou DIcko:These type of things. And I think we are just scratching the surface of it.
David Keyes:Yeah. Of course.
Ahmadou DIcko:We are so behind, and we are also looking what other people are doing in other industries. That's why I also looking a lot of your work. Your reports, the parameterized reports, and, your work on branding, this is just definitely what we need. When I look at your PGS work and all this report, this is just what our senior managers want. Yeah.
Ahmadou DIcko:And that's why people are investing, you know, within Adobe tool and all these tools. Just have this report. And if you can do it from us Yeah. They don't really care too much because for them is the end product.
David Keyes:Right. And I
Ahmadou DIcko:think you can save a lot of time and money, actually, if you
David Keyes:invest
Ahmadou DIcko:in this tool. And in terms of quantity, reproducibility
David Keyes:Yeah.
Ahmadou DIcko:Or less error because it's
David Keyes:less obvious.
Ahmadou DIcko:So I I see I see tons of benefit, actually, of switching and Yeah. Switching people. But it comes with we need to do a lot of trainings Yeah. To build the making sure that and that's the thing. But I think it's a it's a it's a good investment.
Ahmadou DIcko:Well, and
David Keyes:what we always tell people too is if you're just gonna make one report, it's not worth doing it in our but if you're doing any kind of parameterized reporting where you're gonna make, you know, dozens or hundreds of reports, you don't wanna do that by hand and, you know, Illustrator or InDesign or whatever. So at that point, that's when it makes sense to invest in something like the type of work that we do. Great. Well, I'm a do, thank you very much for coming on, for talking about how you use R in general and and doing the walk through. It was really, really useful.
David Keyes:So thank you for joining us.
Ahmadou DIcko:Well, really, thank you for having me. It was really a blast chatting with you, and, really keep pushing, continue doing what you are doing. Your book on learning are I think I remember many friends from the other committee sharing this book with me personally saying, this is amazing. This is a good thing for them. And so we're talking before starting with silent user.
Ahmadou DIcko:There's a lot of people also silently using a lot of the good stuff you are doing and what you are sharing in the community. And I think I can see a lot of, things that are similar to what we do in the material world, and I hope you'll continue to push and do also this type of work. I can see a lot of values. I hope we'll continue discussion. And hit me up if, you are dealing with Kobo and any type of survey at work.
David Keyes:Okay. That sounds good. That's it for today's episode. I hope you learned something new about how you can use r. Do you know anyone else who might be interested in this episode?
David Keyes:Please share it with them. If you're interested in learning r, check out r for the rest of us. We've got courses to help you no matter whether you're just starting out with r or you've got years of experience. Do you work for an organization that needs help communicating effectively with data? Check out our consulting services at r for the rest of us.com/consulting.
David Keyes:We work with clients to make high quality data visualization, beautiful reports made entirely with R, interactive maps, and much, much more. And before we go, one last request. Do you know anyone who is using R in a unique and creative way? We're always looking for new guests for the R For the Rest of Us podcast. If you know someone who would be a good guest, please email me at david@rfortherestofus.com.
David Keyes:Thanks for listening, and we'll see you next time.