#10 Data Science, the Environment and MOOCs
19 Feb 2018 · 54 min
Roger Peng, a biostatistics professor at Johns Hopkins, discusses studying air pollution's health effects through massive data integration and prediction models. His Johns Hopkins Data Science specialization reached 5-6 million MOOC enrollments by teaching concrete wins first and making R more approachable through the tidyverse.
Chapters
Hi, I'm Maggie, VP of Curriculum at datacamp, and I know firsthand how overwhelming it can be to keep up with the rapid changes in data and AI. But staying ahead doesn't have to be hard. That's why our curriculum team has curated the best learning content to help you and your team stay ahead, covering everything from data and AI literacy for busy executives to cutting edge generative AI for developers, and everything in between. Whether you're upskilling yourself or your team, we make learning practical, engaging and flexible. It just works. Power your data and AI transformation journey.
On datacamp.com in this episode of Data Framed, a DataCamp podcast, I'll be speaking with Roger Peng, professor in the Department of Biostatistics at the Johns Hopkins Bloomberg School of Public Health and co founder of the Johns Hopkins Data Science specialization. Roger is also a well seasoned podcaster on not so Standard Deviations and the Effort Report. Today we'll talk about data science, its role in researching the environment and air pollution, massive open online courses for democratizing data science, and much more. I'm Hugo Bown Andersen, a Data Scientist at DataCamp and this is Dataframe. Welcome to dataframed, a weekly datacamp podcast exploring what data science looks like on the ground for working data scientists and what problems it can solve. I'm your host, Hugo Bown Anderson. You can follow me on Twitter HugoBownt and DataCamp@DataCamp. You can find all our episodes and show notes@datacamp.com Community Podcast Hey Roger, and welcome to Data Framed.
Thanks for having me.
Such a pleasure to have you on the show and I'm really excited to have you here to talk about data science, the environment, massive open online courses, the R ecosystem. But before all of that, I'd like to find out a bit about you. What are you known for in the data science community?
Oh, this is. You should know. This is a horrible question, right? Because Absolutely.
That's why I open with it.
Well, part of the problem is that I feel like I've been doing this for so long that different segments know me for various things. So it's kind of hard to pin down one or two things. But let's go through. I think most people probably know me because I work at Johns Hopkins. I'm a professor of biostatistics there. I've been there for about 12 years now. And yeah, I do a lot of statistics research and kind of teaching there. More recently, I think people know me for kind of. I've been in R for a long time. I've been using R For over almost 20 years now, I've been a user, I've been a developer. I used to contribute a lot to, you know, back when they had mailing lists. I mean, I think they still do, but it's not as active. And now I teach these kind of massive open online courses in data science which are heavily focused on R. And I think a lot of people have been exposed to me, you know, kind of in that manner, watching all my videos and such. And then even more recently, I think I've been doing some podcasts. I have one podcast with Hillary Parker, who's at Stitch Fix, it's called not so Standard Deviations. And so I'm always, obviously I'm always excited to be on a podcast. And I run a blog called Simply Statistics that I do with Jeff Leak and Rafael Irizarry. So depending on kind of where you entered my life, you might know me for one of those three things.
And I think the first time we spoke, I told you that I actually took your MOOC in the early months of January 2013, before the specialization actually existed. Yeah, and that was my first interaction.
With R. Yeah, I think you got version 0.1 of that, actually.
It was incredible. And this many years later on I'm at Data Camp, so it's always very.
Gratifying to hear people say that. It's just exactly kind of what we want, as many people as we can, to kind of be exposed to R and to kind of learn data science. So it's, it's great to hear that.
So how did you get into data science initially?
Oh, you're, you were going back quite a bit. I mean, I, I originally majored in math at university and, and I, you know, I have to be honest, I wasn't, I'm not, I was not destined to be a mathematician, but as part of the math major you had to take some statistics courses and probability courses and, and I really enjoyed those. And so I, although I can say I can't say I did very well in those courses, but I really enjoyed them. And so I kind of decided that I was going to pursue that. I briefly thought about maybe being a software engineer after college, but decided I didn't want to do that. So I decided I was going to go to graduate school and do a PhD in statistics. And so I went to UCLA to do my PhD and that department at the time, it was a little unusual. It was very applied, very data oriented, very data analysis oriented department. And so it had a huge influence on me in terms of my Education in terms of my philosophy. And so that kind of the roots of it all. And I think I've always kind of enjoyed data science and kind of data analysis, you know, from the, from the get go. So that's kind of where things got started, I think.
Yeah. And it sounds like during that time you were doing data science, just that term didn't necessarily exist.
Well, there are those that would argue that I think data science is just all those things. But nevertheless, I think it's very influenced by the people that I learned from at UCLA who kind of had this sense of you need to take ownership of a whole problem, to think about the questions being asked and to kind of how the data is collected and to kind of understand the entire process by which data is analyzed. So I think that has evolved now into this huge area of data science and machine learning.
I love that you say you're not destined to be a mathematician or you weren't destined because my. I went to grad school in pure math and I feel exactly the same about myself these days. So.
Yeah, no, I mean, I took real. I took real analysis three times. So. All right, I think I got it on the third time.
How many times did you take complex analysis? Oh, that can be for another. For another conversation. Yeah, I think so. I'm really interested that you, you worked in software engineering as well before moving into biostatistics or concurrently. What type of role do you think your software engineering skills have played in what you're interested in and how you approach your work now?
Well, I think, you know, it played a big role in my kind of career development because I think, you know, at the. When I first started out in statistics, the idea that it would be useful to have knowledge of software engineering was very unusual. Not many people had any training in kind of software engineering ideas or principles or practices. And of course, software engineering practices have evolved quite a bit over time. But even, but there were kind of, you know, established kind of best practices and things like that for developing software. Even, you know, in the kind of late 90s, early 2000s when I started out and many very few people in statistics kind of had that kind of training. So I thought I was kind of a point of. It was a, as you would maybe say, like a differentiating factor for me in terms of my ability to kind of develop software and kind of think about how things should be built and kind of to use that to kind of build tools. I think things are quite different now. There's the kind of ideas of software development and Software engineering are permeate data science now and I think is a good thing. And I think it's. And if you look at things like the tidyverse and R and all these other kind of new recent developments, a lot of that is infused with the ideas of software engineering and software development. And I think it has changed the way we do data analysis for the better.
So now you work in environmental biostatistics and you research the health effects of air pollution and climate change, for example. What are the major challenges facing these fields?
So I think that one of the biggest challenges from the perspective of a statistician is that the signal, the signal to noise ratio in this kind of problem is relatively low. So air pollution, I think, is generally understood to be a harmful thing, a harmful environmental exposure, but it's not something that just knocks you over dead, you know, in the middle of the street. The connection between air pollution exposures and health outcomes is inherently kind of weak. Right. But because everybody is exposed, everybody has to breathe and every, you know, and so the, there's a lot of kind of this huge population exposure. It's a really important problem for, you know, for everyone across the world. So I think the inherent kind of weak signal in this kind of problem is, makes it interesting, makes it to statisticians. And what it requires then is in some areas, you know, gathering huge data sets. And the work, a lot of the work that I've done, we've gotten huge administrative databases for health outcomes, looking at large networks of air pollution monitors, things like that, and trying to link them together. So there's a huge kind of complex data management, data integration problem just to be able to kind of get set up to answer this kind of question.
In terms of the end game of this type of research. Do you need to deal with policymakers and legislators as well? Is part of your work, I suppose, is what I'm asking to communicate these technical results where you've extracted the signal to affect policy.
Yeah, so that's a big part of the endpoint of all this work. And especially in many countries where they have environmental regulation, like in the United States, the policies are typically informed by the, the latest and the best scientific evidence. And so in the United States, for example, the Clean Air act, the regulations that kind of govern the air pollution standards, specifically say that they have to be informed by science. And so a lot of the work that we do is where after we publish them in the journals, you know, they get fed into the evidence base that is developed by regulatory agencies and we do a Lot of discussion. We do a lot of talking to environmental agencies, public policymakers, to understand kind of what is the margin of safety for kind of regulation and from air for air pollution exposure.
And what type of specific questions do you look at in your research?
So I'm interested in kind of two facets of air pollution research. One is kind of the outdoor air pollution, so, you know, air pollution that you typically see outside if it's hazy. And another kind of air pollution is indoor air pollution, which might be in people's homes. And that's of a very different nature. So I'm interested in. Right now, I'm interested in kind of how air pollution, it's a complex mixture of many different chemicals, and understanding how the chemical mixture or the nature of that pollution can be more or less harmful. Because if we understand that a little bit better, we can understand how to intervene on it and how to kind of control the sources of pollution to kind of make it less harmful to human health. So that's one area that I mentioned right now. Another area that I mentioned is in the indoor environment, where we have vulnerable people, like children or the elderly, who are exposed to things like dust, to allergens, and all kinds of nasty things that could be in the home. And similarly, there's a question there of how can we intervene to modify the home environment to improve people's morbidity and to kind of improve health for people who spend time in the home, which can be a large percentage of their time in many cases.
And I presume this is actually quite difficult because a lot of the time in scientific research, we actually want to do experiments.
Right, Right, exactly. And I think one of the challenges with outdoor air pollution is that you can't just, you know, they're not. There are very few controlled experiments that you can do where you can, say, modify the level of pollution and see how people respond. I mean, it just doesn't really work that way. Sometimes you can. You get lucky and there's like a power plant shuts down by accident or. Or maybe one city has the Olympics, and so they do a traffic restriction or something like that, and then you can kind of observe almost as if it were an experiment. But for the most part, you have to understand that there are lots of confounding factors, and the modeling has to kind of account for that, and it can be a much more messy picture.
And do researchers in your discipline need to jump onto opportunities like that if one of those things happens? For example, hosting the Olympics?
Yeah. So actually, I mean, the Olympics Is one example of like a, it's a, it's a, it's a regular occurrence now. I think the last five or six Olympics, there's been an air pollution study in, in the city where it occurred. And so it's things like that that are planned, you know, many years in advance are great kind of opportunities. But other things often are, sometimes are opportunities. Sometimes, you know, there's environmental control regulation, but it doesn't get implemented at the same time in every location. So you can kind of see, look at differences there. Sometimes there's, there's like a power plant that gets shut if people go on strike. And so the power plant shuts down, for example. And so there's, there are opportunities for these kinds of natural experiments and you do kind of have to jump on them when they occur.
So you've spoken to a number of issues such as data being very complex and messy, the signal to noise ratio being low, and the difficulty of doing controlled experiments. I'm wondering how data science can help us solve these challenges.
Well, I think there are a lot of opportunities for data scientists to kind of work in this area. One of the nice things about environmental research is that a lot of the data is public. And so the accessibility of the data is extremely high. And I think there's a lot of opportunities for data scientists to kind of look at specific questions in certain areas around the world. Often the data is collected by governments. And so that they make, they make, they will typically, some places better than others, make it publicly available. And so the network, the monitoring networks and things like that are. The data is usually available in the United States. There's very detailed, kind of very interesting information about monitoring of pollutants across the country. So I think there are a lot of, there's a lot of data that's basically just sitting there. I. People like me work on it, but, you know, there's not that many people, not necessarily a ton of people in the academic world looking at this. And I think there's a lot of opportunities for data scientists to kind of take this data and to answer kind of relevant questions for whatever area they're in.
How much domain expertise would a data scientist need to have in order to think about these types of questions? Because sure, the data is open, but are the techniques and methodologies highly sophisticated? Or do you think data scientists working in other fields can come in to think about these types of questions?
Well, you know, that kind of question, it really depends on what you're trying to answer. I think there are kind of there's many levels of questions and some require a lot of domain knowledge and some don't. I mean, for example, if you look at, there's a kind of, a lot of interest in kind of citizen science type of work where people want to know, you know, what's the air pollution, you know, near my house or what's the air pollution in my neighborhood or in my town. Right. And I don't think it doesn't require a PhD in physics to get, you know, a, the monitoring data kind of near where you live and see what the levels are and looking at trends over time and looking at monitors maybe in the neighboring town or things like that. So I think there's a lot of different kinds of questions that can be asked and depending on how detailed or how complex that question is, will require certain types of knowledge. But I think there's a lot of work that can be done by having a basic understanding of how the data is collected, how the monitoring works and what the pollutants are, which can be. There's a lot of information, for example, in the US on kind of the EPA website that, that can be kind of gathered there. So.
And I presume that prediction is a, is a huge thing that, that you need to be doing when, when thinking about the effects of air pollution.
Absolutely. In fact, that's one of the more kind of modern kind of innovations in air pollution work because in the past we've always relied on kind of the raw data and monitoring locations, which is nice because that's observed and kind of, it's tend to be high quality data. But we don't have monitors everywhere in the, in the entire country. We typically have a few, you know, scattered across each city. And so the development of prediction models for pollution exposure has been a huge kind of benefit to the community because now we can develop these types of models that make predictions of air pollution exposure pretty much anywhere in the country. And of course there's uncertainty associated with that, but it allows us to kind of do much larger studies and much more comprehensive, to have much more comprehensive coverage across the US And a lot of these models are interesting because they integrate lots of different kinds of data. There's just monitoring data, there's satellite data, there's all kinds of land use data that we can. So these, so the integration of all these different data sets into these large prediction models has really been a huge kind of benefit to the fields of air pollution research.
And this is something you spoke to earlier when you stated that data management.
Can be a huge challenge Absolutely. Because I think you're looking at all kinds of formats. You got GIS data, you've got monitoring data. Everything is spatially at different scales. And, and so you have to integrate things at different spatial scales. It's a huge, complex task. And the people who can do requires quite a bit of technical skill and understanding the different data formats and things like that, I'm sure.
And when you talked about using these types of prediction models, without getting too technical, could you let us know what type of techniques you use or your collaborators or fellow researchers use?
Yeah, I mean, I think there is a bit of a range in terms of how people approach these kinds of problems. You got people doing neural networks to do pollution exposure, or other people are doing kind of, which is very complex regression models. And so it's a little bit. Everyone's kind of got their favorite tool. But one thing I've found is that the tool that we use is not a major source of variation in terms of the quality of the models. And the reason is because everyone's kind of using the same data. Everyone uses the same monitoring data, everyone uses the same satellite data, and most people use the same kind of land use and land coverage data. So because the data sources are almost identical across the different models, the variation in the accuracy of the models is relatively small, even though people are using different techniques.
And you also used, with respect to prediction, in particular, a word which is, I think, one of the most important and undervalued words in the modern data science and statistical landscape, which is uncertainty.
Yes.
And particularly with respect to you make a prediction. Right. And you really, I mean, a lot of people will give point estimates and not entire distributions or confidence intervals with respect to what you're actually predicting. So how do you navigate the idea of, I suppose, in essence, communicating uncertainty to stakeholders in whatever question you're thinking about?
Yeah, it's a critical point to recognize the uncertainty in, in a lot of these modeling processes. And I think, frankly, it's still an active area of research in terms of how do you integrate the uncertainty of these, of these exposure models into the ultimate output, which is the kind of the assessment of risk from air pollution exposure. And there are, you know, there are a variety of ways to think about that. One is just a traditional confidence interval which incorporates both the kind of statistical uncertainty of having just a finite data set as well as the modeling uncertainty of having to predict exposure at various places. So incorporating those two sources of uncertainty into a single confidence interval kind of is one approach, but there are a variety of there are still kind of different ways that are being thought of in terms of how to do this and what's the best modeling approach? So I would say it's still an active area of research. There's no final answer yet.
Yeah, absolutely. And do some tools you find and techniques help you describe uncertainty in a more communicable way? For example, Bayesian inference could allows people to give distributions as opposed to just confidence intervals.
Yeah, I mean, I think various modeling techniques have their pluses and minuses. I mean, Bayesian techniques, as you mentioned, is one nice Bayesian technique. They're one nice approach to kind of incorporate often to incorporate the many, many sources of uncertainty that. And then you can kind of plot distributions, you can look at kind of these posterior distributions. One downside, of course, of that approach is that you have to have this grand unified model, and a lot of the results are dependent on that model being more or less correct. And so there's other kinds of. There are other issues that can be kind of brought in. We've used certain techniques and so, you know, there's no perfect solution. And some may be better for some situations than others.
Let's now get into a segment called Stack Overflow Diaries with Kara Wu, member of the rstats community and contributor to ggplot2.
What's up, Hugo? Do you know the Python library Seaborn?
Know it? I love it and I use it daily.
So for those of you who don't know, Seaborn is a library for visualizing data in Python. Conventionally, when you're importing the Seaborn library, people will write import Seaborn as sns. This imports the functionality of Seaborn so that you can use it and aliases it to SNS so that you don't have to type out the whole word Seaborne every time you use a function from the Seaborn library.
That's right. Aliasing in Python is both common and encouraged by many. Importing Pandas as PD and numpy as MP are other typical examples.
Yeah, this isn't really done in R, but it's super common in Python Anyway. Have you ever wondered why people use SNS as the alias for Seaborn? It seems like something like SBN would be more natural.
Yeah, I was always curious as to why it was sns.
Well, Stack Overflow user Lucas posed this question, which I heard about from Twitter user Commandline tips. It turns out that SNS are the initials of the character Sam Seaborn, middle name Norman, from the TV show the West Wing. So SNS is an inside joke that now pervades practically everyone's use of Seaborn.
Ha. I have to admit I've never seen the West Wing, but do you think Sam Seaborn would mind?
I don't know what Sam Seaborn would have to say about this, but he does crack a statistics joke in at least one episode, so I'm guessing he'd be pleased.
So Michael Wascom, the creator of Seaborn, must be a die hard West Wing fan, right? To include a joke like this?
Yeah, I think so. He's written several other Python libraries named after West Wing characters like Ziegler and Lyman. Lyman is a package for analyzing neuroimaging data in Python, and Ziegler is a web app for reporting results from Lyman.
Well, there you have it, folks. Thanks once again, Kara, for reading us a page from your Stack Overflow Diaries.
Always a pleasure, Hugo.
After that interlude, it's time to jump back into our chat with Roger. I want to pivot slightly in this conversation because we're talking about, as we discussed, these types of questions are really important to policymakers and legislators and there are lots of results coming from all directions in the research landscape. And I know that a topic dear to your heart is the is reproducibility in science. So I'm wondering if this is we hear that there's a reproducibility crisis in science a lot of the time, and I'm wondering if this is something you see in your field of research.
Well, I think one of the benefits slash downsides of being in the kind of air pollution area is that it is a in terms of the kind of the impacts of the research, it is a reasonably kind of high stakes area in the sense that lots of people do care about the topic, lots of people care about the results of the findings that you come out with. And so the work tends to have quite a bit of scrutiny. And so that I think ultimately is a good thing. First of all, obviously people care, which is good. And also because there's a lot of scrutiny in the work, it forces you to be rigorous in your thinking and to be transparent in the process. And so I think the idea of reproducibility in within with air pollution work and environmental work more generally is not unfamiliar in the sense that the work already from the get go has had a lot of scrutiny. And I think that the other issue about the work is that because it's largely an observational science and we don't do a lot of controlled experiments, there is a mentality in, in the kind of epidemiology area that is basically that we don't trust any results unless they've been replicated a number of times. Just because any observational study is going to have some sort of limiting factor, limiting kind of features. And so you have to replicate things over and over and over again before you really kind of want to stake any sort of claim on them. And so I think the natural skepticism of people in observational sciences is useful because it prevents us from jumping on the latest hot finding and saying, this is the latest thing, this is the smoking gun or whatever. And there's a certain amount of patience that's built into the field that that requires interesting findings to be replicated at least a few times before we accept them as fact.
Yeah. And it sounds like a really important part of this is establishing a conversation, not just in publishing journal articles, but actually talking with everyone as part of a community.
Yeah, absolutely. And kind of involving more than just the academic researchers. I mean, there's constant discussion with policymakers and researchers and the various different stakeholders kind of in the area at large.
This brings me to another point, which is that you love to talk about data science. And you know, this was obvious in 2013 when I. When I took your MOOC. And it's obvious when listening to your podcast with Hilary and it's your. Both of you are wonderfully contagious. And I'm wondering what the contagious in a positive way, what is the role of conversation and communication in data science at large, to your mind?
Well, first of all, it might just be that I love to talk. I don't know about data science in particular, but I think communication, and in particular, I think verbal communication is very important in data science. I think it's data analysis, I have found to be a kind of a highly verbal endeavor. And I think when you talk about what you've done, even just a one person doesn't have to be some group or anything. When you talk about what you've done and how you've done engages a process in your brain of kind of a different kind of analytic process in your brain that lets you think about what you've done and criticize it. And I think when you don't have those kinds of opportunities to communicate what you've done, you can still do good work, but it's a very different process. And so, for example, I found that in Johns Hopkins, when we teach students, it's very important that we give them these venues to present things and to communicate what they've done and to describe what they've done and to, and to, you know, to think about it. Because I think the act of talking and the act of kind of presenting more generally is a different kind of analytic process and allows you to understand, you know, am I doing something that makes sense? Does it make sense to other people? And so I think it's a critical part just in your own kind of thought process. The other thing that's important, I think with communication and is kind of is being able to understand the person or the people that you're communicating to. And so I think part of a successful data analysis or data science project is understanding what the audience already knows, what they don't know, and presenting to them something that they will find interesting and they will find useful.
Absolutely. And understanding that you need to develop or find common ground in a common language, I think.
Right. And that's very dependent on the audience. I mean, I think there's a tendency to think that an analysis can stand alone and it can be either good or bad by itself. But I think a lot of the quality of analysis depends on the analysts understanding of the audience and presenting it in an appropriate way.
So what does the future of data science and statistics look like to you?
Do you want that in one sentence or two?
I'll give you three.
Okay. Oh, wow. That's like a dissertation.
We've got a committee here.
I think it's very, it depends on who you are. I think it's very bright if you're going to be, if you're entering this field. I think the incorporation of data into decision making in all areas of work, whether it's business, government, academia, whatever, is still kind of increasing and I think people are still understanding its value. I think a lot of kind of the kind of low hanging fruit type stuff has been, is in some sense gone. And so the kind of moneyball scenarios where there's lots of obvious inefficiencies that can be taken advantage of by using data are kind of quickly going away. But nevertheless, I think the importance of using data, decision making and more importantly of collecting data is still increasing. And I think over time we're going to see a greater emphasis on how we collect data, the quality of that data, and how the nature of asking a certain type of question can affect the data. I think the early stages of this kind of trend have been focused on there's all this data that's out there and we should just quote, unquote, use it. But I think as we go forward there will be a greater emphasis on kind of thinking about how we collect the data and spending more time on asking the right question.
Yeah. And how we document the data and how we think about data lineage and all of these things. And data ethics as well. Yeah.
I think there's a kind of a very large conversation that needs to be had going forward on what are the limits of what we can do with data and what are the kind of ethical guidelines that we need to kind of agree on as a community, as a society that I think largely has not occurred, but it will have to at some point.
And so you mentioned something which I find very intriguing, the incorporation of data into decision making. And we see this happening at more and more levels in, in society and, and in businesses. But part of this going forward will involve people understanding data better or speaking the language of data. And I suppose I'm really speaking to a form of data literacy or, or data fluency there, which a lot of people think is a skill or a form of knowledge reserved for the few. And I was wondering how you feel about that.
Well, I don't think it's something that's for the few. I think there are a variety of levels at which we can think about data literacy, and not everyone needs to be able to fit a machine learning model. I think there could be a greater emphasis on training, particularly maybe at the earlier ages of education, on thinking about evidence, thinking about the interpretation of evidence. And this can be done at a very simple level or it can be done at a very complex level. And I think it should be done at all those levels. And so I think there's going to be increased need to kind of understand, kind of what, what kind of what qualifies as evidence? How is data being used and how do we separate kind of the interpretation of that in terms of the decision making from kind of what the. What, what is the evidence in data? So I think we don't necessarily get a lot of education or training in that at the moment, in the earlier eight stages, but I think it will eventually kind of infiltrate down to become kind of a core skill like reading and writing and those kinds of things.
I think so. And presumably one place it could occupy is in a math curriculum at high school. It could be in a lot of other curricula as well. But I honestly feel there are very strong arguments for replacing certain parts of math curricula, such as calculus. I mean, the amount of integrals that I had to perform at an early age could be replaced with, with, with learning about data and the basics of probability. And this type of Stuff.
Why would you want to get rid of integrals? You didn't enjoy that part?
I loved it. But the amount that I, that, that I had to do was, I think, I mean, you know, if I had become a physicist or an engineer, it would have been incredibly important. But I think the, the strength of the emphasis on calculus at high school is perhaps unnecessary these days.
I think, you know, I think the, the advantage of kind of building in data science type education at an early stage is that it allows, I think it gives people an opportunity to kind of, to do something, to create something at an early stage that's kind of interesting. I think it's interesting in a very different way than mathematics. I think interesting. Mathematics in some sense is interesting, almost like, you know, like an art or, you know, in terms of, or in terms of its kind of beauty. But I think the data science is interesting in a way that, that allows people to kind of create things, to build things, and it can be very attractive.
And if we're to teach people data science or data analysis or thinking in terms of data, data literacy, data fluency, today we teach them programming skills as well, right?
Yeah, I think, obviously, I think programming skills are important to the kind of active data analysis. It's not 100% clear to me at what point it's essential to introduce that, because one of the things that I'm kind of interested in now is, you know, I don't think we have a, I don't think we have a perfect system for teaching the art of data analysis yet because I don't think that we don't have a lot of, we don't have really. I don't think we have a great formal framework for teaching people data analysis and for understanding what, what makes for successful data analysis and what kind of makes for, for failures, you know, And I think because a lot of what we do with data analysis now is essentially in terms of training is, you know, here just watch me while I analyze the data and learn from kind of the things that I do. And that's how we, for example, teach PhD students. And it's kind of a fuzzy thing. We don't have a great formal framework for saying, here are the components of a data analysis and what to do and what not to do. I think that requires a bit more understanding, and I think it does. It's something that's independent of, say, programming languages and tools.
So what does make for good data analysis in your mind?
Honestly, that's a question that it's difficult to answer. And I Think one of the reasons is because I don't think it's something that is inherent to a data analysis. And the key problem, of course, is that there are always people involved in data analysis. People are always the problem. Right. And I think there are people who ask the questions, there are people who kind of receive the answers. And the successful of an analysis depends on the people involved. And so it's. I think one of the things you talked about, the future of data science, I think one of the issues that I think will be coming, that will come up in the future is that there's a lot of interest in kind of automation and kind of mechanizing data analysis. And I think there's a thought that there's a lot of money to be made in that, in doing so. But I think fundamentally data analysis is this kind of human enterprise and people come up with questions and people come up with. And people act on the answers. And so it's difficult to say what makes, to kind of universally say that a given data analysis is successful or not, because it depends on all these kind of human elements.
So then how would you go about teaching good data analysis?
Well, I think so. I think that you have to think about, well, what are the basic principles that people rely on to say, okay, this, for example, if someone says, this person is a great data analyst, what do they mean by that? You know, what are the qualities of that person's behavior that make them great versus, say, another person? And I think a big component, and there's certainly others, is that if someone does a data analysis and you trust that the analysis is well done, then that person is a good data analysis. So there's a sense of which you trust that person. You trust the work that was done, and you trust that there aren't any hidden elements that you can't see in the data. And so anything that an analyst does to say to get you to trust that the results, I think, makes for a good data analysis. And so building that kind of trust is really important.
And I think probably communication and different types of language is one way to build this type of trust, right?
Absolutely. I think if people are receiving kind of the results of an analysis and they're communicated in a way that they understand, using language that they understand, they will accept it more willingly, I think, than if you just kind of throw a bunch of jargon at them.
So we spoke briefly about how when actually doing data analysis or teaching practical data analysis, the modern way to do it is using, using programming languages. I suppose this is Somewhat of a loaded question, but what programming language would you choose to teach?
Well, there's so many choices out there, but I mean, I think it depends a lot on what you're trying to do. I think if you're trying to do data analysis, I still think that R is a great language for that. I think it's designed with that in mind. But there are other great languages, I think, for other purposes. In particular, I think if you're trying to integrate with lots of other tools, languages like Python might be better for that. It depends on the environment, it depends on what you're trying to do. And I don't think that it's an either or type of question. But of course, people are limited. Most. Well, I'm limited, I know, in terms of what I can do at any given time, and so I can't focus on five different languages at once. But I do think that R is a great language for data analysis and has only gotten greater over time. In terms of the community, in terms of the packages available and the capabilities.
Absolutely. The community is incredible. Also, the ability to write documents with it as well, to write kind of data analysis narratives.
Absolutely. That has changed dramatically since I've been using R and obviously for the better. And I think the ability to do reproducible work, to kind of write documents where there's code and there's data and there's results, it's fantastic feature of R.
Let's now jump into a segment called Rich, Famous and Popular with Greg Wilson, who wrangles instructor training at Data Camp. Hi, Greg.
G'. Day.
What do you have for us today, Greg?
Well, to be honest, what I have today is a little bit of heresy. I believe that 10 years from now, most people who are doing data science will be doing it in JavaScript or in some strongly typed derivative like TypeScript.
Are you serious?
Yep. I don't think R and Python will go away or that the people that are using them now will wake up one day and switch languages. What I think is going to happen instead is that as people who are already programming start doing more statistics and data analytics, they're going to choose to do it in the language they already know. And these days, no matter what else programmers use, they eventually have to learn JavaScript. Once you venture outside scientific computing and look at the other 99% of programming, it's everyone's other language or even their first language, I simply can't see a future in which those programmers choose a single purpose, immature language like Julia that doesn't have all the non numerical libraries they need over one they already have to master to create websites or mobile applications, or even server side applications that already has a gazillion libraries. And with major players like Microsoft, Google and Facebook all working hard to make general purpose JavaScript faster, it's going to be more and more difficult for niche players to keep up.
But JavaScript doesn't really have any numerical libraries, does it?
No, but that would actually now be relatively straightforward to fix. Node JS is easily the most popular desktop ecosystem for JavaScript development, and it has a pretty clean story for integrating external libraries written in other languages. I think it would only take a few weeks to take the core of NumPy and make it callable from JavaScript. That would just be a base. I mean, you'd have to build the equivalent of scipy, and you'd probably want a few syntax extensions for array indexing. But we're going to have to do all of that anyway for any new language. Plus, whatever is developed now for the desktop will be able to run within a year in the browser using webassembly.
So do you really think this is going to happen?
Hell if I know. I've been wrong much more often than I've been right. But when I first got involved in high performance computing back in the 1980s, the landscape was completely dominated by special purpose hardware. And if you'd asked me, I would have said that would always be the case. We simply didn't realize that for every smart person at Cray or thinking machines, there were a hundred or a thousand smart people at intel focused on making general purpose hardware blazing fast. I think the same is now true of languages.
Thank you very much, Greg. If anyone in the audience is interested in telling Greg why he's wrong, please get in touch. We'd love to hear from you. Thanks Greg, and looking forward to speaking with you again.
Thanks, Hugo.
Time to get straight back into our chat with Roger Peng. Some people criticize R for not being a real programming language, and I want you to tell me why they're wrong.
So that's an interesting comment. Actually, it's something I've thought about a little bit recently, and if you look at the history of kind of R development, I think a lot of the early history of R was driven by this one sentiment that R is not a real programming language. And so a lot of the development of R in say, the early 2000s, I think was oriented towards how can we make R more like a real programming language, more like, I don't know, C or C or something like that. Right. And I think what's happened now is that I think it's interesting to see, in my opinion, you know, that kind of idea has been basically not forgotten, but abandoned. Basically. Why bother trying to make R like a quote unquote real programming language? Why don't we make it a language that's great for data analysis? Right. And that is like a very different mindset, I think. And I think that's the kind of thinking that leads to things like the tidyverse and to things like nonstandard evaluation. And so how do we make this a great language for people who want to analyze data really efficiently? And I think that has oriented our language in a very different direction. And rather than being focused on making it like a quote unquote, real programming language, we can just have a different set of goals. And so I think my, my, my kind of answer to your question is basically to avoid it and by saying, like, we. Who cares if it's like a real programming language or not? But what matters now is like, is it a good programming language? Is it a good language for doing data analysis?
I actually love that because it does not only not answer the question, but it says, it tells me that I'm asking the wrong question. Or whoever makes these statements are making statements that are actually inconsequential to the, to the task that R is there to do, and it's changing the conversation in that way.
Yeah, I mean, I'm not, I'm not just trying to dodge the question. I do think that that was like a way more relevant question maybe 10 years ago. Yeah, yeah.
And your answer is a way more relevant answer today, I think. No, I mean that I'm not being facetious at all.
Yeah. It's just interesting to see how things have really evolved over time. It's just fascinating.
As we've discussed, you've done, you're known for a wild array of things. I'd almost say you're a jack of all trades and a master of many, from working in research as a professor of biostatistics, from your work in MOOCs and being a podcaster and a blogger. And I suppose I want to know kind of your approach just for getting all this stuff done. And I'm actually reminded of a story that I think your, your colleague and collaborator Jeff Leake told. And I'm going to get it horribly wrong, but I'll say it anyway. So one person walks up to a fence and it's. They can't climb over it, but they want to get to the other side, but they can't, so they just walk away. Another person walks up to the same fence and they're like, okay, I need a ladder. They get a ladder. It's actually too short, so they walk away. And then the third person, which could be yourself or Jeff, walks up and looks at the fence and realizes they want to climb over it, and so they throw their head over it and then they say, okay, now I actually have to figure out how to get to the other side. Right?
There's a forcing function.
Yeah, exactly. So after that long winded narrative, how does this relate to your philosophy of just getting stuff done?
Well, you know, I think there's a kind of a. A way to say this that makes it. That's kind of negative, which is that I think there's a lot, especially in academia, there's a lot of kind of what you might call gold plating that happens, which is that, you know, we got to get things perf. It's got to be. Everything's got to be absolutely right. And I think in science there's a lot of that's. That can be a good thing. I mean, you don't want, you want to. Don't want to produce shoddy research. But I think, you know, there's something to be said about getting something out there so that people can see it, people can use it, they can play with it, they can give you feedback on it, and then you can kind of iterate again. And I think one of the things that I'm grateful for with working to my, with my colleagues, you know, Jeff Leak and Brian Caffo and many others, is that there's kind of an error. They err on the side of let's put something out there. Let's let people kind of see what we've got and use what we have and see how they react. And sometimes people don't care, and then that's fine, and sometimes they really do care, and then we can iterate again. Getting things out the door is just a philosophy that we've kind of taken on aggressively, I would say, and not kind of dwelling on. Is everything perfect? Is everything just right? And I think that has pluses and minuses. Obviously it's not, it's not like the best approach, but it allows us to kind of play with a lot of different things. And I think my personality likes to kind of do lots of different things and to see what works and to try to learn new things as we go. And so that's kind of, I Mean, I think, you know, I. I enjoyed, like, learning about video editing, you know, when doing these MOOCs. And with podcasting, I'm learning about audio, and I think it allows me to learn lots of different things, and that gets me excited and gets me motivated to do it. And so. And so not so, I think, and putting things out there and seeing people's reaction to them is really important. It's a very. It's a real learning experience, and so that kind of helps to kind of move things along.
I think I'd love to hear more about the reactions to the MOOCs, because I'm sure by this point you actually have so many data points. How many people have you had through the MOOCs?
I think, I mean, there's a number of people enrolled through one of our courses. It's upwards of maybe 5 or 6 million at this point.
I think that's incredible.
And. And thousands of people who have kind of completed the whole sequence. So it's, you know, I think in terms of reactions, it's. It's more or less, if you can think of a possible reaction, we've gotten it. It's just. And that's the. In some sense, the beauty of the moocs. I mean, I think we have such a huge spectrum of people taking these courses, and it's. It's a little bit all. And the reaction is kind of all over the map. It's great for some people. It's not great for some people. It's, you know, people enjoy it. Some people. Like, we've gotten all kinds of kind of comments about our voices and our videos and the quality of the audio and things like that. And some people like Jeff's voice, and some people like my voice. You know, it's just. It's just. It's kind of sometimes kind of humorous to see the feedback. But, yeah, so, I mean, it's kind of all over the place. And I think it's one of the challenging things that we learned early on is not to react to every single comment. Right. Because I think if you react to every single thing, you'll just be, you know, hit back and forth like a hockey puck, you know, and so you have to kind of sit back and wait and kind of digest everything that comes in and see, okay, what are the major focuses? What are the major issues that we can. And just kind of distill that a little bit, because with these. With so many people taking the courses, the feedback is just all over the place.
Absolutely. We see something similar at data camp. And I've, I've had to become slightly more robust with respect to my sensitivities concerning what people say about me. My all time favorite though is someone who, because I have a big beard, someone, someone said Hugo turns data science into Game of Thrones.
Yeah.
Which is, which is my favorite. But have, have you. Is. Are there any lessons you've learned about actual teaching practices or about learning practices, about, you know, the types of mistakes people make when learning R or learning data analysis or anything along these lines?
Yeah, I mean, I think we learned a lot about teaching R and, and how, frankly, it's kind of how annoying it can be to teach R. And I think a lot of the recent developments in R have changed to kind of make that better. And I think one of the things that I personally learned is the importance of getting people to do something that's not necessarily world changing, but is very concrete and very kind of satisfying early on in the process. I think whether that's making a plot or building a package or, you know, building some app or something like that, you know, just getting something, getting people some sort of like, okay, I can do a little thing and therefore I can do the big thing. But if you just go for the big thing right off the bat, it can be frustrating for people, I think. And so it's. That's one thing that I learned. The kind of staging and incrementalism in the, on in the moocs has something that I learned. And I think even, I think it's very different also. The other thing I learned is very different from teaching in person in class, where you're doing a live lecture and that kind of thing. I don't think there's one that's better or the other. It's just such a different skill. And one of the things I often talk about is like, you know, the teaching in class is kind of like the theater and teaching in, on a MOOC is like television, you know, and not just because of the literal kind of thing, but it's like the MOOC is very small scale. You can do things on a much more finer grain. Whereas like teaching in the lectures is like, it's like, you know, everything's a little bit bigger and it's longer and you know, it's an hour and a half, things like that. And so this just kind of these skills in terms of teaching a class on one sitting versus the other, we had to kind of learn very quickly.
Yeah, and you mentioned that R can be difficult to teach and difficult for people to learn. And you alluded to the fact that this is changing in a certain number of respects. Is part of this due to the tidyverse?
It absolutely is. And it also, I think it's. But generally speaking, I think there's a recognition that not everyone coming into R is a programmer. And so the idea that we're just going to use programming concepts to teach R is not sufficient because not everyone coming in is going to have that kind of background baseline skill. And so I think the tidyverse has addressed that concern by kind of making it, as I said before, kind of a. More of a data analysis language. And I think when we started the MOOCs on Coursera, it was in 2012, 2013, and a lot of the tidyverse had not yet been written. And so we didn't incorporate a lot of it into in the courses. And it's just funny to see now. I mean, I think people were like, how come you're not talking about this thing that hadn't been developed yet? And so it's. We've tried to incorporate it in future iterations or later iterations, but, you know, it was at the time, it wasn't really available. So it was in fact, I think, harder to teach earlier on than it was than. I think if we were to do everything now, it would be. We would do it in a very different way.
And that's something we're experimenting with at datacamp. Dave Robinson has recently launched an Intro to tidyverse course which doesn't presume any programming knowledge, but he gets you to. To import a data set straight away. It's the gapminder data set. And then start getting out basic results and using ggplot to get out some plots almost immediately instead of going through for loops and printing ints to console or whatever it may be.
Yeah, no, and I think frankly, before the tidyverse, you just couldn't do that if you wanted to do the exact same. If you wanted to create that exact same output, you would have to know about subsetting or you would have to know about looping or, you know, just because. Just in order to get to that point. And so the Tidy Verse tools have really kind of minimized that kind of overhead to get you to the kind of. That early. These early wins. Yeah, so I think it's. It's great that I think, I think Data Camp's a great vehicle for that because also it kind of obviates the need for complex setup processes, you know, like installing software and that kind of stuff. So I think it's Great. It's great for just getting people to that first. Quick.
So what's one of your favorite data science techniques or methodologies? I know that's probably like asking you which is your favorite child, but will avoid that question. What's something you really enjoy doing?
Well, I do have a favorite child, but I only have one. So frankly my favorite tool is just a simple scatter plot. I think plotting is just, it can be, it's so revealing and it's not something that frankly I see a lot done and I think the reason why, I thought about why this is the case and I think the reason is because it's one of those tools that really instills trust, I think in the people who receive the plot because they feel like they can see the data, they feel like they can understand. You know, if you have a model that's kind of overlaid, they know how the data kind of goes into the model, they can reason about the data. And I think it's one of those really critical things for building trust. I think, obviously I do. I've used machine learning tools, I've used all these kinds of sophisticated tools and I've seen just both being on both sides of the table in terms of giving people the output and receiving the output. When you see output from models and things like that, it can be very useful. But often I think there's a sense of like, well, there could be something that's missing here and I just don't see it. Right. But I think, you know, plotting, just scatter plotting or whatever it happens to be. It gives you that sense that I'm. It can be misleading. No, no doubt. But it gives you more of a sense that I'm seeing what I'm seeing how the data kind of feed into the answer. And I think it's just a critically important tool.
And how would you do a scatter plot in R?
So I think these days it'd be probably Q plot.
Okay.
But I have many years of just doing plot xy.
Well, I think that's a good place to leave it because I definitely don't want to get into preferences between plot and Q plot at the moment. Don't want to open that can of worms. So, Roger, we've come to the end of our chat and I was just wondering if you have a final call to action for all the aspiring and well seasoned data scientists out there.
For the well seasoned ones, I'm not sure, but I mean, I think for the people who may be aspiring to get into the area, definitely there's no better time to do it. The tooling and the kind of information that's out there is just so abundant. And most importantly, I think it's just a fantastic community of people who can help you along to give you resources to kind of get you going. And so it's a very exciting area area. I'm very excited to be just a small part of it and I'm curious. I'm just excited to see where it goes forward.
I couldn't agree more. Roger. It's been an absolute pleasure having you on the show.
Thanks for having me. This has been fun.
Thanks for joining Our conversation with Roger about data science and the Environment we saw several challenges facing the field of environmental biostatistics, such as the preponderance of complex and messy data sets, how the signal is generally weak, and the difficulty of doing controlled experiments. We also saw the essential roles that data science has to play in this field, such as linking complex data sets together, building prediction models, quantifying uncertainty, and communicating evidence and results to the public. Make sure to check out our next episode a conversation with Adam Kelleher, Principal Data Scientist at BuzzFeed and Adjunct professor at Columbia University. I'll be chatting with Adam about his work at BuzzFeed and more generally the impact of data science on the modern digital media landscape. I'm your host, Hugo Bown Anderson. You can follow me on Twitter Hugo Bowne and Data CampaCamp. You can find all our episodes and show notes@datacamp.com Community podcast. Sam.
More from Richie
#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota
#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon
#356 The Forecast for Time Series Forecasts with Rami Krispin, Senior Manager of Data Science at Apple
#355 AI's Impact on Databases with Shireesh Thota, CVP of Databases at Microsoft
#354 Beyond BI: Decision Intelligence with Graphs with Jamie Hutton, CTO at Quantexa
#352 AI Agents at Work: What Actually Breaks (and How to Fix It) with Danielle Crop, EVP Digital Strategy & Alliances at WNS
#351 Will World Models Bring us AGI? with Eric Xing, President & Professor at MBZUAI
#350 How to Make Hard Choices in AI with Atay Kozlovski, Researcher at the University of Zurich
#349 From AI Governance to AI Enablement with Stijn Christiaens, CEO at Collibra