hackforla / hackforla/311-data
DEV - Unify 2025 and 2026 311 Data Schemas
- Dominant language
- JavaScript
- Stars
- 73
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
### Overview
We need to support both 2025-and-earlier and 2026 service request data contracts by normalizing them into a single internal schema. The current codebase assumes the 2025 contract, which is no longer valid for newer data.
### More Info (optional)
The 2026 MyLA311 dataset introduces a different data contract (field renames, type changes, removed fields, and Salesforce-style custom fields). While the datasets represent the same conceptual entities, they cannot be treated as backward-compatible. To integrate 2026 data into our map, we need combine both contracts into a unified internal schema.
### Action Items
- [ ] Define within the code a unified internal schema for service request records (see Resource R.3)
- [ ] Implement contract-specific normalization logic
- (e.g. `def normalize(year: str) -> ServiceRequestStruct:`)
- [ ] implement transform logic for 2025 and earlier
- e.g. `normalize(2025)`, `normalize(2024)`, ...
- [ ] implement transform logic for 2026 data
- e.g. `normalize(2026)`
- [ ] Audit existing schema-related utilities (see Resource R.3)
- Verify whether current schema definitions are being used correctly
- Update schema definitions to reflect the unified contract
### Resources/Instructions
1. **Example fields from 2025 vs 2026**
1. Dropdowns: https://github.com/hackforla/311-data/issues/2066#issuecomment-3863180163
3. Side-by-side image: https://github.com/hackforla/311-data/issues/2066#issuecomment-3863190385
4. **MyLA311 Datasets**
1. 2026 dataset: https://data.lacity.org/City-Infrastructure-Service-Requests/MyLA311-Cases-2026/2cy6-i7zn/about_data
1. 2025 dataset: https://data.lacity.org/City-Infrastructure-Service-Requests/MyLA311-Service-Request-Data-2025/h73f-gn57/about_data
7. **2025 vs 2026 comparison table**
1. https://github.com/hackforla/311-data/issues/2077#issuecomment-3863314735
9. **Suggested unified internal schema**
1. https://github.com/hackforla/311-data/issues/2077#issuecomment-3863336008
11. **Early attempt at creating internal schema (from 2025 data contract)**
1. https://github.com/hackforla/311-data/blob/main/src/utils/DataService.js
Contributor guide
Assessment
This issue has not been assessed yet.