If you’re just at the beginning of your journey learning R programming and you’re looking for tips, there’s a lot you can learn from Shelmith Kariuki.
Shel has years of professional experience working in data science, and years of experience teaching statistics and data skills to others. She’s a data analyst, an RStudio certified Tidyverse instructor, and a community leader — a co-organizer of NairobiR as well as a core team member at Africa R, the consortium of Africa-based R user groups.
In other words, she knows a lot about teaching and learning R. She recently took some time out of her schedule to speak with Dataquest about her own R learning journey and the advice she has for R learners today.
Getting Interested in R Programming
Over the course of earning a Bachelors in Actuarial Science and then a Masters in Applied Statistics, Shel was exposed to the basics of programming in R quite early. And during her masters, when she became a teaching assistant / lecturer in statistics, base R became part of the curriculum she was teaching her students.
But it didn’t have much meaning to her, she says, until a student came to her office and asked how learning R was going to help them in life.
“As a lecturer, you put on that brave face and say, ‘Yes, this will help you in life,’” she says. “But actually when I went back to my room, I thought about that a lot. What’s next? Where would we actually apply these things?”
So she did what most of us do when we have questions: “I Googled. I took my phone and Googled ‘how can we use R to solve Kenyan problems?’ I didn’t know what to Google. And so I Googled that, and I bumped into a lot of things.”
She found other Masters students who were using R for their theses, and she found blogs on Data Science Central about R programming that opened her eyes to a whole new world. She discovered RStudio, got onto Twitter, and discovered the #rstats community there. And she loved it.
“At this point, after some time I felt academia was not for me,” she says. “I really wanted to do something different.”
Having finished her Masters, she was still working as a lecturer, but she started looking for work in data science. At the same time, she started building projects to teach herself more about R. “I would log onto the internet, get some data and just go through stuff. I’d Google: how do I create a table in R? How do I create a graph in R? How do I change colors? Such things.”
Eventually, she saw an ad for a data analysis job, applied, and then forgot about it. She wasn’t optimistic about her chances, she says, because her background was in academia, not data science. But to her surprise, they liked her application and sent her a data task to complete.
“I’m telling you, I Googled from the word go,” she laughs. “I think I almost Googled everything […] I remember even Googling what
Tip 1: Don’t Google Blindly — Learn What You Google
The not-so-secret industry secret of programming is that everybody Googles. But Shel’s secret is that she’s not just Googling to find an answer. “I don’t Google blindly,” she says. “I try to understand.” So as she worked through the data task for that job application, she was Googling, but she was also learning what she Googled.
She did well enough that she got sent a second task. “I was like, ‘Wow, if only these people knew I cheated!’” she says. “Because to me, [Googling] was cheating.” But she kept at it, submitted the second task, and got called for an in-person interview.
That’s where her approach paid off. In the interview, she was asked to explain some of her code. “Remember, I don’t Google blindly,” she says, “so by the time I walked into the interview, I knew what all of my code did.” She explained it well, and that’s how she got her first job in data science.
“That’s when I came to realize Googling is not wrong,” Shel says. “It’s okay to Google, even the best people also Google.” The key is to Google the way that Shel does: don’t just find the answer and copy-paste; work to understand the answer before you move on.
“I’ve seen people who have Googled blindly,” she says, “but when it comes to time to work on that person’s code and you’re like, ‘What does this function do?’ They’ll say, ‘I actually don’t know. I Googled.’”
“Especially when I do my own analysis,” she says, “I should be able to explain every piece of code in that analysis. Because, one, that’s how we learn, and two, your code may reach different people. When they come back, even two years later, asking you about a certain function, you should be able to explain it because you own that piece of work.”
Tip 2: Learn How R is Really Being Used
Another thing that helped her learn R programming, Shel says, is that when she started to engage with the R community online, she got to see what other people were doing with R, and how it was being used in the real world.
“You need to know how R is being used in the field,” she says. “That’s the first thing. You just don’t go take a course blindly without knowing what exactly people are doing in the field.”
Learning about how people are using R will also help you determine how your own learning path should look.
“Once you see what people are doing, that’s when you get to know what makes your heart tick. What do you want to do? Do you want to be a data analyst? Do you want to be a machine learning engineer? For me, that’s the first thing.”
Tip 3: Engage with the Global R Community…
“Following people who are in the industry” was important, Shel says, “because that’s how I got to learn about #rstats that’s when I got to know about Hadley [Wickham]. He would post amazing things and I would Google about him and other people who would post interesting stuff.”
“I found looking at their work was encouraging,” she says. “Just following them and seeing how people are evolving. What packages developers working on, etc.”
“I aim very high. I want to be an R guru.” Looking at what R gurus were working on helped Shel figure out what she needed to learn, and what kinds of R projects had real-world use.
“It’s really, really important to have people you look up to that can show you the way,” she says.
Tip 4: …But Don’t Forget to Engage Locally
“The other thing that is really crucial is meet-ups,” Shel says. “I really, really, really thank God for meet-ups because I got to know what machine learning is in a meet-up.”
“I knew what regression was from my Masters, but the first time I heard machine learning I was like, ‘Oh my God, what is machine learning?’ Then I went to a meet-up and people explained it to me. I was like, ‘Ah, so I know a bit of machine learning!’ I have learned so much from meet-ups.”
“The first meet-ups I used to attend were meet-ups by Nairobi Women in Machine Learning. They used to be held on Saturday morning and it was always amazing learning something new,” she says. At the time, she was in her first year of work as a data analyst, and she quickly found that the new things she was learning at meet-ups were things she could apply to her day-to-day work.
“Meet-ups are also a way to network. You get to know what people are doing, and it always opens your mind,” she says. “Especially if all of your colleagues are in the same field, sometimes it’s good to meet other people and see what they are doing. You get to learn stuff from them, and it helps build your portfolio.”
Tip 5: Build “Pet Projects”
Speaking of portfolios, building out the projects to fill one is critical, Shel says. It’s an important step that she says new learners often skip.
“For example, someone will enroll for a course at Dataquest and get a certificate showing that they successfully completed the course. Great. But what next? How do I know that you’re skilled? How do I know that you actually understood the course? It’s not always about the certificate at the end of the day.”
“I always advise newbies that especially having a public profile like GitHub really helps, because that’s the only way you sell your work,” she says. “It’s very frustrating when you’re doing 100 courses, but you’re still jobless. But then why are you jobless in the first place? Is it that the course did not help you? Not really. It may be that you don’t know how to market your skills.”
(This, by the way, is advice that we here at Dataquest strongly agree with. We’ve written about data science certificates and why a certificate itself probably won’t help you get a job. Our courses end with guided projects to help learners build their portfolios, and we also encourage students to build and share personal projects with the help of our community.)
“Anytime I have a short training,” Shel says, “I tell people, ‘Create a GitHub profile and whatever I’m going to teach in this session, do some tasks, and post them publicly.’ You never know who might see it. Sometimes it’s a way of marketing your skills to potential employers. ”
In fact, having projects available publicly can be the difference between getting a job or not, Shel says. If an employer has data they need analyzed with a quick turnaround, seeing your certificate isn’t going to be enough to convince them they should contract you to do their analysis. But if they can see a similar project you’ve already worked on in your portfolio, they know they can rely on you to do the work.
An employer, Shel says, “wants to see something that makes them say, ‘Huh, this is exactly what I want you to do for me, or this is exactly what we are looking for’”
Tip 6: Don’t Be Afraid to Start Small
“One piece of advice I give people is: we are not perfect and we are not Superman,” Shel says. “We don’t know everything. You will not be good in a week or a month. You can’t rush. The best way of learning is experience.”
“You can’t learn data analytics, data science, machine learning, AI, all in one month all at once. I don’t think anyone has ever done that. For me, I had just to know how to create a table and a graph in R to get my first job. From there, I learned more and more things: how to optimize my code, how to build dashboards in R, how to do this and that, over time.”
“We always have to take things a step at a time,” Shel says, and that can be particularly challenging in data science, where the hype cycle can make you feel like you need to jump to learning the latest hot technology.
“You don’t have to learn everything. Just learn something that will help you get your first job. That is, if you don’t have a job already. If you do, learn something that will help you grow your skills because at the end of the day our aim is to grow skills.”
This start-small approach can also apply to employment. While your dream may be a full-time job, putting your portfolio online can sometimes land you shorter term work.
“If you can work on a task and post it online and get a small contract for five or six days that will pay your rent for the next two months, who would hate that?” Shel says.
That’s another reason having an online project portfolio is key: “How will someone reach out to you if your work is not online?”
Tip 7: Teach Others
“The more you train others, the more you get to digest all the information you learned,” Shel says.
And while Shel herself is an RStudio-certified trainer who’s educating others at different data science events, you don’t need that kind of opportunity to start learning through teaching. “Just look for five people and train them,” Shel says. “Train them on the tidyverse. And if you train two times, three times, you will never need to go back to your books or to that online course to remember what tidyverse was or which function was used for what task.”
“Training can be with friends,” she says. “Insist that you want to explain something to one of your friends.”
“I used to be like that, even at work, asking ‘Can I explain to you what this code does?’”
“The more you explain, the more you realize either you know or you don’t know. As you explain, you think, ‘By the way, why does this happen?’ This means then there is a gap somewhere and you need to learn more.”
Teaching, in other words, helps reinforce what you do know and highlight what you don’t. Explaining your code — even to people who might not have asked for an explanation — can help you learn it better.
Plus, training others is rewarding. “When you teach someone what you know, you’re giving them the knowledge. You’re giving them the power to be able to get a job themselves using that skill. They then go teach other people, and your one training will lead to five people getting employed.”
“There’s nothing as amazing as that,” she says. “It actually blesses your heart.”
Tip 8: Take Chances (and Give Chances)
Putting yourself out there and “shooting your shot,” as Shel puts it, can reap impressive rewards. That’s something she’s seen as she’s helped to build the Africa R users groups. In the R community, when you reach out and ask for help, people respond.
For example, multiple folks from RStudio have helped Africa R by appearing to give talks and trainings. “That’s huge,” Shel says.
On the other side of the coin, while she says the global R community has been very supportive of the growing R community in Africa, she’d love to see more global job opportunities. “I know there are countries that have strict restrictions when it comes to work permits,” she says, “but there are others that don’t. Having more diverse workplaces would benefit some Africa R members. I’d love to see more opportunities that are open to everyone.”
(Although she’s quick to add that this problem has less to do with the R community than with the world in general. The global R community, she says, “have supported us [Africa R users] so much. I don’t think there’s anything we can say that they’ve not helped us with.”)
There’s a lot we can learn from the details of Shel’s experience learning and teaching R, but here’s a quick review of the most important things for new learners:
- Don’t Google blindly — Google as much as you want, but learn and understand the answers you find, don’t just blindly copy-paste them into your code and move on.
- Look at what others are doing with R — this will help you understand how R’s used in the real world, and help you figure out what you’re most passionate about doing with it.
- Engage with the global R community, but meet colleagues locally — you should keep track of what global leaders are doing with R, but you should also learn from and network with the folks around you.
- Build projects — you need to demonstrate the skills you’re learning, and share them publicly. You never know what job opportunities this might bring your way!
- Start small — Rome wasn’t built in a day. Don’t be distracted by the hype of a hot new technology, or the temptation to try to learn everything.
- Teach others, and explain your code — It helps you learn, and it helps others too. Win-win.
- Take chances by asking for help, and by helping others when you can — When you ask for help, the worst that can happen is somebody says no. Take your shots, and then help out others when they’re taking their shot with you once you’ve got some experience.
If you want to learn more about Shel and her experience, you can check out her personal site and follow her on Twitter. You can also connect with the Africa R users organization she helps run via their website or Twitter.