options (scipen = 100) #Once more, still couldn't figure out how to get rid of exponents in data. Opted for this instead
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(readxl)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats 1.0.0 ✔ readr 2.1.5
## ✔ ggplot2 4.0.0 ✔ stringr 1.5.1
## ✔ lubridate 1.9.4 ✔ tibble 3.3.0
## ✔ purrr 1.1.0 ✔ tidyr 1.3.1
## ── 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
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")]
summary(CAFB_Report)
## TRACT F15_FI_RATE F15_FI_POP F15_LB_NEED
## Min. : 100 Min. :0.0000 Min. : 0.0 Min. : 0
## 1st Qu.:201802 1st Qu.:0.0470 1st Qu.: 174.7 1st Qu.: 36689
## Median :492400 Median :0.0900 Median : 351.2 Median : 73760
## Mean :512323 Mean :0.1068 Mean : 427.7 Mean : 89816
## 3rd Qu.:800607 3rd Qu.:0.1415 3rd Qu.: 609.1 3rd Qu.:127911
## Max. :920200 Max. :0.4710 Max. :2178.6 Max. :457514
## F15_DISTRIB F15_LB_UNME
## Min. : 0 Min. : 0
## 1st Qu.: 8478 1st Qu.: 23523
## Median : 21884 Median : 46737
## Mean : 32752 Mean : 57063
## 3rd Qu.: 44673 3rd Qu.: 79975
## Max. :243138 Max. :290836
#For this, I believe it is important to see how much food is commonly needed. With this information, food banks can potentially have food portioned more appropriately to fit the need for each tract.
hist(CAFB_Report$F15_LB_NEED,
main = "Food needed by census tract",
xlab = "Estimated poundage")
plot(CAFB_Report$F15_FI_POP,CAFB_Report$F15_LB_UNME,
xlab = "Estimated population experiencing food insecurity based on census tract", ylab = "Unmet food need in LBS", col = c("red", "blue"))
cor(CAFB_Report$F15_FI_RATE, CAFB_Report$F15_LB_UNME)
## [1] 0.6624265
https://catalog.data.gov/dataset/capital-area-food-bank-hunger-estimates