Skip to content

Add regions support for geographic analysis #81

@anth-volk

Description

@anth-volk

Summary

Add support for regions (geographic areas) in the API to enable location-specific policy analysis.

Requirements

  • Create Region database model with fields:

    • code - Region identifier (e.g., "state/ca", "us")
    • label - Display name (e.g., "California")
    • region_type - Type of region (e.g., "state", "congressional_district")
    • requires_filter - Whether dataset filtering is needed
    • filter_field / filter_value - Parameters for dataset filtering
    • dataset_id - Associated dataset
    • tax_benefit_model_id - Associated model
  • Create REST endpoints:

    • GET /regions/ - List regions with optional filters
    • GET /regions/{region_id} - Get region by ID
    • GET /regions/by-code/{region_code} - Get region by code
  • Add seed data for US and UK regions

  • Integrate with analysis endpoint to support region-level simulations

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions