A project of the Community Safety and Policing Research Program, Global Justice Lab, Munk School of Global Affairs & Public Policy, University of Toronto.
Choose which schools to look at
Loading the survey…
Every percentage is weighted with the School Survey on Crime and Safety's own weights,
because unweighted percentages of it do not describe US schools. The unweighted number of schools behind each figure is shown
beside it, and a selection under 50 schools is suppressed rather than drawn.
This page recomputes no regression. It shows weighted shares and averages
for whichever schools you select. Every coefficient elsewhere on the site comes from the
analysis code, with standard errors clustered on the sampling stratum within each survey.
$ data & code
run real R in this tabno install · R, Python, curl, JSON, citation
static files · CORS open · no key · no rate limit
This is a real R session, running in your browser through
webR.
Nothing is sent anywhere. The survey is already loaded as
schools, a data frame of 13,167 rows, with
the survey weight in w. The first run downloads R itself, about
30 MB.
R not started
Press Run. The first run takes a moment while R downloads.
# the analytic file: 12,691 school responses, six surveys, 39 columns
base <- "https://school-connectivity.pages.dev/data/"
schools <- read.csv(paste0(base, "school_connectivity.csv"))
# every statistic is weighted with the survey weight; raw percentages are wrong
weighted.mean(schools$police, schools$w) # 0.841
weighted.mean(schools$deg, schools$w) # 3.40# the paper's largest coefficient, rebuilt: the three standing arrangements as one index
z <- function(x) as.vector(scale(x))
schools$capacity <- z(z(schools$security) + z(schools$parent_process) + z(schools$equipment))
coef(lm(deg ~ capacity + z(crime_num) + factor(wave) + factor(level) + factor(urban),
data = schools, weights = schools$w))["capacity"]
# +0.386. The paper reports +0.377 for the same index, holding school size as well.# standard errors cluster on sw, the stratum crossed with the survey: 365 clusters
length(unique(schools$sw)) # 365
# pandas
import pandas as pd
base = "https://school-connectivity.pages.dev/data/"
schools = pd.read_csv(base + "school_connectivity.csv")
edges = pd.read_csv(base + "edges.csv") # one row per school and organization# weighted, always
w = schools["w"]
(schools["police"] * w).sum() / w.sum() # 0.841
(schools["deg"] * w).sum() / w.sum() # 3.40# the published coefficients, with their clustered standard errors and caveats
import json, urllib.request
json.load(urllib.request.urlopen(base + "coefficients.json"))
# everything the site serves, static, CORS open, no key
data/school_connectivity.csv # the analytic file: 12,691 school responses, 39 columns
data/school_connectivity.json # the same, as records
data/explorer.csv # the lean subset this page parses
data/edges.csv # the two-mode structure: one row per school and organization
data/codebook.json # every column, its SSOCS variable, and the six coding traps
data/tables.json # all 22 generated tables, rows and notes
data/coefficients.json # the headline coefficients, each with its caveat
data/tie_rates.json # weighted shares of each organization, overall and by survey
data/hero.json # the count distribution, for the sketch on the front page# READ codebook.json FIRST. Yes/no items are 1 and 2, the crime items are reversed,
# security staffing has a seam at 2015-16, and the cluster variable is sw, not strata.# the source files are free from NCES; this site redistributes a subset
https://nces.ed.gov/surveys/ssocs/data_products.asp
# The working paper is under review and its authors are not listed here yet.
# Write to ron.levi@utoronto.ca for the current draft and how to cite it.
# To cite this site and its data:
@misc{school_connectivity_site,
author = {{Community Safety and Policing Research Program, Global Justice Lab}},
title = {What predicts a school's ties to outside organizations},
year = {2026},
note = {University of Toronto},
url = {https://school-connectivity.pages.dev}
}
# and the source data
National Center for Education Statistics. School Survey on Crime and Safety (SSOCS),
public-use data files, 2005-06 through 2021-22. U.S. Department of Education.