#10 Data Science, the Environment and MOOCs (with Roger Peng)

Roger Peng, a Johns Hopkins biostatistician, discusses his work on air pollution's health effects using natural experiments like the Olympics and power-plant shutdowns. He argues that data quality matters more than model choice, and that uncertainty quantification and clear communication to policymakers are essential in high-stakes environmental research.
Chapters
In this episode of Data Framed, a Data Camp 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 Data Framed. 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 Hugo Bownt and datacamp at 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 like different segments know me for different, for various things. So it's kind of hard to pin down, you know, one or two things. But let's go through. I think, you know, some people, 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, so. And yeah, I do a lot of statistics research and, 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 have, 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, 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 kind of learn data science. So it's, it's great to hear that.
So how did you get into data science initially?
Oh, here we're going back quite a bit. I mean, I originally majored in math at university 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 I really enjoyed those. And so, although I can't say I did very well in those courses, but I really enjoyed them. And so I kind of decided 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 I was 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 it 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. The kind of ideas of software development and software engineering permeate data science now and I think as a good thing. And I think it's. And if you look at things like the tidyverse and IN 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 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 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 to statisticians. And what it requires then is in some areas, you know, gathering huge data sets. And 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. In many countries where they have environmental regulation, like in the United States, the policies are typically informed by kind of 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, 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, you know, it's a complex mixture of many different chemicals, and understanding kind of how that 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'm interested in right now. Another area that I mentioned is in the indoor environment, you know, 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. 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, there are 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 do. 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, it's a regular occurrence now. I think the last five or six Olympics, there's been an air pollution study in the city where it occurred. And so it's. Things like that are. That are planned many years in advance are great kind of opportunities, but other things often are. Sometimes are opportunities. Sometimes 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, 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 being low, and the difficulty of doing controlled experiments. I'm wondering how data science can help us solve these, 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 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 sciences 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, 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, and looking at monitors maybe in the neighboring town or, you know, 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 kind of complex that question is, you know, require certain types of knowledge. But I think there's a lot of work that can be done by having a kind of a basic understanding of how data, how the data is collected, how the monitoring works and what pollutants, 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 huge thing that you need to be doing 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 tend to be high quality data. But we don't have monitors everywhere in the entire country. We typically have a few 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 field 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 know, you're looking at all kinds of formats. You got GIS data, you've got monitoring data. Everything is spatially kind of at different scales. And so you have to integrate things at different spatial scales. It's a huge, complex task. And the people who can do it are, you know, it requires quite a few, 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 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. 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 statistical landscape, which is uncertainty.
Yes.
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 type, 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 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 exposure models into the ultimate output, which is the kind of the assessment of risk from air pollution exposure. And 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. 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. Basically they're one nice approach to kind of often to incorporate the many, many sources of uncertainty, 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 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 Seaborn 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, StackOverflow 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 Seaborne.
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 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 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 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, is useful because it prevents us from jumping on the latest hot finding and saying this is the, you know, 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 requires interesting findings to be replicated at least a few times before we accept them as a 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 took your MOOC. And it's obvious when listening to your podcast with Hilary. And 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 highly verbal endeavor. And I think when you talk about what you've done, even just to one person doesn't have to be some group or anything. When you talk about what you've done and how you've done it, the. It 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 definitely. 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. And is. 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, you know, 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 mean, 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 kind 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 to scale.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







