<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mary Beth Kery on Medium]]></title>
        <description><![CDATA[Stories by Mary Beth Kery on Medium]]></description>
        <link>https://medium.com/@mary-beth-kery?source=rss-8d23817f30ea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kTJSxYXXiaUDlO60izxw4Q.jpeg</url>
            <title>Stories by Mary Beth Kery on Medium</title>
            <link>https://medium.com/@mary-beth-kery?source=rss-8d23817f30ea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:11:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mary-beth-kery/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[You began a PhD and now you have depression.]]></title>
            <link>https://mary-beth-kery.medium.com/you-began-a-phd-and-now-you-have-depression-5724b4474ebf?source=rss-8d23817f30ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/5724b4474ebf</guid>
            <category><![CDATA[phd]]></category>
            <category><![CDATA[depression]]></category>
            <category><![CDATA[anxiety]]></category>
            <category><![CDATA[academia]]></category>
            <dc:creator><![CDATA[Mary Beth Kery]]></dc:creator>
            <pubDate>Fri, 30 Oct 2020 00:52:19 GMT</pubDate>
            <atom:updated>2020-10-30T00:52:19.196Z</atom:updated>
            <content:encoded><![CDATA[<h4>A (highly opinionated) guide to navigating those darker hours</h4><p>If I had to sum up the personality I cultivate in my interactions towards others, I’d say: cheerful. There’s no deception in that. I am optimistic and find great joy in my life… even though that joy is born from a contradictory place. In the past, I’ve had to weigh my life again and again if only to conclude that yes, it is good and valuable. My medical chart reads: major depression, severe, episodic, non-psychotic. Basically, in an ill twist of genetics, I’ve lived in and out of periods of depression since I was 11. With the exception of elementary school, that’s my entire academic career. Today I am a PhD student, in my 5th year and while higher-ed wasn’t the beginning of my own mental health struggles, it turns out that I am a member of an extraordinarily large — if invisible — club: <strong>PhD and (sometimes) suuuuper depressed.</strong></p><p>First, let’s bring in some data, with this <a href="https://www.nature.com/articles/d41586-019-03489-1">excellent 2019 article in Nature</a>:</p><blockquote>Respondents to <a href="https://www.nature.com/articles/d41586-019-03459-7">our latest survey</a> of 6,300 graduate students from around the world, published this week, revealed that 71% are generally satisfied with their experience of research, but that some 36% had sought help for anxiety or depression related to their PhD.</blockquote><p>Here’s some more statistics, this time from <a href="https://qz.com/547641/theres-an-awful-cost-to-getting-a-phd-that-no-one-talks-about/">a 2015 Quartz op-ed</a>:</p><blockquote>A 2015 <a href="https://www.insidehighered.com/news/2015/04/22/berkeley-study-finds-high-levels-depression-among-graduate-students">study at the University of California Berkeley</a> found that 47% of graduate students suffer from depression, following a previous 2005 study that showed 10% had contemplated suicide. <a href="http://psycnet.apa.org/journals/str/10/1/51/">A 2003 Australian study</a> found that that the rate of mental illness in academic staff was three to four times higher than in the general population, according to a <a href="https://www.newscientist.com/article/dn26365-lighting-dark-fixing-academias-mental-health-problem/">New Scientist article</a>. The same article notes that the percentage of academics with <a href="http://www.tandfonline.com/doi/abs/10.1080/01443410120090849#.Vj3u3hNVikp">mental illness in the United Kingdom has been estimated at 53%</a><strong>.</strong></blockquote><p>All of these sources taken together, we can estimate that on the modest end, roughly 1/3 of every PhD student <em>you personally know </em>have faced serious anxiety and depression… and let’s be real, you probably never even noticed. At least in the United States, Canada, and UK, we have this cultural belief that a depressed person will be easy to recognize: they will cry a lot, they will start acting sad, they will give away their possessions, etc. In reality, many people hide. Or, in all fairness, many people decide that their mental health is none of your damn business and choose not to share in visible ways.</p><p>Now here’s the real question.</p><p><strong>Does experiencing mental illness make you a less capable academic?</strong></p><p>I’d argue the answer is no (obviously because that’s my whole academic career at a top institution so far and I’m OK). The numbers don’t suggest a correlation between mental illness and measures of academic success either. In the 2003 Australian study cited above, high “psychological distress” was found in 43% of “academic staff”… by which they meant <em>faculty, </em>who by definition were successful PhD students, and presumably sit near the top of the academic food chain. Also above, if 53% of all academics in the UK have mental illness, that’s a hell of a lot of pretty successful, resilient people.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*QyatThYVTuBnxKYpmgyRvg.gif" /><figcaption>Illustration by <a href="https://www.instagram.com/whenthatfeelinggg/">whenthatfeelinggg</a></figcaption></figure><p>In this article, I am <strong>not</strong> going to address the many systemic pressures and toxicity at play in academia that lead people down the path of anxiety and depression. There is a lot of great writing on that already. Instead, I’d like to use my own experience with mental illness to share practical advice to those who are currently trying to navigate depression/anxiety.</p><p><strong>Disclaimer:</strong> <em>Mental health is individual, so take these opinions with a grain of salt. My research is within CS, not Psychology or Neuroscience. If you are in crisis right now, or considering hurting yourself, please call the National Suicide Prevention Lifeline (1-800–273–8255)</em></p><h3>Tip #1: Find solid respect for the you that is depressed</h3><p>I grew up in a rural area of the United States without access to mental health resources, and I completely absorbed my community’s belief that depression = failure. This girl wasn’t about to accept failure. When you are feeling anxious and down, it’s <em>very easy</em> to fall into the trap of: “<em>If I wasn’t depressed I would be making better research progress.” </em>or<em> “I’m failing at X and it’s all my fault</em>”. Although you may feel compelled to reject or “punish” yourself for your depression through self-loathing, guilt is simply a bad strategy. Research has found that “negative rumination” (literally just thinking about how much you suck or thinking about how bad you feel) is correlated to heightened levels of anxiety and depression (<a href="https://pdfs.semanticscholar.org/a737/3e186cc2211c4d2fe1620abdf96191948f14.pdf">Nolen-Hoeksema 2000</a> &amp; replicated in many other studies). Negative thoughts feed into a powerful feedback look that will keep you feeling bad. So although it may feel counter-intuitive, one shift in perspective that has helped me enormously is learning to <strong>accept depression as a no-fault disability</strong>.</p><p><a href="https://adata.org/factsheet/health">The Americans with Disabilities Act (ADA) defines disability as </a>“<em>a physical or mental impairment that substantially limits one or more major life activities”. </em>If you are experiencing anxiety/depression and you’re not able to perform your research at 100%, just accept it: you have a temporary disability. Are you <em>as disabled</em> as a blind child in a wheelchair? Probably not. Do you need the ADA’s legal protections? Maybe not. Are you <em>permanently</em> disabled? Probably not. But guess what? <strong>Disability is not a contest of who has it worse.</strong></p><p>A disability lens has helped me escape that guilt-feedback-loop (that only serves to keep you depressed) by helping me distance myself from a “failure” lens. Imagine you see a person in a wheelchair competing in a race. Do you think “<em>wow, that person sucks</em>” or “wow, <em>they would race so much better if they could walk”</em>? No. You don’t think that, because you are not an utter monster. We typically admire and respect when people with <em>visible</em> disabilities get stuff done and achieve— while not being judgemental that yeah, a wheelchair race is going to look different from a leg race. Mental illness may be invisible, but it is no less real. Try practicing imagining your depression as <em>something tangible</em>, like your own metaphorical wheelchair, and then try to give yourself the same level of respect and kudos you’d give a wheelchair user. You may have found yourself disabled, but if you are working at your PhD, try to celebrate even the little victories that hey: you are persisting.</p><figure><img alt="A young corgi dog smiling with wheels replacing the back of its legs as a wheelchair." src="https://cdn-images-1.medium.com/max/750/1*wvTuO9k_XKfCm21AAzjSrg.jpeg" /><figcaption>If you’ve read this far, you deserve a puppy. Try to say this adorable disabled pup isn’t a Very Good Boy. This is just my bias, but I find small animals in wheelchairs highly inspirational, especially since my own dog has had paralysis in the past. (<a href="https://resources.bestfriends.org/article/faqs-about-dogs-wheelchairs-and-carts">photo credit</a>)</figcaption></figure><h3>Tip #2: Experiment — yes experiment !— with seeking help</h3><p>If you googled anxiety &amp; depression, you’ll know the #1 advice is seek professional help. You are an academic so yes, you are very intelligent. At some point you likely have, or will, seek professional mental health help. Do it. This is absolutely the right move. <strong>However…</strong></p><p>Don’t be discouraged if the first help you find isn’t the help you need. There are many different forms of “help” like support groups, an anti-stress seminar from your university, therapists, psychologists, psychiatrists, and medications. Mental illness has no quick fix, it’s highly individual, and half the battle is figuring out what combination of help will work for you. For just a quick example, I have gone through many therapists, most of whom were a terrible personality fit, until landing upon one who is awesome and has genuinely <em>helped</em> me. I’ve tried out multiple psychiatrists and multiple medications. One doctor gave me an antidepressant that <em>made me so paranoid, I thought someone was following me</em>. Um, yikes. Both that medication and that doctor were a no. Eventually, though, a different doctor and different antidepressant helped enormously, and has helped make my lifelong illness far more manageable. If you happen to be a researcher in the sciences, you know that a lot of experiments don’t work out. It’s just plain awful the degree that you might need to experiment with help &amp; treatment, but the good news is that <em>something out there will work for you</em>. <strong>Even if your current depression and anxiety is a temporary thing, no time seeking help is truly wasted</strong>. If you manage to find things that work (or don’t) for you in your current episode, you are now armed with valuable information on what works and what doesn’t to save you if you ever face another episode in the future.</p><h3>Tip #3: Managing sleep, food, &amp; physical health</h3><p>Every mental health strategy advice will tell you to sleep well, exercise, and eat healthy. That level of advice is often useless. Depression and anxiety tends to push people towards physical extremes, but everyone presents differently. Depression makes me want to sleep all day long, while stress keeps many people (also including me) up at night unable to sleep. Some people tend to binge stress-eat when depressed, while others completely lose all appetite and stress-starve. You might feel like you have the flu, have a persistent headache, have a persistent stomach ache… or none of these things. Incidentally, one therapist once told undergrad me I<em> wasn’t</em> depressed because at the time I <em>wasn’t</em> experiencing recent changes in my eating or sleep. That’s dumb. There is no “right” way to do depression and anxiety.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*bx0LE7zuFMPQ3KwpE_M22A.jpeg" /><figcaption>Gotta love some representation. In the TV show “The Good Place” a super-academic professor character Chidi Anagonye has near-constant anxiety, including a persistent stomache ache. Especially with the stomach situation, I absolutely relate.</figcaption></figure><p>To manage your physical health during mental illness, first take a moment to recognize what is going on with you physically. Again, guilt and blame are only counter-productive, so try to skip that. For whatever you’re experiencing: try to give yourself reasonable expectations. <em>Reasonable</em> does not mean expecting yourself to behave and feel just like a healthy person. Reasonable means work with what you’ve got. If you’re over or under-eating, maybe buying a bunch of healthy snacks/ready-meals to ensure you’re at least getting good nutrients. If you are over or under sleeping, I find it helpful to explicitly plan out a sleep schedule with an extra optional nap during the day.</p><p>Practicing physical wellness is one form of help for mood and stress <strong>but</strong> it really is just one approach that you’re likely gonna need to combine with other forms of help to feel better. There are no cure-alls in mental health.</p><h3>Tip #4: Seek “reasonable accommodations” for work things within your control</h3><p>If you’re a PhD student, there is lots out of your control that may be major stressors in your life. Maybe your co-author isn’t pulling their weight on a manuscript. Maybe your advisor is being overly critical of your progress. Maybe you received downright mean reviews from another academic.</p><p><strong>Super concrete thing</strong>: think about what in your work life you <em>do</em> have power over, even the smallest things. What changes might you make to reduce stress?</p><p>Again, I like to borrow from the Americans with Disabilities Act (ADA) as a framework to help me conceptualize my dream of being that super-successful researcher despite being held back by depression and anxiety. The ADA has a concept of “reasonable accommodations” that goes like this:</p><blockquote>a reasonable accommodation is a modification or adjustment to a job, the work environment, or the way things are usually done during the hiring process. These modifications enable an individual with a disability to have an equal opportunity not only to get a job, but successfully perform their job tasks to the same extent as people without disabilities.</blockquote><p>You have anxiety/depression. Now are there any changes (even if temporary) that you can implement to help yourself work and feel OK. I’ll give some personal examples. I’ve found that I am uncomfortable, and get uncontrollable serious stomach-illness stress symptoms, in noisy workplaces with a ton of people. I had this experience once at a makerspace lab in Berkeley, and once at Bloomberg L.P. in NYC — both of which I can highly recommend as wonderful supportive workplaces besides the noisy open-layouts that became my personal nightmare. To <em>reasonably</em> <em>accommodate</em>, I adjusted to working in those spaces in morning and evening hours where fewer people were around and it was quiet, as well as occasionally working from home when possible. This kind of flexibility, I acknowledge, requires a level of privilege and won’t be well received by all employers. Even in my case… yeah, my employers weren’t the happiest with my changes. I was seen as “not a team player” but I also couldn’t help it that the team spent all it’s time in my workplace equivalent of a EDM mosh pit. That is to say, it can be uncomfortable to seek an accommodation that deviates from surrounding work norms, but disability is often going to be a bit not-normative. If there’s any way to change where you work, when, and with whom… gosh, if plants make you happy, fill your desk with plants… you may need every little reasonable de-stress boost you can give yourself to stay productive under the drag of mental health struggles.</p><p>Finally, don’t forget the literal ADA and your school’s disabilities office. This is particularly helpful with coursework. You can (confidentially!) talk to your disability office about getting extra late days, excused absences, or extra time on tests if that’s what you need. Then the disability office will command your course instructors that they <em>must</em> provide those accommodations. The best part is, your instructors never need know anything beyond “person A has a disability”, and your mental illness can remain private if you wish. Note that to wield the power of the disability office you will need a doctor’s note, but that may be no more strenuous than getting a consultation with your school’s mental health center… which is a help-seeking step that may benefit you anyway.</p><h3>Tip #5: Seek activities that meaningfully lift your mood</h3><p>You may have hours or even days where your mood is so low that your actual PhD research work is off the table. That’s ok. Now what do you do instead? Depression can make you want to do absolutely nothing, maybe not even shower or get out of bed.</p><p>Taking a break and “self-care” is important, but I’ve found that if your goal is to get less anxious and un-depressed, your choice of break activity matters. For example, after dredging through heavy academic writing, I love to curl up with a trashy romance novel. It makes me happy. However, like eating a delicious dessert, it’s a temporarily bit of happiness that ultimately doesn’t shift my life or stressors in any way. You goal is to find a mood-lifting activity that combats your stress/depression more directly. This, counterintuitively, may not be something that necessarily makes you immediately <em>happy </em>per say.</p><p>There’s a evidence-backed theory called <em>opposite action</em>, which originates from something called <a href="https://en.wikipedia.org/wiki/Dialectical_behavior_therapy">Dialectic behavioral therapy</a>, a variation on cognitive behavioral theory used to treat serious mood disorders, self harm, or suicidality. The basic idea of “opposite action” is exactly what it sounds like: if you feel the urge to do something that’s going to be self-destructive or harmful, pick something to do that’s both the opposite <em>and positive</em>. For a simple example: you’re depressed and can’t get out of bed today. Get out of bed. You feel like avoiding people. Go out to brunch with friends instead.</p><p>More specific to PhD research, here’s the part of opposite action which may not make you <em>happy</em> in the short term, but benefit your mood in the long term. If research has you stressed out and depressed, you’re likely going to want to avoid it, not touch your dissertation or current paper. That’s okay. Remember our goal is to set reasonable expectations for ourselves instead of trying to force ourselves to act happy and healthy when we’re not. For opposite action to work, you need to engage in an action that’s not only opposite of what you want to do (avoid research) but<em> also positive</em>. So your paper is not an option if that’s what’s bringing you distress. Instead, find something that <em>somehow</em> relates to your research that will be positive: read an interesting paper, watch a talk you’ve been meaning to watch, or even just think about what got you excited about research in the first place. Something about this research made you excited once. What was that? On a normal day those kinds of research activities feel like extra, indulgent things you don’t have time for, but this isn’t a normal day so make time for them. Resist thoughts like <em>OMG I can’t afford to waste time I need to be PRODUCTIVE</em>. The mechanism of opposite action is that when your brain is firing off negative thoughts and fear every time you hear “research”, you practice some action to provide your brain with emotionally neutral or positive stimuli connected to “research” and thus weaken that negative association. Sure, your paper/dissertation/experiment still is a source of stress, but with any luck, you’re break from it will serve to take overwhelming anxiety back down to a manageable level you can push through.</p><h3>Tip(?) #6: You kinda hate your PhD right now… should you quit?</h3><p>Most sane people will consider leaving their PhD at some point, and that questioning in itself isn’t a big deal. In the wider world outside of our PhD bubble, people switch jobs every couple of years for any number of reasons, and this isn’t considered a personal failing in the way that leaving a PhD is usually talked about. Go ahead and question: does a PhD still align with your life and career goals?</p><p>On the topic of mental health, I see a slight bias towards stories of “I left academia and am so much happier now”. I’m choosing to stick with my PhD and I think long-term happiness really depends on what your goals are per academia. Just like any relationship, there are ups and downs whether your excited by or enjoying your research month to month.</p><p>At a downturn where your feeling just awful, consider your PhD like a long-term relationship you’ve poured a lot of effort and years into. Is this relationship salvageable? It’s 100% ok if you decide yes and stay. It’s also 100% ok if you decide it’s time to break up and move on to the next thing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5724b4474ebf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Notebook Platform du jour: Streamlit]]></title>
            <link>https://mary-beth-kery.medium.com/notebook-platform-du-jour-streamlit-b16ceee02bd6?source=rss-8d23817f30ea------2</link>
            <guid isPermaLink="false">https://medium.com/p/b16ceee02bd6</guid>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[literateprogramming]]></category>
            <dc:creator><![CDATA[Mary Beth Kery]]></dc:creator>
            <pubDate>Fri, 09 Oct 2020 17:04:17 GMT</pubDate>
            <atom:updated>2020-10-10T17:52:06.549Z</atom:updated>
            <content:encoded><![CDATA[<h3>Notebook Review: Streamlit</h3><h4>Good for visually clean data apps for clients who don’t want to go playing with your code</h4><p>So first off, <a href="https://www.streamlit.io/">Streamlit</a> isn’t exactly a notebook platform. It does, however, inherit key ideas from literate programming just like a computational notebook platform: you write Markdown to narrate what’s going on in a program, and you can easily render data tables and plots in an interactive document. <em>For its intended use case</em>, Streamlit is absolutely fantastic, and a refreshingly different take in an otherwise crowded space of today’s literate programming tools that tend to stick close to mimicking Jupyter notebooks.</p><p>Back in 2017 I ran a <a href="https://marybethkery.com/projects/Verdant/Kery-The-Story-in-the-Notebook-Exploratory-Data-Science-using-a-Literate-Programming-Tool.pdf">study where we interviewed regular (professional) users of Jupyter Notebooks</a> to better characterize the use cases and practices people have for notebooks. We ended up with 2 major classes of use cases:</p><ol><li>You are using a notebook as a scratchpad.</li><li>You are using a notebook to share and inform others about a data analysis.</li></ol><p>Streamlit really hones in on <strong>2</strong>. The welcome message of its <a href="https://docs.streamlit.io/en/stable/index.html">docs</a> reads :</p><blockquote>“Streamlit is an open-source Python library that makes it easy to create and share beautiful, custom web apps for machine learning and data science.”</blockquote><p>The keyword here is “web app”. When I started making my first project with Streamlit, an analytics app for my own research data, I was a little bit shocked at first over the lack of displayed code — it felt like someone ripping away my security blanket, I really like to see code! My app looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c3nGS1EnwaMydeEPed_3Dw.png" /><figcaption>There’s something soothing about the top gradient bar and clean interface.</figcaption></figure><p>To write an app with Streamlit is to just write a normal python file in your editor of choice, here with my beloved <a href="https://code.visualstudio.com/">Visual Studio Code</a> (I’m a front-end web developer at heart). Just like a nice web app development setup, I place my code editor side-by-side with a web browser that continuously renders my app. Streamlit will automatically detect when your code has changed and offer on the web browser side to re-run the app to update it. So (thank goodness 🎉) no mucking around in the terminal to run gross build processes. Once you start Streamlit, here with streamlit run demo.py, it just handles everything in the background to let you focus on code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qr9dC36IznpKgaiHGUrMig.png" /><figcaption>The basic experience of Streamlit is asking it to “write” stuff using the library call st.write(). After using st.title() above, I tried experimenting to see if Streamlit supports other commands like st.heading()… nope. You instead use st.write() with some Markdown written inside to render headers. Really, though, the magic secret ingredient to Streamlit is that you can just use st.write() and throw pretty much anything in as a parameter, be it data, plots, tables, markdown, whatever... that one library call renders anything. For more magic, check out line 25, which is how I render the checkbox AND the checkbox control flow for “Show raw JSON” on the right. My web developer brain tells me that there’s no way line 25 should “just work” as it does. It’s awesome. I’m in love 💛.</figcaption></figure><p>So why would you want to use Streamlit? Let’s return to our <a href="https://marybethkery.com/projects/Verdant/Kery-The-Story-in-the-Notebook-Exploratory-Data-Science-using-a-Literate-Programming-Tool.pdf">use case research.</a></p><p>In our study, the use case <em>“You are using a notebook to share and inform others about a data analysis”</em> actually broke down further into some distinctly different flavors of computational notebook documents that professionals were creating for sharing. I’ll summarize these:</p><ol><li><strong>You’re a data scientist sharing an analysis — in its gory details — with your team.</strong> This kind of notebook has Markdown, plots, tables, etc. but the code itself is front and center too so that you and your colleagues can dissect the details of your approach.</li><li><strong>You’re an instructor creating a guided example of an analysis.</strong> This kind of notebook will have more Markdown describing what’s going on, more images, and often more interactive widgets that allow your audience to “play” with parameters of the analysis for maximal learning from the notebook. How much code there is displayed in the notebook really depends on how code-savy your audience is and how much you think the details of the code will help their learning. I’ve often seen instructors “hide” much of their code by putting the bulk of their code in a seperate python file that they then call as a library within the notebook itself.</li><li><strong>You’re creating an interactive tool to let others run your analysis on their own data. </strong>Seriously, people are using Jupyter Notebooks as full-on web apps. As a web developer I was surprised to find how common this one is, but it’s actually a stellar use for notebooks if your audience is not code-literate and a highly-polished app isn’t needed. I spoke with a data scientist from a local Parks and Recreation government agency (I’m making up the exact agency to protect her anonymity) who created an analysis in a notebook to help Parks and Rec understand climate patterns at their parks. Her audience doesn’t know how to code, they just want to pop in their data and see the charts. Her agency also didn’t have the budget to create a formal web app. The solution? Give Parks and Rec a good old Jupyter notebook and tell them to replace the first code cell’s input text with their own data, then run the notebook. Elegant? Nope, but it works. I saw a similar case with a scientist, who created a notebook to allow their clients to play around interactively with the analysis without editing code. For these use cases, showing code may not be desired at all. Some users said that showing code actually <em>distracted or intimidated their clients</em> or gave their clients the (wrong) impression that the notebook was in-progress, rather than finished, work.</li></ol><p><strong>So basically I love to see code, you love to see code, but maybe your audience doesn’t want to look at (all) your source code.</strong></p><p>Streamlit is really excellent for <strong>case 2 &amp; 3.</strong><em> You can show selected code in your rendered app with Streamlit if you really want to</em>, but the default state is hiding code. A data scientist can write super basic python to get an easy data web app, without having to fuss with full web app development and without having code on display as in a standard notebook. Of course, lots of notebook platforms <em>do</em> have code hiding options, but for a polished professional look, Streamlit does a great job in its render by not looking like a notebook “try to be” a web app.</p><p>What would you <strong>not</strong> use Streamlit for? Remember use case 1 at the very beginning of this article? If I need to do significant hacking to figure out the right pandas + plotting syntax to get a chart I want, I prefer to go back to my Jupyter Notebook for fast messy iteration. The “scratchpad” use case is still very much core to my notebook usage. Once I worked the right syntax out, I copy the finished code snippets to my Streamlit project to render a polished data app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b16ceee02bd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>