Data Analysis on Health: Medicinal Herbs Analysis

Posted on Feb 3, 2020
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.


We have been relying on and using herbs to perpetuate healthy lifestyles and manage chronic illnesses since the dawn of time. However, in the era of modern medicine we have ignored the beneficial effects of herbs in favor of well-packaged, cure-all pills with ingredients we don't understand and prices we do not question.

Herbs and herbal remedies are mentioned in ancient texts and folk songs, illustrating the intimate relationship our ancestors had with these plants. We unfortunately are living in an era where Big Pharma makes money off of us being sick. The more often we get sick, the more money is made.

About the Scraper

Target site:

Using Scrapy, a python package I systematically grabbed 150 herbs, from 26 pages with their medicinal properties, their plant descriptions, and their history/folklore. Each row was an herb with 6 columns.


  • 403 error was remedied by extensive google-ing and changing the structure of scrapy spider.
  • Not every page was formatted the same, I used exception handling in my loops to avoid this.
  • Medicinal properties and plant origins contained redundancies and missing information, this had to be handled post-scraping.

Data Cleaning and Text Mining

The tagging on the website had a lot of redundancies and was often inconsistent with the category (for example medicinal uses for Cacao include: Cough, Eczema and South American). I used a natural language processing package called spaCy to identify parts of speech and removed the "location" words to clean this up. I then used a stacking method to organize each of the lists in that described each herb.

Analysis Goals

  • How can we understand the landscape of herbal properties to advocate for our own health rather than rely solely on over the counter drugs?
  • Where herbs can help us the most in this modern era?
  • Where can consumers save the most money by supplementing care with herbs?

The chart below displays the 10 over the counter categories with the most spend in 2018.

Observe that "upper respiratory" spend in the US for 2018 is TWICE as much as it's the nearest counterpoint totaling at 8,799 million.


Observe in the above chart Bronchitis can be treated with over 25 herbs this show that indeed Upper Respiratory medicines can be affordably supplemented with many of these herbs.

About Author

Lilliana Nishihira

A NY native exploring intersections of data, arts, business, and humanitarianism. I have my Bachelor's in Mathematics from Clark University. With a background in Digital Media, I am particularly interested in the way data describes behavior. I often...
View all posts by Lilliana Nishihira >

Related Articles

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