dkahle / dkahle/txschools

Inconsistent district-name encodings across sources (display normalization)

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Problem

Different sources encode the same district's name differently: the TEA adopted-rates workbook has `CHINA SPRING ISD`, the Comptroller's "Taxing Unit Name" and Census boundary `name` have their own spellings/casings, and NCES (via the crosswalk) uses yet another (`China Spring Independent School District`-style long forms elsewhere). Casing, `ISD` vs `Independent School District`, hyphens/abbreviations (`EAGLE MT-SAGINAW`), and charter names all vary.

This is a **display** problem, not an identity problem — all joins already run on stable keys (6-digit CDN on the TEA side, GEOID/LEAID via `txs_crosswalk()`), so correctness is not at risk. But users see inconsistent names across `txs_get_*` outputs and in mixed tables.

## Direction (from initial discussion, not yet validated)

- Never join on names; keep that a documented policy.
- Two complementary pieces, if pursued:
1. An exported, pure `txs_normalize_district_name()` — title case with a whitelist (preserve ISD/CISD/MSD/UISD, `MCALLEN` → `McAllen`, `O'DONNELL`, `La Joya`, hyphens, charter oddities). Snapshot-test it over the full statewide list so edge cases surface.
2. Canonical-source names (one authority, e.g. AskTED directory or boundary `name`, keyed by CDN) only where cross-source consistency is user-visible in one place — the viewer artifacts already do this implicitly.
- Leave `district_name` in tidy outputs as the source's own spelling (provenance), with normalization opt-in.
- If a CDN → canonical-name lookup is ever baked, key it to the latest directory vintage; don't attempt year-aware names.

## Open questions

- Which source should be the canonical authority, and how divergent are the sources in practice (worth a quick statewide diff)?
- How messy are charter names under any title-case heuristic?
- Should the viewer's implicit "boundary name wins" choice be made explicit/shared?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the txs_get_* outputs, txs_crosswalk(), and the viewer artifacts, then compare district names across the TEA, Comptroller, Census, and NCES sources. Resolve the canonical-source, title-case, charter-name, and vintage questions before defining the exported normalization behavior. Done means an agreed policy, a documented no-name-joins rule, and snapshot coverage for the statewide edge cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.