FLORIDA SCHOOL DISTRICT OUTCOMES: NATIONAL VS. MASSACHUSETTS COMPARISON
Toggle between two paired standards, with imputation
Interactive bubble chart widget package
Highlighting: Sarasota, Duval, St. Johns, Monroe & Hillsborough Counties
==========================================================

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).

    On load, five districts are pre-selected and highlighted:
    Sarasota, Duval, St. Johns, Monroe, and Hillsborough. Any other
    district can still be added via the search box, or removed via
    its chip's "x" button.

    Features:
      - Comparison toggle: "National average" / "Massachusetts
        average". Switching swaps BOTH axes together -- the x-axis
        % Adequacy calculation and the y-axis outcome comparison
        change as a pair (see METHODOLOGY below), not independently.
      - Year slider, 2009-2024, with a play button to animate through
        years
      - 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
      - Bubble size = enrollment
      - Interpolated points are drawn with a dashed border (both in
        the chart and noted in the hover tooltip); imputation is
        computed independently for each standard, since each uses a
        different % Adequacy source column, and the widget shows
        whichever standard's imputation flag applies to the
        currently selected toggle

data/fl_district_data_toggle.csv
    Human-readable version of the underlying data, one row per
    district-year, with both standards side by side:
        district_name                       - FL school district
        year                                  - 2009-2024
        pct_adequacy_natl                     - current spending per
                                                 pupil / predicted
                                                 cost of national-
                                                 average outcomes
                                                 * 100, rounded to
                                                 the nearest whole
                                                 percent
        outcome_distance_to_national_avg      - outcome_index minus
                                                 that year's unweighted
                                                 national average
                                                 outcome_index, rounded
                                                 to 2 decimals
        imputed_natl                          - 1 if pct_adequacy_natl,
                                                 outcome_index, or
                                                 enrollment was
                                                 interpolated for this
                                                 district-year under the
                                                 National standard, 0
                                                 otherwise
        pct_adequacy_ma                       - current spending per
                                                 pupil / predicted
                                                 cost of Massachusetts-
                                                 average outcomes * 100,
                                                 rounded to the nearest
                                                 whole percent
        outcome_distance_to_ma_avg            - outcome_index minus
                                                 that year's
                                                 Massachusetts average
                                                 outcome_index, rounded
                                                 to 2 decimals
        imputed_ma                            - 1 if pct_adequacy_ma,
                                                 outcome_index, or
                                                 enrollment was
                                                 interpolated for this
                                                 district-year under the
                                                 Massachusetts standard,
                                                 0 otherwise
        enrollment                            - district enrollment
                                                 (identical regardless
                                                 of standard)

data/fl_district_data_toggle.json
    The same data in the compact array format actually embedded in
    index.html's <script> tag:
        [ [district_name, [[year_offset, pct_adequacy_natl, distance_national_x100, imputed_natl, pct_adequacy_ma, distance_ma_x100, imputed_ma, enrollment], ...]], ... ]
    year_offset is years since 2009 (0 = 2009, 15 = 2024); both
    distance fields are *100 (integers) -- divide by 100 to get the
    real values; the imputed fields are each 0 or 1. Provided in case
    you want to inspect, re-use, or re-embed the exact dataset
    elsewhere.

METHODOLOGY NOTES
------------------
This widget pairs two independently-built standards behind one
toggle, so switching changes both axes together:

  National average standard:
    x-axis: % Adequacy = current spending per pupil / predicted cost
            of national-average outcomes
    y-axis: outcome_index minus that year's unweighted national
            average outcome_index, across all ~13,000 US school
            districts (all 50 states plus DC). This average sits
            close to zero every year (-0.14 to +0.05), so the
            resulting distance stays close in shape to the raw
            outcome_index.

  Massachusetts average standard:
    x-axis: % Adequacy = current spending per pupil / predicted cost
            of Massachusetts-average outcomes (a higher cost basis
            than the national-average one, so its % Adequacy values
            -- ranging from about 25% to 102% in this dataset --
            aren't directly comparable to the National standard's,
            which ranges from about 38% to 152% against a lower bar)
    y-axis: outcome_index minus that year's Massachusetts average
            outcome_index (an unweighted mean across roughly 230-240
            MA districts per year, ranging from about 0.16 to 0.49).
            Because MA's average is well above zero and moves year to
            year, this view shows most Florida districts with a
            persistently larger negative gap than the National
            standard does.

Both standards' underlying fields (each % Adequacy source, the
shared outcome_index, and enrollment) were imputed independently
using linear interpolation on a per-district basis, subject to one
rule: a value is only imputed if that district has a valid value in
some earlier year AND some later year in the panel -- no
extrapolation at the edges. Both standards ended up with exactly 1
interpolated district-year (out of 1,072 total rows): Hendry County,
2021, whose row was missing outright in the source file (both its
% Adequacy figures and its outcome_index were linearly interpolated
between 2020 and 2022).

The source file has the same blank-district-name pattern seen in
other states' editions of this dataset (e.g. in 2014, 2020, and
2021), fixed the same way: districts are grouped by a stable ID
(leaid) rather than by name text -- in this case it affected Hendry
County's name field for 2020. All 67 Florida county school districts
are represented in both standards, with no name collisions (unlike
some other states' editions of this dataset, no district names
needed a leaid suffix to disambiguate).

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.

Source: School Finance Indicators Database (SFID), Albert Shanker
Institute & Rutgers Graduate School of Education. schoolfinancedata.org
