Data Analysis on Honeybees and Neonic Pesticides

Posted on May 28, 2021
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.


Having data studied the effects of invasive pest species on agriculture as a graduate student, I understand the increasing necessity for pesticide use. With the planet hosting a population expanding well over 7 billion, the need to maximize food production to feed all those people has become a high priority. Pests, causing financial losses in the hundreds of billions, cause farmers and corporations go to great lengths to protect their agricultural products from the 7 thousand approximate species that hamper their industries. (Govorushko 2014)

While there are a wide variety of pest control strategies in use globally, a class of pesticide, Neonicotinoids, saw use for almost 20 years in the United States starting in 1990’s, with a reduction in use, and sometimes a complete disuse altogether, only beginning in 2017. This class of pesticide works by attacking specific points in the nervous system, preventing it from functioning properly, and ultimately resulting in death. While very effective, they unfortunately are not selective in design, and are toxic to humans and pollinators alike (Blacquière et al, 2012).

One of the most crucial pollinators to our agricultural industry, the honeybee, was no exception. The scientific community has kept a close eye on the slowly declining population of honeybees around the world, and it is possible that with that decline, a drop in extant plant species may follow.


Due to the financial and scientific benefits that come from understanding this type of information, I chose a dataset that was aggregated from the National Agricultural Statistics Service (NASS), the USGS, the US Census, and the USDA, that covers honey production, pricing, value and yield, in conjunction with the neonic pesticide use in the corresponding part of the United States. The data spans from the early use of neonic pesticides in 1998, all the way to its decline in use in 2017.

In my analysis, I chose to focus on the top ten honey producing states from the dataset: North Dakota, South Dakota, California, Texas, Montana, Idaho, Florida, Minnesota, Washington, and Michigan. 

RStudio, ggplot2, dplyr and tidyr were used to refine, process and analyze the dataset, and a RShiny app was developed to interact with the original data in a user friendly way. The original dataset can be downloaded from (Kaggle), the Github repository (here), and the app can be accessed (here).


Many arthropods, especially honeybees, are very sensitive to environmental factors, both biotic and abiotic in nature. A change in weather, chemical runoff, land development, disease and food availability, can have drastic effects on honey production and honeybee health. Honey production may vary dramatically year to year, due to these ever changing factors, so to start, one wants to look at the long term effects: Do we see any significant changes from when neonic pesticide use began, and do we see any lingering effects from after it ended?

Data Analysis on Honeybees and Neonic Pesticides
Total honey production over a 20 year period: 1998-2017 (Idaho).

Here we can see illustrated, an example of the total production (lbs) of honey over time, from 1998 to 2017 (Alabama).  Across the top ten honey producing states, overall, there was no significant difference in collective honey production between 1998 and 2017, however, outside of those, this changes from state to state. Some show increases in production, and many show decreases, but only a handful show any visually striking changes. The biomes of these states differ drastically, and many factors can be the cause of these changes specific to those locations. 


Data Analysis on Honeybees and Neonic Pesticides
Honey yield per colony (lbs) over a 20 year period: 1998-2017 (North Dakota)

If we take a look at the difference in honey yield per colony over a 20 year period, statistical analysis shows that there was a significant change in yield per colony during the time neonic pesticides were used.  Production value across the top ten states overall, also, did not see a significant change in value, however, this once again varied state to state. 

Data Analysis on Honeybees and Neonic Pesticides
Value of honey (USD) vs Neonic pesticide Application (kgs): 1998-2017 (North Dakota)


Aggregated data on pesticide application can be very valuable, not just in a monetary sense, but to the health of our ecosystems as well. By evaluating how pesticides are applied in different parts of the country, we can see where these treatments are most effective, and where they are doing more harm than good. It will also help companies limit their effect on the environment, especially in areas where treatments have little to no effect on their production value. If we are to continue using treatments in agriculture that harm our pollinators, it has to be done responsibly, and through calculated and educated decisions.

Given more time, I would like to assess the effects of the different types of neonic pesticides, and how they effect honeybee colonies, production and honey production value. It is possible that certain pesticides are more effective in certain states than others, and that the application of one or more, does more harm than good, both ecologically and financially.


Blacquière, T., Smagghe, G., van Gestel, C.A.M. et al. Neonicotinoids in bees: a review on concentrations, side-effects and risk assessment. Ecotoxicology 21, 973–992 (2012).

Govorushko, S. M. "Mammals and birds as agricultural pests: a global situation." Сельскохозяйственная биология 6 (eng) (2014).

About Author

David Green

Certified in data science, confident working in R, Python, Git and SQL development. Skilled in applying machine learning techniques in data analysis of large datasets, alongside traditional statistical analysis triage
View all posts by David Green >

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