- Track MiroSociety source: backend (FastAPI), frontend (Vue3/Vite), docs, configs. - Add start.sh / deploy.sh for local dev (uv venv + npm + dev servers on 31400/31401). - Fix pyproject.toml: missing httpx dependency. - Tighten .gitignore: .env, .venv, node_modules, data/, *.log, uv.lock, frontend/dist, etcd. Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
1.0 KiB
Python
42 lines
1.0 KiB
Python
from __future__ import annotations
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class AgeDistribution(BaseModel):
|
|
bracket: str
|
|
percentage: float
|
|
|
|
|
|
class IncomeDistribution(BaseModel):
|
|
bracket: str
|
|
percentage: float
|
|
|
|
|
|
class OccupationDistribution(BaseModel):
|
|
category: str
|
|
percentage: float
|
|
|
|
|
|
class EthnicityDistribution(BaseModel):
|
|
group: str
|
|
percentage: float
|
|
|
|
|
|
class DemographicProfile(BaseModel):
|
|
city_name: str
|
|
state: str
|
|
population: int
|
|
age: list[AgeDistribution] = Field(default_factory=list)
|
|
income: list[IncomeDistribution] = Field(default_factory=list)
|
|
occupations: list[OccupationDistribution] = Field(default_factory=list)
|
|
ethnicity: list[EthnicityDistribution] = Field(default_factory=list)
|
|
median_household_income: int = 0
|
|
poverty_rate: float = 0.0
|
|
unemployment_rate: float = 0.0
|
|
homeownership_rate: float = 0.0
|
|
median_rent: int = 0
|
|
rent_burden_rate: float = 0.0
|
|
college_education_rate: float = 0.0
|
|
median_age: float = 0.0
|
|
city_character: str = ""
|