- Podcasts
- The Python Show
- Dashboards in Python with Streamlit
About this episodeThis week, I chatted with Channin Nantasenamat about Python and the Streamlit web framework. Specifically, we chatted about the following…
This week, I chatted with Channin Nantasenamat about Python and the Streamlit web framework.
Specifically, we chatted about the following topics:
* Python packages
* Streamlit
* Teaching bioinformatics
* Differences in data science disciplines
* Being a YouTuber
* and much more!
Links
* Data Professor YouTube Channel
* Follow Channin on X / Twitter
Get full access to The Python Show at www.pythonshow.com/subscribe
Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
Dashboards in Python with Streamlit
Yeah, so my journey into programming was probably back in university. It was during the summer. And I was looking into creating a website. So the first language that I was exposed to was HTML. And then afterwards I was looking to see language, bought a book, a couple of books, also dabbled into Java as well. Both languages didn't really click with me. And then I sort of picked up Python after I got my PhD. I was teaching for about two years and one of my research assistants introduced me to Python. And then, yeah, so I kind of got interested in the remarkable capabilities of coding and kind of take a deeper dive there.
Yeah, exactly. So originally I got my undergraduate and pre-med education Um, at first I thought I was going to go into med school. Um, but then like, uh, kind of changed my mind. Um, so I did a paper in medical technology. So my, my research thesis was on machine learning and also quantum mechanics. Um, it was back when they called data science more into like data mining. Um, and AI wasn't really a big thing at the time. Yeah. So it was mostly like data mining, uh, and how we applied that to biomedical data.
Yeah, sure. So bioinformatics is kind of like at the interface of using informatics or coding or computer science, uh, biological problems. So, I mean, there are many, um, fields at this intersection. Like if you're applying it to three, then they call it chem informatics. Um, yeah. So, so something like that.
Yeah, so that's a good question. So, I mean, you could start off with a simple data app or web app, like general purpose application. It has React, JavaScript baked in. And so, yeah, it's kind of like you could focus more into the problem solving. And in terms of the aesthetic, there's already... built-in functions for that. I mean, they already have it ready for you to go. So you don't really have to think much about that. But if you would like to customize it, there are ways for you to modify the template, add your custom branding to it. Yeah, so that's totally fine.
Yeah, so I guess it's really more into what problem I would like to solve or how am I approaching the project. So if it's data science, You know, we can't miss pandas for data wrangling when we are working with tabular data sets. NumPy, especially when you want to do some numerical processing. Yeah, like Matplotlib, Plotly, Altair. I'm starting to use more Altair lately. I think it looks very crisp. And yeah, I guess... scikit-learn for building machine learning models.
That is cool. I think when Plotly first came out, it didn't have a way to export. And it kind of drove me nuts trying to, you know, basically, I'd take a screenshot of my graph if I wanted my own image or something. I think they fixed that sense. But there for a while, you're kind of stuck. Anyway, so let's say you didn't want to do something online or data science-y. What else would you choose for like a regular Python session?
it'll detect, like, which portion of the video has, like, silence, and then it'll jump cut, remove that portion, and kind of, like, add a small spacer to it. So I made, like, a Streamlit interface that allows you to just upload the data, I mean, upload the video file, and then it'll do the processing. Okay. On the sidebar, there's widgets for you to adjust the parameters, like how much do you want the white space between the chopped segment of the video to be. And then it exported out as a Adobe Premiere Pro file. And then I'll just import there. And then it'll save me time for the initial jump cuts, so maybe an hour or so.
Yeah, exactly. So that was way before Descript was available. And yeah, Descript is very powerful. And lately, even on the phone, there's a lot of cool captions where it'll add one of those, what do you call it, word-by-word caption to videos. So I've been experimenting with using that. I think one is Caption. I think it's called Caption on the iPhone. Okay. And yeah, super convenient.
Right, yeah. I'm also thinking of using large language models to also help in the content creation side as well. I've seen some of my friends, like Tony at work, he's also using large language models. agents to kind of like do tasks for him kind of like scrape all of the youtube comments from from a particular video summarize the comments figure out which direction should we create contents on and you know kind of like having a team but then you you kind of like define a persona for your team members one could be you know comments one could analyze it the other could act as kind of like a content marketer, kind of like to figure out which sort of content to create. And maybe another could be like a script writer to help create the actual script for the video. Yeah, so it's an interesting era and also an area to explore.
Yeah, so initially during the early years, I kind of taught microbiology lab. So it's not really into data-related topics. And then sort of afterwards, I kind of got the vibe of microbiology, kind of developed some tools in Python to simulate biochemical tests, kind of like when you go to the lab as a lab technician. You want to identify what is the bacterial species. And so what you do is you kind of subject the bacteria to various chemicals. The bacteria will kind of interact with the chemical, cause some color changes to it. If it changes purple, then we know, okay, it's purple. it's reacting to this. If it's not changing color, it's not reacting to it. And so yeah, I kind of used Python to simulate that on a bigger scale and published a paper about it. And it kind of allowed either researchers or students to to see like which combination of chemical tests are instrumental for identifying the bacterial species. And afterwards, I also applied machine learning into drug discovery, and like figure out why are certain drugs, you know, like toxic, how we can modify it so that it would be less toxic, how we can modify it so that it'll have a quicker action in regards to the activity that it is supposed to have on the human body once you adjust it. And yeah, mostly into the computational drug discovery part. like machine learning models, and lately building web applications, interactive web applications, where biochemists, chemists, biologists could provide their input data, and then they can make a prediction. So the only requirement is they have the data. So they no longer are required to know coding to actually use the model, which is a game changer in the field of the life sciences as a whole.
Well, only in the holistic sense, because most of the students are actually beginners to coding. They have no prior exposure to it. So I did some introductory lessons on how to get started in Python and how they could apply it to medicine. Um, and so, yeah, so I would provide some, you know, like basic concepts of algorithms more into kind of like cooking recipes and, um, how they could view it as, as such, like how they could be like, you know, each part of the algorithm to be kind of like a processes, um, that they're
That makes sense. One of these days I need to find someone who can explain the whole process of like getting, how do you create the algorithm that can detect like a face in a video or something? I don't know that I'd understand it, but it sounds really interesting to me how that, how that all works. But that sounds really cool too. I like teaching beginners myself and while I don't, I wouldn't teach them anything about biology, teaching them Python's a lot of fun. So anyway, let's pivot and talk about how you ended up becoming a YouTuber. Mm-hmm.
Right, yeah. So it was in 2019 when I first published the first video on YouTube. So back at the time, yeah, I was still teaching at university. So the first video I recorded at about like maybe 11 p.m. or so, like approaching midnight. It was like everyone was asleep, super quiet. I was kind of like... you know, like a bit hesitant to record the video. I'm not really sure why am I recording the video, but then like, it's kind of like an experiment kind of like to see what it would be like to, you know, like teach to a wider audience because normally I would, you know, just teach at a, you know, at a local classroom, like maybe a class of 30 people to 50 people.
Yeah. There was Ken G. He was kind of like the OG of data YouTuber. Okay. And yeah, so that kind of led me to kind of like have a buddy, you know, like a friend who's into content creation as well. And kind of, you know, like, Yeah, kind of give accountability to continue creating more content. And yeah, it kind of grew from there. The more content I created, more people come to watch. And then we did more collaboration with other data YouTuber, some of which have already grown to almost a million subscribers already. I think that was Chris Naik, also a data YouTuber. Deval from Code Basics, also another data YouTuber as well. We did a podcast there. I think the channel kind of grew by 1,000 or two to three times more. So I think I reached 5,000 subscribers because of those collaborations. And then I made a YouTube tutorial video on the Free Code Camp YouTube channel. That kind of catapulted the channel to 10,000 subscribers.
yeah, so it's kind of like more collaborations with other channels kind of helped to grow the channel as well. And yeah, but you know, like originally all of the contents that I created initially on the channel was more into like our, um, like our, for data science. Um, and I remember a lot of the subscribers were kind of asking for like wire, uh, can you create more contents into, uh, into Python?
So yeah, I vividly remember all of the videos that were R. People would say, create Python content. And then I eventually created some Python content and stuck to Python from then on. There were no complaints. And occasionally, some would be like, could you create more R content as well? Yeah.
Yeah. You know, like initially I was more like an introvert. So I really kind of just stayed in my lane, kind of, you know, create content by myself. And so Kenji was the first network who I collaborated with. So he reached out on LinkedIn. We kind of started a chat there and then kind of have like a virtual chat on Google Meet. And then we took it further from there. And then we kind of, you know, like created podcast videos.
Yeah. So starting a channel, I think it's one of the most difficult thing to actually press the record button on the camera. And also a lot of the people, including me, would think that you would need the proper gear before you could actually start recording the video. But actually just a phone, just an iPhone or just a typical phone that you have, It's more capable. It could take 4K videos, and that is all you really need. But what I would recommend is to get a very good mic, either a lavalier mic or maybe invest $50 into a decent microphone. If audio is good, people are more inclined to watch the entirety of the video. But if the audio is not that up to par, they might click out of the video. Yeah, but, you know. Cool. Yeah, just kind of hit the record button and don't think much about it. Every first video will suck. I know my first video sucked. Yeah. Yeah, I remember one YouTuber, I think it was Roberto Blake, he mentioned that you should make 100 videos, you know, 100 crappy videos is what he mentioned. Yeah. that we don't have this high bar that we have to look up to when we want to create the video, which might hinder us from creating the video at the first place. So yeah, don't think much about it. Just record. And also, it doesn't mean that when you're a YouTuber, you have to know more than other people. It's just like sharing ideas, sharing information. And actually, I learned a lot from being a YouTuber. I even learned about Streamlit from one of the subscribers. They mentioned in the comments, have you heard of this web framework called Streamlit? Could you make a tutorial video about that? And yeah, subscribers would suggest all of these awesome tools in the comments section.
Well, I occasionally would assemble, you know, like crafts, you know, like one of those robots, robots. It's called Gundam. So you would piece it together, you know, like piece by piece into a functional robot. But it doesn't move. So it's just for show only. I don't have it here in the U.S. I just, you know, relocated to the U.S. just recently. Thailand. Yeah. So everything is back home.
Cool. I know Gundam's really big over there. I can't remember. I think I've watched the show that was out before they called it Gundam. I can't think what it's called now. Oh, well, anyway, I used to watch a lot of anime. Anyway, if so, what else? Is there any other hobbies besides building scale robots you want to mention?
