Medicinal Herbs Analysis
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: anniesremedies.com
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.
- 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.