Source document

docs/cities/miami/02_gap_analysis.md

Served verbatim from the project repository. Internal working document conventions apply: documents may reference file paths, branch names, and findings-ledger anchors from the repo.

02 — Gap Analysis (Miami source layer vs. NYC and Philly)

Same format as docs/cities/philly/02_gap_analysis.md. "Same" = lift verbatim; "Adapt" = config or schema tweak; "New" = code with no analogue.

A. Source ingest

#DimensionNYCPhillyMiamiChange
A.1Connector kindxlsx via InfoHub CDNSocrata + PDE xlsx + SDP CDNFLDOE xlsx/xls (two URL forms, yearly name drift), MSID cookie-gated text, M-DCPS CMS xlsx/pdf, county ArcGIS REST, federal csv zips, PDF tablesAdapt + New. xlsx/xls connector lifts; add an ArcGIS REST reader, a per-year assessment-page scraper, and a PDF-table connector with two-parser agreement.
A.2Join keyDBNULCS (+ AUN/PA code)4-digit school number, zero-padded (+ NCES id, virtual provider number)Adapt. Padding normalizer at the boundary.
A.3Year encodingYYYY-YYYYYY-YY / end-year intfile suffix 2425; assessment Spring25; School Grades 25; graduation 2425 = cohort entering 2021-22; FISH report dateAdapt. Add suffix_yyyy and spring_yy year formats to sources.yaml.
A.4Suppressionn<5 / n<10n<11n<10: *, **, blank, Less_10; none in SESIR/ADA; perturbation in EDFactsAdapt. Token census per file.
A.5Provenancesha256 + bytes + retrieved_atsamesame, plus fetched_from (origin host)Same.
A.6URL stabilitystablestableFLDOE stable per file but blocked from cloud on www; assessment names driftAdapt. Origin rewrite; scrape year pages.
A.7Publisher coverage of charterscharters via separate directorySDP files district-only; state files allall FLDOE files carry charters as district-13 rows; M-DCPS survey and board files are district-run-centricSimpler than Philly. No per-sector source routing for state metrics.

B. Schema (Postgres, additive miami_* tables)

#DimensionPhillyMiamiChange
B.1schools PKulcs_codeschool_number (text, 4-digit) with nces_id, msid_type, virtual_provider_numberAdapt.
B.2school_type enumregular/charter/compctc/cyber/specialed/contractedREGULAR, CHARTER, ALTERNATIVE, ESE_CENTER, TECHNICAL_COLLEGE, VIRTUAL, DJJ, ADULT + is_charter, is_schools_of_hope, charter_open_yearAdapt.
B.3admission categorycatchment / lottery / special admission / …NEIGHBORHOOD, MAGNET_SCHOOL, MAGNET_PROGRAM_HOST, CHARTER_LOTTERY, CHOICE, ALTERNATIVE from MSID MAGNET_STATUS (Z/P/S) + CS_SCHOOL_CHOICEAdapt. Smaller enum; magnet-within-school is a flag, not a type.
B.4subgroup enumPA set incl. NON_BINARYFlorida set: ALL, WHITE, BLACK, HISPANIC, ASIAN, AMER_INDIAN_AK_NATIVE, HAWAIIAN_PAC_ISL, TWO_OR_MORE_RACES, ECON_DISADV, ELL, SWD, MIGRANT, AT_RISK, MALE, FEMALE; CRDC adds IDEA, SECTION_504Adapt. No NON_BINARY, no temp-housing (EDFacts has HOM as a subgroup — carry HOMELESS for that source).
B.5long-format metricssamesame; population_cut stays n/a (Florida publishes one cut)Same.
B.5afirst-class designationsessa_designationschool_grade (A–F, per year, as a metric and the latest on schools), title_i, sir_rating, plp_flag, school_of_excellenceNew columns / metrics.
B.5bgrowth indicatorPVAASFLDOE learning gains (all + lowest 25%)Adapt. learning_gains_* keys.
B.5cfacilities—fish_capacity_permanent, fish_capacity_school, utilization_*, cofte as metrics; MiamiSchoolEvent tableNew. 06_…md §3.
B.6metric_definitions~90 keys~110 keys (FAST × grade × subject, EOCs, gains, grad × subgroup, two absenteeism, SESIR rates, survey rollups, enrollment/capacity/PPE) + MetricUnit.USDSame structure.
B.7peer groupsKNN k=40KNN k=40 (flip-diff 20/30), re-tuned features (M.9)Same code, new config.
B.8survey raw tablePSES shapeclimate workbook shape (school × item × respondent: agree/disagree/DK %, N)Same.
B.9geographylearning network, council districtregion (N/C/S), board_district, municipality, zip, attendance-boundary polygon idAdapt.

C. Analysis pipeline

#CapabilityChange
C.1–C.2engine, outliersSame.
C.3comparability regimesAdapt. FCAT 2.0 / FSA / FAST; EOC NGSSS→FSA→B.E.S.T.; grad rate unchanged; absenteeism 2017-18 definition start, 2020-21 COVID; School Grades 2023 baseline + 2026 scale change.
C.4assembleAdapt to miami_*.
C.5outcomes configNew file. ~16 outcomes.
C.6covariatesAdapt. pct_black, pct_hispanic, pct_ell, pct_econ_disadv, cep_flag, log_enrollment, magnet_flag, sector.
C.7closure-track analysis (lift table, decomposition, cost curve, ablations)New. 06_…md §4.

D. Validation harness

#CheckMiami posture
D.1(i) completenesssource-only school numbers vs MSID active list; per-year rosters vs School Grades history.
D.2(ii) base casere-read of the exact FLDOE/M-DCPS file; PDF tables via two parsers.
D.3(iii-a) presentationSchool Grades components; Report Cards spot sample; ABC book capacity blocks; Statistical Highlights totals.
D.4(iii-b) independentCCD (enrollment, staff), EDFacts (absenteeism), CRDC (absenteeism, discipline), county GIS (capacity).
D.5(iv) computedutilization, change rates, survey rollups, SESIR rates — packet recomputation.

E. Front-end

#SurfaceChange
E.1navbar city tabsAdapt. CITIES gains { key: "miami", label: "Miami", basePath: "/miami" }; search API returns a miami bucket.
E.2Outliers / Movers / school page / methodology / proofSame components under app/miami/*, Miami labels (Region badge instead of Learning Network; School Grade badge instead of ESSA designation).
E.3storiesAll new (~20 stubs; 00_overview.md §4).
E.4enrollment/capacity working analysis + mapNew page (06_…md §6). Needs one new chart type (utilization histogram with marked schools) and a map component (attendance boundaries + points) — the first map in the product.
E.5routes testadd app/miami/* routes to tests/unit/routes.test.ts when they land.

F. Bottom line

  • Source layer: mostly new connectors, but simpler universe handling than Philly (one publisher covers everyone).
  • Schema: same shape; new facilities metrics and an events table.
  • Analysis / verification / front-end: lifted; one new analytical track and one new map surface.
  • Effort: roughly 50% of the NYC build — more schools and more files than Philly, PDF parsing, and a new page, offset by the solved methodology and reusable components. See 03_integration_plan.md for the per-item estimate.