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   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── 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)
district<-read_excel("district (3).xls")
hist(district$DPSTURNR,breaks=50)

hist(district$DPFPASPEP,breaks=50)

mean(district$DPETECOP)
## [1] 60.75046
median(district$DPETECOP)
## [1] 61.9
#STUDENTS: % ECONOMICALLY DISADVANTAGED
d_mean<-mean(district$DPETECOP)
d_median<-median(district$DPETECOP)

hist(district$DPETECOP)
abline(v=d_mean,col='blue',lwd=5)
abline(v=d_median,col='red',lwd=5)

head(district)
## # A tibble: 6 × 137
##   DISTNAME DISTRICT DZCNTYNM REGION DZRATING DZCAMPUS DPETALLC DPETBLAP DPETHISP
##   <chr>    <chr>    <chr>    <chr>  <chr>       <dbl>    <dbl>    <dbl>    <dbl>
## 1 CAYUGA … 001902   001 AND… 07     A               3      574      4.4     11.5
## 2 ELKHART… 001903   001 AND… 07     A               4     1150      4       11.8
## 3 FRANKST… 001904   001 AND… 07     A               3      808      8.5     11.3
## 4 NECHES … 001906   001 AND… 07     A               2      342      8.2     13.5
## 5 PALESTI… 001907   001 AND… 07     B               6     3360     25.1     42.9
## 6 WESTWOO… 001908   001 AND… 07     B               4     1332     19.7     26.2
## # ℹ 128 more variables: DPETWHIP <dbl>, DPETINDP <dbl>, DPETASIP <dbl>,
## #   DPETPCIP <dbl>, DPETTWOP <dbl>, DPETECOP <dbl>, DPETLEPP <dbl>,
## #   DPETSPEP <dbl>, DPETBILP <dbl>, DPETVOCP <dbl>, DPETGIFP <dbl>,
## #   DA0AT21R <dbl>, DA0912DR21R <dbl>, DAGC4X21R <dbl>, DAGC5X20R <dbl>,
## #   DAGC6X19R <dbl>, DA0GR21N <dbl>, DA0GS21N <dbl>, DDA00A001S22R <dbl>,
## #   DDA00A001222R <dbl>, DDA00A001322R <dbl>, DDA00AR01S22R <dbl>,
## #   DDA00AR01222R <dbl>, DDA00AR01322R <dbl>, DDA00AM01S22R <dbl>, …
ggplot(district,aes(x=DPETECOP,y=DA0AT21R,group=DPETECOP))+geom_boxplot()
## Warning: Removed 4 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

ggplot(district,aes(x=DPETECOP,y=DA0AT21R))+geom_point()
## Warning: Removed 4 rows containing missing values or values outside the scale range
## (`geom_point()`).

library(tidyverse)
library(readxl)
ggplot(district,aes(x=DPETECOP,y=DPETHISP))+geom_point()

ggplot(district,aes(x=DPFPASPEP,y=DPETHISP))+geom_point()
## Warning: Removed 5 rows containing missing values or values outside the scale range
## (`geom_point()`).