Introduction

For the analysis use two data sources. The first is per capita cheese consumption for selected varieties (annual), offered by the USDA dairy data site. The second is fatal injury data produced by the CDC and available on their Web-based Injury Statistics and Reporting System (WISQARS) site. In this analysis, explore the potential correlation between different kind of per capita cheese consumption and annual deaths by poisoning in the United States. After selecting “muenster” cheese type, final data set includes information on muenster consumption and injury-related mortality. After identifying a significant correlation between muenster and various causes of death, particularly poisoning, focus on this specific association. The subsequent visualization utilizes a scatter plot and a fitted linear regression line to illustrate the relationship between annual deaths by poisoning and muenster consumption.

Methodology

First new_death data frame is created by filtering the original deaths dataset based on specific criteria, renaming columns, and then reshaping the data using pivot_wider to arrange death counts by different injury mechanisms. Subsequently, the death_by_cheese data frame is created by selecting the relevant columns from the cheese dataset and performing an inner join with the previously created new_death data frame based on the “year” column. Finally, the code calculates the correlation matrix using the cor() function on the death counts for various injury mechanisms and the muenster cheese consumption.

## # A tibble: 6 × 12
##    year `Cut/pierce` Drowning  Fall `Fire/hot object or substance` Firearm
##   <dbl>        <dbl>    <dbl> <dbl>                          <dbl>   <dbl>
## 1  2016         2823     4628 35862                           3284   38658
## 2  2015         2531     4425 34488                           3146   36252
## 3  2014         2609     3995 33018                           3196   33594
## 4  2013         2576     4056 31240                           3220   33636
## 5  2012         2648     4308 29776                           2911   33563
## 6  2011         2587     4245 28360                           3172   32351
## # ℹ 6 more variables: `Motor vehicle traffic` <dbl>,
## #   `All Other Transport` <dbl>, Poisoning <dbl>, Suffocation <dbl>,
## #   `All Other Specified` <dbl>, Unspecified <dbl>
##                                 muenster  Cut/pierce    Drowning       Fall
## muenster                      1.00000000 -0.04990773  0.51393834  0.9356425
## Cut/pierce                   -0.04990773  1.00000000  0.17063452  0.2206411
## Drowning                      0.51393834  0.17063452  1.00000000  0.5567061
## Fall                          0.93564250  0.22064112  0.55670608  1.0000000
## Fire/hot object or substance -0.83707186 -0.09090047 -0.53402721 -0.8667681
## Firearm                       0.90453644  0.22761514  0.64881514  0.9257407
## Motor vehicle traffic        -0.78593273  0.22880203 -0.36438044 -0.7506909
## All Other Transport          -0.50103136 -0.31775277 -0.44540194 -0.6067667
## Poisoning                     0.90497837  0.30911141  0.63334924  0.9791790
## Suffocation                   0.93041389  0.17177657  0.54091944  0.9938990
## All Other Specified          -0.37671471 -0.16056723 -0.01576699 -0.4647084
## Unspecified                  -0.30377829 -0.14550347  0.05042755 -0.3734979
##                              Fire/hot object or substance    Firearm
## muenster                                      -0.83707186  0.9045364
## Cut/pierce                                    -0.09090047  0.2276151
## Drowning                                      -0.53402721  0.6488151
## Fall                                          -0.86676812  0.9257407
## Fire/hot object or substance                   1.00000000 -0.7172177
## Firearm                                       -0.71721766  1.0000000
## Motor vehicle traffic                          0.88872560 -0.5418749
## All Other Transport                            0.57250666 -0.4904084
## Poisoning                                     -0.78997216  0.9589757
## Suffocation                                   -0.86387501  0.9113808
## All Other Specified                            0.52456683 -0.3167888
## Unspecified                                    0.52310835 -0.1104524
##                              Motor vehicle traffic All Other Transport
## muenster                                -0.7859327          -0.5010314
## Cut/pierce                               0.2288020          -0.3177528
## Drowning                                -0.3643804          -0.4454019
## Fall                                    -0.7506909          -0.6067667
## Fire/hot object or substance             0.8887256           0.5725067
## Firearm                                 -0.5418749          -0.4904084
## Motor vehicle traffic                    1.0000000           0.4476599
## All Other Transport                      0.4476599           1.0000000
## Poisoning                               -0.6450346          -0.5999390
## Suffocation                             -0.7582158          -0.5886872
## All Other Specified                      0.4785087           0.3578379
## Unspecified                              0.5946724           0.5042059
##                               Poisoning Suffocation All Other Specified
## muenster                      0.9049784   0.9304139         -0.37671471
## Cut/pierce                    0.3091114   0.1717766         -0.16056723
## Drowning                      0.6333492   0.5409194         -0.01576699
## Fall                          0.9791790   0.9938990         -0.46470837
## Fire/hot object or substance -0.7899722  -0.8638750          0.52456683
## Firearm                       0.9589757   0.9113808         -0.31678878
## Motor vehicle traffic        -0.6450346  -0.7582158          0.47850867
## All Other Transport          -0.5999390  -0.5886872          0.35783788
## Poisoning                     1.0000000   0.9654581         -0.40415779
## Suffocation                   0.9654581   1.0000000         -0.47571858
## All Other Specified          -0.4041578  -0.4757186          1.00000000
## Unspecified                  -0.2982013  -0.3468012          0.52552447
##                              Unspecified
## muenster                     -0.30377829
## Cut/pierce                   -0.14550347
## Drowning                      0.05042755
## Fall                         -0.37349794
## Fire/hot object or substance  0.52310835
## Firearm                      -0.11045238
## Motor vehicle traffic         0.59467240
## All Other Transport           0.50420589
## Poisoning                    -0.29820134
## Suffocation                  -0.34680116
## All Other Specified           0.52552447
## Unspecified                   1.00000000

Conclusion

The scatterplot and positively inclined regression line reveal a notable correlation coefficient of 0.90497 between per capita muenster cheese consumption and annual deaths by poisoning in the United States. This high positive correlation suggests a potential association between these two variables. From a practical standpoint, this finding raises intriguing questions about the intersection of dietary habits and public health outcomes. While correlation does not imply causation, the observed relationship prompts further investigation into the potential influence of muenster cheese consumption on poisoning-related fatalities.