SCHOOL DISTRICT SPENDING VS. OUTCOME STANDARDS
Small city cost model widget package
==========================================================

SOURCE FILE
-----------
Built from SmallCity_CostModel.xls, an uploaded district-level cost
model. Unlike the other widgets in this series, this file has no
year field -- it's a single cross-section, not a multi-year panel.
Based on the district place names (Albany, Buffalo, Rochester,
Syracuse, Yonkers, etc.) and the file's own use of "small city school
district," an official New York State classification, this dataset
is almost certainly New York State districts, though the file itself
never states that explicitly.

CONTENTS
--------
index.html
    The standalone, self-contained interactive widget. Opens directly
    in any browser -- no server or install required. Chart data is
    embedded inline inside this file, so it works fully offline once
    downloaded (it does load Chart.js from a CDN via <script src>, so
    an internet connection is needed for that one external file).

    Features:
      - Toggle between two outcome standards:
          "Current average" -> spending as % of the cost of current
                                average outcomes; outcome gap to that
                                average
          "High standard"   -> spending as % of the cost of a higher
                                outcomes standard; outcome gap to that
                                higher standard
      - Search box and click-to-select highlighting -- each selected
        district gets its own color from a 10-color palette, matched
        to a colored dot on its chip
      - A "Small Cities (57)" button that selects all 57 districts
        carrying the source file's "small city school district" flag
        as a single group, sharing one color -- this selection
        persists across the standard toggle
      - Bubble size = enrollment

data/smallcity_district_data.csv
    Human-readable version of the underlying data, one row per
    district:
        district_name                  - school district (title-cased
                                          from the source file's
                                          all-caps names)
        pct_spending_avg_standard       - "Current Spending as % of
                                          Cost of Average Outcomes"
                                          * 100, rounded to the
                                          nearest whole percent
        outcome_gap_avg_standard        - "Outcome Gap to Current
                                          Average", rounded to 2
                                          decimals
        pct_spending_high_standard      - "current spending as % of
                                          cost of high standards"
                                          * 100, rounded to the
                                          nearest whole percent
        outcome_gap_high_standard       - "Gap between current
                                          outcomes and high standard",
                                          rounded to 2 decimals
        enrollment                      - district enrollment
        small_city                      - 1 if this district carries
                                          the source file's "small
                                          city school district" flag,
                                          0 otherwise

data/smallcity_district_data.json
    The same data in the compact array format actually embedded in
    index.html's <script> tag:
        [ [district_name, pct_spending_avg_x100, outcome_gap_avg_x100, pct_spending_high_x100, outcome_gap_high_x100, enrollment, small_city], ... ]
    Both percent fields and both outcome-gap fields are already
    stored as their real percent/decimal values multiplied by 100
    (integers) to keep the file compact -- divide by 100 to get the
    real values; small_city is 0 or 1. Provided in case you want to
    inspect, re-use, or re-embed the exact dataset elsewhere.

METHODOLOGY NOTES
------------------
This widget reuses the two-standard toggle pattern from the New
Jersey school-level widget, plus the multicolor selection approach
from the California widget in this series, and adds one new
capability: a fixed group selection button for districts carrying a
particular flag (here, "small city"), rather than the free-text
district-group search used in the New Jersey widget (which grouped
individual schools under whichever district a person searched for).

Of the 692 districts in the source file, 666 have complete data
across all six needed fields (enrollment, both spending percentages,
and both outcome gaps) and are represented here. The 26 excluded
rows are mostly missing a district name entirely -- likely
administrative units, BOCES components, or small district fragments
that the source file itself leaves unlabeled -- so there was nothing
usable to plot or search for them. No interpolation or imputation was
applied to this dataset, since it's a single cross-section with no
adjacent years to interpolate from.

No district name collisions occurred after title-casing the source
file's all-caps names.

A few districts show spending well above 300% of estimated adequate
cost under either standard (Fire Island at 432%/348% is the extreme
case) -- these are small, real districts with unusually high
per-pupil spending relative to the cost model's estimate, not data
errors, though they will sit at the edge of or beyond the chart's
default axis range.

USAGE
-----
Just open index.html in a browser. To embed it on a website (e.g. as
an iframe), upload index.html somewhere with a public URL and point an
<iframe src="..."> at it -- the CSV/JSON files aren't required for the
widget to run; they're included here for reference and reuse.
