Hi. I'm David Keyes, and I run R for the rest of us. You may think of R as a tool for complex statistical analysis, but it's much more than that. From data visualization to efficient reporting to improving your workflow, R can do it all. On this podcast, I talk with people about how they use R in unique and creative ways.
David Keyes:Join me and learn how R can help you. Well, I'm delighted today to be joined by Sylvia Cannellone, a post postdoc in biostats, epidemiology, and informatics at the University of Pennsylvania. Sylvia, thanks for joining me today. I appreciate it.
Silvia Canelón:Sure. Thanks for having me.
David Keyes:So I'm excited to talk to you today. You have done a lot of work on, the sharingan package, which is, one way that you can actually make presentations directly from our from our markdown specifically. But before we get into that, I'd like to know just kind of a little bit about your background. If you don't mind just kind of giving us your brief background and then, specifically kind of give the overview, but then also talk about your your introduction to R and kind of how you use R today.
Silvia Canelón:Sure. So I think to start, I'll just say I'm a biomedical engineer by training. That's what I did my bachelor's and my doctorate in. And, during graduate school, I was doing, like, cell culture work and collecting my own data, and so I really didn't have, like, large datasets that I was having to wrangle. But when I switched to my current position as a postdoc at Penn, I specifically wanted to get trained in working with large medical datasets.
Silvia Canelón:And, so when I took this job, one of the first things I had to do was learn how to use R and, in order to access the datasets securely through a secure server and then be able to wrangle them. And sometimes these datasets can have, you know, millions of different medical records for different patients at the Penn Medicine Hospital System. So that's that was my introduction to art. It was through this job, which I started three and a half years ago, and I was learning through code snippets and, like, scripts that my manager would share with me so I could kind of get started and know how to do some basic functions, and then kept learning, on my own through, you know, Stack Overflow and different online videos and r for data science and all these different resources.
David Keyes:So you didn't it sounds like you didn't actually use r, in your in grad school yourself. Is that is that right?
Silvia Canelón:Yeah. That's correct. Yeah. I was just using Excel during graduate school and then used R when I transitioned to my postdoc.
David Keyes:Mhmm. Okay. Oh, that's good. I another, Excel to, R person. That that was my as well.
David Keyes:It's interesting because I I kind of assume people your work is way outside of my, area because I'm I'm an anthropologist by training. So I just assume everybody in your area uses, you know, SAS or Stata or or R. So that's interesting to hear that you were, using Excel. What what were some of the things I mean, you talked about how switching to R allowed you to work with larger datasets, you know, work directly with databases in a is in a in a secure way. I'm curious if there are other things that have changed for you since you made that transition to R.
Silvia Canelón:Yeah. I think it's been really nice to have that. The programming component of it and being able to automate tasks has been really nice. And I know that people who, people can program in Excel and have you know, be able to do pretty complex things, but that's never something I spent much time on. And, yeah, and I do have some programming in my background through MATLAB, but even that, I didn't really use during graduate school.
Silvia Canelón:But I've always liked that aspect of of working with numbers and being able to automate things and just have have that blueprint to come back to whenever I wanna revisit an analysis or something. That's always been really helpful. And, and, yeah, and I think since learning r, there's just so much that it can do. And even just with data visualizations and the different packages available to run different analyses and even just wrangle the data and figure out what what's in the dataset, and do some exploratory analysis. That's been really, really, really beneficial with R.
David Keyes:Yeah. I wonder if you could give an example of some task, that you've been able to automate something you do kind of, you know, I don't know, weekly or monthly or whatever it is that r has helped you to to automate. And because I don't know anything about, you know, the area you work in, maybe explain it to me like I'm what's what's the subreddit? Like, explain it to me like I'm 5 or something like that.
Silvia Canelón:So I guess I would say one example of something cool, and it was one of my first projects when I started, was that we had all these different, like, patient encounters or visits. So every time somebody goes for any kind of medical visit, there is a record of their visit that's, you know, entered into their, like, patient history. And and so in our particular lab, I work with someone named Mary Regina Bolland, and our focus is on studying pregnancy related outcomes. And so we had data for all of the female patients at Penn between a certain period of time, like, certain period of years. And we needed to identify which patients, had delivered babies at Penn because it was just sort of everybody, but not everybody had delivered.
Silvia Canelón:And so I ended up using r to to try to tease out one patient from another and then to tease out different pregnancies between within one patient. And so there's this the way to be able to use functions in R really makes that, a lot easier. And to be able to look at trends over time and do different analyses, for example, of different, different outcome rates. So for example, preterm birth or stillbirth, those kind of things that you'd wanna track to do population health research. It R makes it so easy to just be able to look at 1 year, you know, across, like, a year a whole sequence of years or to look at the entire period of time and see how things change.
Silvia Canelón:Those kind of things were really helpful. Because I remember when I when I first started wrangling in r, I would have separate analyses for each year. And then being able to understand how to use dplyr to make those things a lot easier and to do the summaries that I needed, it was a total game changer.
David Keyes:Yeah. Definitely. And I always tell people, you know, I mean, since you came from Excel as well, like, I know r can be intimidating. And what I like to tell people is that our like, the code is really just the series of steps of things that you would of points and clicks that you would do in Excel. And, you know, I always when I worked in Excel, people would always say, oh, yeah.
David Keyes:You should, like, document what you're doing. Like, have a word document or whatever where you lay out, you know, every time we get this data, this these are the steps we do. And it's like, yeah. I know I should do that, but, like, let's be real. Very few people actually do that or at least do that in any kind of comprehensive way.
David Keyes:Whereas with r, by it's not just that you can automate it, but by having that code, you have that record of everything that's done. So you can see not only yeah. Yeah. Not only automated, but, like, see it at any point. And if there's a mistake, you know right away as opposed to Excel where it's like, I don't know which point or click was was the thing that I did wrong.
Silvia Canelón:Yes. Totally. I can definitely relate to that. I remember because the data are living in a secure database, I I wanted to be able to confirm that I had pulled in what I thought I pulled in to r. And I remember with r markdown, it was so nice to be able to see to have the little chunk of code that was bringing in the data and then to be able to just look at it, in the output and and confirm that I had done what I needed to.
Silvia Canelón:And then with each step, like you're saying, be able to confirm that I completed the task that I was hoping to. Our our markdown's really great for that.
David Keyes:Yeah. Definitely. So let's talk a bit about Sharingan. So Sharingan is a package to make slides directly from our markdown. I'm curious what your introduction to Sharingan was.
Silvia Canelón:Yeah. I was trying to in anticipation for this, I was trying to remember exactly where I first dipped my toes into sharing again. I had been using PowerPoint before, and I think I had I think I had made a slideshow using slides.com, and that was, like, my first experience making HTML slides. And I really liked it, and I really liked that I could share a link to the audience members, and they could follow along and have all the resources just there. Anything I had linked in there, they had they would already have access to.
Silvia Canelón:And so I think at some point, I had been exposed to a a slide deck that someone had made using R, and it seemed like very much the same. You know, I had the same kind of features that I enjoyed from slides.com. And so I think that's when I first started looking into it, and I learned from Allison Hill. I think it's called making slides with R Markdown. And that that workshop the set of slides that she made for a workshop for Rstudiacom, some years ago.
Silvia Canelón:I learned all of, yeah, how to get started and how to format everything through that resource. And then that's what I based other teaching resources that I made off of.
David Keyes:Yeah. So it sounds like before you switched to sharing on you used PowerPoint, which of course will be familiar, to many folks, slides.com. So I'm curious when you made the switch, what kind of benefits you saw, what what it allowed you to do maybe that you weren't able to do previously?
Silvia Canelón:Hey. Hey. I think one of the things I really enjoyed was that, everything was in markdown. You know, I could I could use my IDE and just, I was already familiar with Rmarkdown, so that format felt really nice. Being able to use, you know, hash for headings and, all those little things that we enjoy about markdown I could just use to make slides.
Silvia Canelón:And I didn't have to think about, like, placement of things. Like, my process with PowerPoint was always like, okay. Generate a new slide, and then you might fill in the title if you're using, like, some kind of template. And then, you know, sometimes the PowerPoint templates will give you boxes for you to put things, but then you oftentimes have to, like, move them. And, and so there was something nice about not having to to really think about that and just knowing that the the boxes are kinda gonna be in the same place.
David Keyes:Yeah.
Silvia Canelón:If I was starting off with, with code that was, like, reproducing something. But also just that piece about sharing the the resources. Like, it's it was very common, as I'm sure a lot of people are familiar with this, for you to give a presentation to PowerPoint and for somebody to ask, oh, are you gonna share the slides? Or, oh, can I get a copy of those? And, like, could you email them to me?
Silvia Canelón:But if everybody has a link to the HTML slides, then it's so easy, you know, and they can follow along at their own pace. They can revisit it. I can update things pretty you know, right up until I present if I really, really want to, which is not a great practice, but,
David Keyes:you know,
Silvia Canelón:you can. And and just update them later if you feel like you know, your audience just always has access to the presentation you just gave, which is really nice.
David Keyes:That's really interesting. I I hadn't thought about that because I know when I have introduced people to sharing on people who have never used, HTML slides, they're like, what? What? HTML? Like, no.
David Keyes:I want some, you know, PowerPoint or maybe PDF, but the idea that it would be an HTML is kind of foreign. But I hadn't thought about, I mean, for me, I just say, well, you know, it's fine. Like, you just put in a browser and you show it the same as you show anything else, but being able to then post things online really easily as a secondary benefit is is huge. I hadn't thought about that explicit. I mean, I do that, but I haven't thought that about that explicitly as a benefit.
Silvia Canelón:Yeah. It's a nice one for sure. And then, of course, there's, like, the really nice aspects of using Sharingan about using code and then being able to produce a figure and have that already be in your slides and not having to worry about which version of this table or figure did I make, and what do I need to edit, and, you know
David Keyes:Right.
Silvia Canelón:All that mental work you don't have to do if you're just using if you're generating the output using code, which is awesome.
David Keyes:Yeah. Well, definitely. And I mean, I was working recently with a client who we produced a, like, a PDF based report, but then she needs to also give a presentation. And so haven't I haven't followed up to confirm, but my hope was that she would just basically take a bunch of the code that we had written, you know, to make the figures and tables in the report and just put those straight into sharing on slides and and share those, which is a huge time saver.
Silvia Canelón:Yes. Absolutely. Especially tables. Like, I only just now was realizing how much time it takes to fill in those premade tables and PowerPoint. You know?
Silvia Canelón:But, and then if you you know, obviously, if you change the analysis and numbers are all different, then you have to go and edit all those again. But, yeah, it's it's such a time saver for sure.
David Keyes:So just out of curiosity, like, because I know our markdown can, export to PowerPoint, for example, and there are packages, of course, that can do that. So I'm curious. I mean, you talked about the benefit, like, of having an HTML file, but I'm curious why you like sharing on versus, you know, using that approach to because that would still give you the advantage of working in our markdown. It would just export to a different format. So what what is it about Mhmm.
David Keyes:Why do you like to to export to to sharing gun as your as your output format?
Silvia Canelón:Well, no. That's a good question. I mean, now where I am right now, I would say the biggest reason would be, accessibility. Sharing and slides are very accessible to people that use screen readers. And and so audience members have in general, and, you know, obviously, not just people that use screen readers, but audience members, when they have that HTML version of the slides, they have some control over what it looks like.
Silvia Canelón:You know? Sometimes, if somebody has preset styling that they like to see on websites, you know, font sizes, that sort of thing. Those can carry over to sharing and slides too. Like, there's there's a little bit of control that people have, which I think is really nice.
David Keyes:I see.
Silvia Canelón:Yeah. But, also, there's if I were to share as a PowerPoint, there's still that, like it's still a snapshot. It's a snapshot of my presentation. And and so there's something that I really like about having it live living on the web somewhere. And then at any point in time, somebody could look at it, and then at any point in time, I could make an update to it if I wanted to.
Silvia Canelón:Yeah. That feels nice for some reason to be able to just have it living online.
David Keyes:Yeah. Definitely. And that accessibility piece is is pretty important. I know I mean, that's something you do a lot of work on as well. So you talked about PowerPoint.
David Keyes:You know, it has obviously, like, templates you can use, which as you said, can be in some ways distracting because if you're anything like me, I imagine you kind of spend a bunch of time like, oh, I need to just move this over here, and then you spend all your time, like, moving things around, not actually think about the content. But a lot of times people, will find a little bit more intimidating at first because it, they're like, how do I edit this? Can you talk a bit about kind of, like, in general, the the the process of making or or even using existing themes and and and how that works to kind of style your your presentations?
Silvia Canelón:Okay. So there are some themes that are already built into Sharingan, and, one of them being, like, the our ladies thing, for example, that Allison Hill designed and then got wrapped up into the sharing them package. And so those themes can be really nice, because I think the ones that are built in are most of them are are built around some kind of central idea or some, like, style guide or something. So with the our ladies theme, Allison was guided by colors that, you know, the our ladies organization uses, and, which makes it really a really popular choice for people that wanna make presentations in that context to just have something that's already themed. And there are, I think, a handful of other themes built in also that people have designed for their own universities or institutions.
Silvia Canelón:And so it gives it some in that context, it gives it, like, a little bit more of, like, a professional vibe if you're not presenting your research or something. Yeah. And, you know, if it has a logo in there somewhere, you know, there's some niceties to having those built in themes ready to go. And, and then as I'm sure we'll chat about, soon is there's also other sharing in packages that help make or, like, companion packages that help, make sharing in slides themed exactly the way that you want them to without having to learn too much CSS Yeah. Which is what's used to style HTML pages.
David Keyes:Yeah. Definitely. Well, Sylvia, thank you so much for coming on, for sharing about sharing about Sharingan. And I think this is, gonna be really helpful for folks who are interested in learning to make their presentations within R. If folks wanna learn more about you, connect with you, what would be the best places to do that?
Silvia Canelón:Best place would be my personal website, which is also made with R, and it's, silviaconalon.com.
David Keyes:Okay. Great. Well, thanks, Silvia. Appreciate it. Have a good rest of your day.
Silvia Canelón:Thank you. You too. Thanks again for inviting me to participate in this.
David Keyes:Thanks again for listening. I hope you found this conversation interesting. If you have any feedback, I'd love to hear it. David@rfortherestofus.com. Thanks.