Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rhirotacouncil committed Apr 18, 2024
2 parents e7000df + 1cc2180 commit 033eb74
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ An associated webpage for this analysis can be found [on the council website](ht
- [2022-2023 School-Level Enrollment Data](https://data.cityofnewyork.us/Education/2017-18-2021-22-Demographic-Snapshot/c7ru-d68s/about_data)
- [2024 School Locations/Information](data/input/Schooldata_24.csv)
- [School Districts Shapefile](https://data.cityofnewyork.us/api/geospatial/r8nu-ymqj?method=export&format=Shapefile)
- [2021-2022 LL12 School Disease Statistics](https://github.com/NewYorkCityCouncil/sbhc/blob/main/data/input/Local%20Law%2012%20School%20Year%202021-22.xlsx)
- 2021-2022 LL12 School Disease Statistics - Local Law 12 of 2016, on file with the City Council
- [DOE’s Demographic Snapshot Dataset](https://data.cityofnewyork.us/Education/2017-18-2021-22-Demographic-Snapshot/c7ru-d68s/about_data)


#### Methodology
Expand All @@ -26,6 +27,10 @@ The data team examined student health reports submitted to the Council along wit

#### Main Takeaways

- School Districts 9 and 10 in the Bronx stand out as the two districts with the highest number of school-based health centers.
- When comparing the student asthma rate, the citywide rate is slightly lower than (14.10%) to those of school districts (14.28%) with SBHCs and those without (12.48%), where the rates are nearly the same.
- The number of school based health centers per 10,000 students appears to be linked with certain health and social indicators such as poverty, asthma, type 1 diabetes, type 2 diabetes, and severe allergic reactions.
- Despite a positive trend between SBHCs & asthma, school districts 15 & 3 stand out with fewer students in poverty and lower asthma rates compared to other districts with a high number of SBHCs.

#### Recommendations

Expand Down
27 changes: 17 additions & 10 deletions code/02_mapping.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ source('code/00_load_dependencies.R')
### Map Labels and chloropeth colors
#####
# Base layer - Total Enrollment
school_dist_shp$sbhc10k <- school_dist_shp$num_sbhc/(school_dist_shp$total_enrollment/10000)

map_total_enrollment_popup <- paste('<b style="font-size: large">',"School District:",school_dist_shp$school_dis,"</b><br>",
"<b>","Total Open Schools:</b>",prettyNum(school_dist_shp$num_open_schools, big.mark = ','),"<br>",
"<b>","Number of SBHCs per 10k Students: </b>",round(school_dist_shp$sbhc10k,2),"<br>",
"<b>","Total Schools:</b>",prettyNum(school_dist_shp$num_open_schools, big.mark = ','),"<br>",
"<b>","Total Enrolled Students:</b>",prettyNum(school_dist_shp$total_enrollment, big.mark = ','),"<br>",
"<b>","Number of Open SBHC:</b>",prettyNum(school_dist_shp$num_sbhc, big.mark = ','),"<br>",
"<b>","Number of SBHC:</b>",prettyNum(school_dist_shp$num_sbhc, big.mark = ','),"<br>",
"<b>","Number Schools SBHC Served:</b>",prettyNum(school_dist_shp$num_sbhc_schools_served, big.mark = ','),"<br>",
"<b>","Number of Schools SMHC Served:</b>",prettyNum(school_dist_shp$num_schools_smhc_served, big.mark = ','),"<br>",
"<hr>",
Expand All @@ -17,11 +20,11 @@ map_total_enrollment_popup <- paste('<b style="font-size: large">',"School Distr
"<b>","Percent of Students with Diabetes 1:</b>",label_percent(accuracy = 0.01)(school_dist_shp$percent_diabetes1),"<br>",
"<b>","Percent of Students with Diabetes 2:</b>",label_percent(accuracy = 0.01)(school_dist_shp$percent_diabetes2),"<br>")

enrollment_cuts <- classIntervals(var = school_dist_shp$total_enrollment,n=3)
enrollment_cuts <- classIntervals(var = school_dist_shp$sbhc10k,n=3)
enrollment_pal = councildown::colorBin(
palette = "bw",
bins = enrollment_cuts$brks,
domain = school_dist_shp$total_enrollment,
domain = school_dist_shp$sbhc10k,
na.color = "#FFFFFF"
)

Expand Down Expand Up @@ -183,9 +186,9 @@ m <- leaflet() %>%
`font-weight` = "bold"))) %>%
#addTiles() %>%
# Overlay Groups
# Default Base Layer - total enrollment
# Default Base Layer - sbhc per 10k enrollment
addPolygons(data = school_dist_shp,
fillColor = ~enrollment_pal(total_enrollment),
fillColor = ~enrollment_pal(sbhc10k),
fillOpacity = 0.5,
color = "black",
opacity = 1,
Expand Down Expand Up @@ -348,7 +351,7 @@ m <- leaflet() %>%
addLegend(pal = enrollment_pal,
values = school_dist_shp$total_enrollment,
labFormat = labelFormat(digits = 0, big.mark = ","),
title = "Total Enrollment in SD",
title = "SBHCs per 10k Students in SD",
layerId = "enrollment") %>%
addLegend(pal = poverty_pal,
values = school_dist_shp$percent_poverty,
Expand Down Expand Up @@ -401,7 +404,7 @@ m <- leaflet() %>%
});
}")

#mapshot(m,file="visuals/poverty_sbhc_map.png")
#mapshot(m,file="visuals/sbhc_per_10k_map.png")

# Top 3

Expand All @@ -412,7 +415,7 @@ school_dist_shp %>%
# ENROLLMENT
# The top 3 largest school districts are 31, 2, and 24 with 61,838, 57,900, 54,197 people enrolled respectively.
# Of these, only district 24 has a poverty percentage of greater than 70% and the other 2 has less than 60% in poverty.
# District 2 has the largest number of open schools of all districts and has 8 SBHCs serving 34 schools. District 31 and 24
# District 2 has the largest number of open schools of all districts and has 8 SBHCs serving 34 schools out of 133. District 31 and 24
# have 4 and 2 SBHCs respectively, both serving only 7 schools out of 87 and 69 respectively.

school_dist_shp %>%
Expand Down Expand Up @@ -440,6 +443,10 @@ school_dist_shp %>%
lmtest = lm(num_sbhc~total_enrollment + num_open_schools + percent_poverty + percent_asthma, data = school_dist_shp) #Create the linear regression
summary(lmtest) #Review the results

# MOST SBHC Traits?
# Areas with highest density of SBHCs/10k students
sbhcper10 <- school_dist_shp %>%
filter(sbhc10k >= 1.9985669)

# Of the 11 districts with high densities of SBHCs per 10k students, only districts 15 and 3 have less than 78% students in poverty,
# with 54% and 49% respectively. They also have the some of the lowest reported asthma rates when compared to the other 9 districts.

Binary file not shown.
6 changes: 3 additions & 3 deletions visuals/sbhc_map.html

Large diffs are not rendered by default.

Binary file added visuals/sbhc_per_10k_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 033eb74

Please sign in to comment.