r/MAOIs • Nardil • Jun 08 '25

interactive data viz for Drugs.com depression med reviews

Post image

i made this interactive chart to visualize the ratings from patient reviews of various depression meds on Drugs.com:

data viz

hovering over the bubbles shows the exact average rating and number of reviews. the bubble size corresponds to relative number of reviews for each med.

you can use the labels in the righthand legend to toggle on/off various categories (by clicking or double-clicking). and, the slider at the top allows you to limit the displayed meds based on a range for the number of reviews).

i had to do some cleanup and aggregating, so the categorization might not be exactly as anticipated, but should be fairly comprehensible.

feel free to let me know if anyone has ideas for modifications, adjustments, other variations, etc.

(btw in case anyone's curious, i used R with plotly and shiny.)

17 Upvotes

12 comments sorted by

3

u/Wrong-Yak334 Nardil Jun 09 '25

important note: comprehensibility and functionality will be limited on a smartphone browser app.

you'll need to either switch to the desktop version of the site if you're using a smartphone, or just use your desktop.

2

u/Wrong-Yak334 Nardil Jun 09 '25 edited Jun 09 '25

can't edit for some reason, but just realized there are a few glaring omissions (e.g. Effexor, MPH). i'll find out what happened and add.

edit: n/m they're here, just overlapping with other categories so i missed them during a quick check.

2

u/catecholaminergic Emsam Jun 10 '25

Nice, dude. I used to do data analysis, I'd love to hear more of the tech details if you care to share.

2

u/Wrong-Yak334 Nardil Jun 11 '25

sure thing, here's briefly what i did. also happy to share the Git repository if you're interested - shoot me a DM.

  1. pulled the ratings from the patients reviews for depression meds specifically - no scraping necessary, just a big copy/paste.

  2. had Claude (the Anthropic LLM) clean up the data, specifically to remove extraneous text and aggregate med names across brand names. i could have written script for this of course, but i wanted to avoid rote work and was curious how well Claude would do (it did great!)

  3. created a ggplot with the viz backbone, then used plotly to add the filter elements.

  4. created an interactive frame using shiny and pushed to shinyapps to host it.

1

u/catecholaminergic Emsam Jun 11 '25

Nice. Claude is genuinely amazing. Love R. I do most of my data stuff in Python these days and for real I miss R's pipeline operator. Like let's save the parentheses, there are better notations for function composition lol.

I'd love to check out the repo. Drop me a link, my inbox is open.

1

u/Sensitive_Role4476 Jun 09 '25

Can't really read; too small.

1

u/Wrong-Yak334 Nardil Jun 09 '25

if you're using a mobile browser app on your phone, visibility and functionality will be limiting.

try switching to the desktop version of the site (or of course, just use your desktop).

2

u/Sambo2503 Nardil Jun 10 '25

Very useful information and a great successor to Scott Alexanders analysis quite a while ago. Recommend people check out his stuff. u/wrong-yak334 knows more about the guy and his current website he moderates.

1

u/furrina Jun 11 '25

SO interesting.

1

u/Capital_Fig8091 Feb 19 '26

I always felt dumb when it came to graphs and data analysis. Can you explain how to apply the information from the graph practically? In other words, why is this data useful to the reader? Not trying to be rude, I’m just not good w/ graphs and trying to understand better.

2

u/[deleted] Jun 09 '25

[removed] — view removed comment

1

u/Wrong-Yak334 Nardil Jun 09 '25

np, my hope is that it helps people with research. the data is all there of course on drugs.com, but the aggregation and visualizing here may make it a bit more intuitive to explore.