Medicinal Herbs Analysis

Posted on Feb 3, 2020


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 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws 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 Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup music Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming 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 Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp