R Markdown - A tall white fountain played
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 4.0.0 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.1.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readxl)
CAFB_SetUp <- read.csv("Capital_Area_Food_Bank_Hunger_Estimates.csv")
CAFB_Report <- CAFB_SetUp[c("TRACT", "F15_FI_RATE", "F15_FI_POP", "F15_LB_NEED", "F15_DISTRIB", "F15_LB_UNME")]
cor(CAFB_Report$F15_FI_POP, CAFB_Report$F15_LB_UNME)
## [1] 0.8998949
#For this examination, we are going to compare the population experiencing food insecurity of a tract with the unmet need of food within a tract. The results shows a strong correlation at first glance.
pairs(~F15_FI_RATE+F15_FI_POP+F15_LB_NEED+F15_DISTRIB+F15_LB_UNME, data=CAFB_Report)

# Just at first glance, it appears as the variables are fairly uniform with each other as they head towards the same direction. Albiet there are some outliers.
cor.test(CAFB_Report$F15_FI_RATE, CAFB_Report$F15_LB_UNME, method = "kendall")
##
## Kendall's rank correlation tau
##
## data: CAFB_Report$F15_FI_RATE and CAFB_Report$F15_LB_UNME
## z = 28.272, p-value < 2.2e-16
## alternative hypothesis: true tau is not equal to 0
## sample estimates:
## tau
## 0.5873502
#For this selection, we examine the rate of the population per tract experiencing food insecurity versus the lbs of unmet food in a census tract. The purpose of this cross examination is to understand that while the food insecure population can be viewed as minuscule, the lbs of food needed is gargantuan. This leads to the overall question of "Has the CAFB improved it's distribution of food since this report from 2015". If the CAFB has not minimized the unmet food quota per the rate of food insecure population, it could be seen that the CAFB has not improved the food insecurity situation in the Washington D.C. area. I used the Kendall method because you told me to, but also because the data from the CAFB is not consistently normal. Kendall helps normalize the data, especially since there are outliers in the data set.