The world has discovered avocados. Between guacamole, avocado toast (which, I discovered via my children, is nothing more than toast with mashed avocado on it), and just plain ol' enjoying its taste, avocados have become quite the popular food.
Which means that they're big business, as well: In an NPR interview two years ago, an expert said that the US imports $2.8 billion in avocados each year from one state in Mexico. And where there's business, there's also crime; it would seem that some Mexican drug cartels have found that smuggling avocados can be as lucrative as the drug business (https://www.npr.org/2022/02/19/1081948884/mexican-drug-cartels-are-getting-into-the-avocado-and-lime-business).
But crime isn't the only problem that avocados have brought with them. They've also brought about a new type of injury, namely "avocado hand." According to a Washington Post article from June 26th (https://www.washingtonpost.com/wellness/2024/06/26/avocado-hand-injuries-knife/) researchers found that there were more than 50,000 avocado-related injuries between 1998 and 2017. People seem to really hurt themselves cutting avocados, especially because they're cutting toward their hands, something that I thought everyone was taught to avoid doing.
This week, we'll look at injury reports from the US Consumer Product Safety Commission (CPSC, at https://cpsc.gov), and specifically the National Electronic Injury Surveillance System (NEISS, https://www.cpsc.gov/Research--Statistics/NEISS-Injury-Data). They provide an annual report on injuries in the United States, and among other things, we'll look at avocado-related injuries over the last few years.
Data and seven questions
The data we'll look at this week is from the database at NEISS:
https://www.cpsc.gov/cgibin/NEISSQuery/home.aspx
We want to download the annual archived data from 2020-2023. You can download them in Excel format, but you will be much happier with tab-delimited fields, believe me.
I have seven tasks and questions for you this week. Learning goals include grouping, plotting, joining, and working with text. I'll be back tomorrow with my detailed answers and Jupyter notebook:
- Load the data from 2020 - 2023 into a single data frame. Make sure that the
Treatment_Datecolumn is adatetime.
Remove any rows in which the date is invalid or NA. - In which month do we see the most accidents? The fewest?
- Create a histogram showing the frequency with which a person's age is associated with an accident. Does this seem reasonable to you? Clean the data, and recreate the histogram.
- Are men and women involved with avocado-related accidents at similar rates? How about minors (< 18 years old) vs. adults?
- Are there months in which we see a consistent spike in avocado-related injuries? Create a line plot showing how many avocado-related injuries there are in a given month.
- From the second sheet of the Excel document (ideally from 2023), create a small data frame whose index is integers, and whose values are name of body parts involved in accidents. Using that, find which body parts were most often injured with avocados?
- What are the 10 most commonly used words, containing at least 4 letters and without any digits, used in the narratives for avocado-related injuries?
Until tomorrow,
Reuven