Skip to content

DEV - Unify 2025 and 2026 311 Data Schemas #2077

@ryanfchase

Description

@ryanfchase

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: 311 Data: Weekly Engineering Meeting Agenda 2026 #2066 (comment)
    2. Side-by-side image: 311 Data: Weekly Engineering Meeting Agenda 2026 #2066 (comment)
  2. MyLA311 Datasets
    1. 2026 dataset: https://data.lacity.org/City-Infrastructure-Service-Requests/MyLA311-Cases-2026/2cy6-i7zn/about_data
    2. 2025 dataset: https://data.lacity.org/City-Infrastructure-Service-Requests/MyLA311-Service-Request-Data-2025/h73f-gn57/about_data
  3. 2025 vs 2026 comparison table
    1. DEV - Unify 2025 and 2026 311 Data Schemas #2077 (comment)
  4. Suggested unified internal schema
    1. DEV - Unify 2025 and 2026 311 Data Schemas #2077 (comment)
  5. Early attempt at creating internal schema (from 2025 data contract)
    1. https://github.com/hackforla/311-data/blob/main/src/utils/DataService.js

Metadata

Metadata

Assignees

Labels

Complexity: Mediumrequire research/investigation before completing; internal team info/input or external team questionFeature: Data Qualityrelated to data presentation or analysis for internal use, evaluation or improvementRole: FrontendReact front end workfeature: data-bound componentThis UI element is attached to a particular data source, and certain elements may change as a resultp-feature: datainfo available to users i.e. NC boundaries/names, SR info/data, etc (user friendly map info/data)size: 3ptCan be done in 13-18 hours

Type

No type

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions