Data Study on Most Common Drugs on Webmd

Posted on Nov 6, 2018
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.


WebMD is a website that people use to read health information and data, including drugs they are interested in learning about. Among its features is a listing of the most common drugs people search. Each of the links to the drugs includes reviews that users have given the drugs with information like the condition the drug is for, ratings on the drug, as well as vital statistics on the user like age, sex, and how long they used the drug.

Data Study on Most Common Drugs on Webmd

Data Study on Most Common Drugs on Webmd

Extracting Data from Webmd

I used Scrapy to scrape all the reviews from the most common drugs listed on WebMD. I created a Shiny app to visualize the data that was scraped from the site.

Interactive Shiny web data application

The Shiny app has four tabs: an introduction, a preview of the scraped data, a tab called "By Drug," and a tab called "By Condition."

On the tab called "By Drug," one can select a drug from the dropdown menu. After choosing a drug, the app will output a bar graph that contains the counts of ease of use ratings, effectiveness ratings, and satisfaction ratings. Below this bar graph is another graph that depicts how long reviewers used the drug. This tab also includes the average ease of use, effectiveness, and satisfaction ratings by drug.

Data Study on Most Common Drugs on Webmd

The next tab is called "By Condition." On this tab, one can select a medical condition from the drop down menu. Based on the condition selected, new options in the "Select Drug" drop down menu will appear. These drugs listed in the drop down menu are those that treat the condition selected. After selecting a drug based on the condition, the app will show a bar graph containing the counts of ease of use, effectiveness, and satisfaction reviews.

Data Study on Most Common Drugs on Webmd

Future Work

In the future, I wish to use age and sex as a factor in viewing the ratings. Additionally, I could add a word cloud with the most common words said in the comments for each category selected. Additionally, in the future, I could scrape other data for each drug, such as uses, side effects, how to use, how long it takes for cone to get the full benefit from the drug, interactions with other drugs, and allergies. Lastly, I could find the prices for the drugs from pharmacies in the area.

Link to GitHub repository and Shiny app:

About Author

Anisha Luthra

Anisha Luthra recieved her Bachelor of Science in Biological Sciences from Cornell University in May 2018. She is currently working as a Data Science Fellow at NYC Data Science Academy. She previously worked at Clark and Messer Labs...
View all posts by Anisha Luthra >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI