import%20marimo%0A%0A__generated_with%20%3D%20%220.23.9%22%0Aapp%20%3D%20marimo.App(width%3D%22medium%22)%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%20Ridge%20Decoupling%20Analysis%0A%0A%20%20%20%20**Question%3A**%20Did%20flood-exposed%20coastal%20zips%20decouple%20from%20the%20ridge%20zips%0A%20%20%20%20(33710%20%2F%2033713)%20after%20Helene%20(2024-09-26)%20and%20Milton%20(2024-10-09)%3F%0A%0A%20%20%20%20**Verdict%20framing%20(pre-registered)%3A**%0A%20%20%20%20divergence%20%E2%86%92%20thesis%20confirmed%2C%20urgency%20real%20%C2%B7%0A%20%20%20%20no%20divergence%20%E2%86%92%20buying%20ahead%20of%20repricing%20(better%20entry%2C%20thesis%20unproven).%0A%0A%20%20%20%20This%20notebook%20is%20the%20single%20source%20of%20truth.%20Code%20cells%20run%20the%20analysis%3B%20markdown%0A%20%20%20%20cells%20hold%20the%20**decision%20log**%20and%20**findings**%20*inline*%2C%20next%20to%20the%20code%20that%0A%20%20%20%20produced%20them%20%E2%80%94%20so%20they%20can't%20drift%20the%20way%20a%20side-doc%20does.%0A%0A%20%20%20%20**How%20to%20read%3A**%20decisions%20carry%20an%20ID%20(%60D1%60%E2%80%A6)%20cited%20in%20code%2Fchart%20captions%2C%20and%20a%0A%20%20%20%20**pre-data%20%2F%20post-data**%20flag%20(changed-after-seeing-results%20is%20allowed%20but%20flagged%2C%20so%0A%20%20%20%20we%20never%20quietly%20torture%20cohorts%20until%20the%20chart%20looks%20right).%20Findings%20(%60F1%60%E2%80%A6)%20carry%20a%0A%20%20%20%20**clean%20%2F%20caveat%20%2F%20problem**%20quality%20verdict.%0A%0A%20%20%20%20%3E%20**Format%20note%20(2026-06)%3A**%20originally%20a%20%60%23%20%25%25%60%20percent-cell%20lab%20notebook%3B%20converted%20to%0A%20%20%20%20%3E%20marimo%20so%20it%20joins%20the%20rest%20of%20the%20analysis%20deck%20in%20the%20exported%20HTML%20bundle.%20Same%0A%20%20%20%20%3E%20deterministic%2C%20read-only%2C%20top-to-bottom%20analysis%20%E2%80%94%20no%20mutable%20kernel%20either%20way.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20from%20pathlib%20import%20Path%0A%0A%20%20%20%20import%20duckdb%0A%20%20%20%20import%20marimo%20as%20mo%0A%20%20%20%20import%20pandas%20as%20pd%0A%0A%20%20%20%20return%20Path%2C%20duckdb%2C%20mo%0A%0A%0A%40app.cell%0Adef%20_(Path%2C%20duckdb)%3A%0A%20%20%20%20def%20_find_db()%20-%3E%20str%3A%0A%20%20%20%20%20%20%20%20for%20d%20in%20%5BPath.cwd()%2C%20*Path.cwd().parents%5D%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(d%20%2F%20%22analytics.db%22).exists()%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20str(d%20%2F%20%22analytics.db%22)%0A%20%20%20%20%20%20%20%20raise%20FileNotFoundError(%22analytics.db%20not%20found%20walking%20up%20from%20cwd%22)%0A%0A%20%20%20%20con%20%3D%20duckdb.connect(_find_db()%2C%20read_only%3DTrue)%20%20%23%20read-only%3A%20project%20convention%0A%0A%20%20%20%20def%20q(sql%3A%20str)%3A%0A%20%20%20%20%20%20%20%20%22%22%22Run%20a%20query%2C%20return%20a%20DataFrame.%20This%20is%20your%20'cell'.%22%22%22%0A%20%20%20%20%20%20%20%20return%20con.execute(sql).df()%0A%0A%20%20%20%20return%20(q%2C)%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Decision%20Log%0A%0A%20%20%20%20%7C%20ID%20%7C%20Status%20%7C%20Timing%20%7C%20Decision%20%7C%20Rationale%20%7C%0A%20%20%20%20%7C----%7C--------%7C--------%7C----------%7C-----------%7C%0A%20%20%20%20%7C%20D1%20%7C%20decided%20(revised%202026-06-14)%20%7C%20pre-data%20%E2%86%92%20post-data%20%7C%20Deliverable%20%3D%20plain-Python%20lab%20notebook%20%2B%20DuckDB%20read-only%20loop.%20**marimo%20adopted%20as%20the%20go-forward%20reactive%20notebook**%20(read-only%20SQL%20cells%2C%20lazy%20mode).%20This%20file%20is%20now%20the%20marimo%20conversion%20of%20that%20record%20%7C%20Revised%20away%20from%20Jupyter%20(mutable%20kernel%20%E2%86%92%20hidden%20out-of-order%20state).%20marimo%20keeps%20the%20reactive%20cell%20loop%20WITHOUT%20the%20mutable%20kernel%20%E2%80%94%20deterministic%20re-runs%2C%20pure-%60.py%60%20files%2C%20git-clean.%20See%20%60.claude%2Freference%2Fanalysis-playbook.md%60%20%7C%0A%20%20%20%20%7C%20D2%20%7C%20decided%20%7C%20pre-data%20%7C%20Flood%20axis%20%3D%20%60%25%20parcels%2Fzip%20with%20flood_zone%20in%20%7BA%2CAE%2CAO%2CAH%2CV%2CVE%7D%60%20%7C%20Native%20PCPAO%20field%3B%20validated%20clean%20in%20F1%20%7C%0A%20%20%20%20%7C%20D3%20%7C%20decided%20(revised)%20%7C%20pre-data%20%7C%20**No%20early%20filtering.**%20Use%20the%20full%20tracked-zip%20universe%3B%20treat%20flood%20exposure%20(SFHA%20%25)%20as%20a%20*continuous*%20variable%3B%20cohorts%20demote%20to%20post-hoc%20bins%2Flabels%20for%20readability%2C%20not%20a%20pre-filter%20%7C%20Filtering%20to%20~12%20hand-picked%20zips%20discards%20~32%20zips%20of%20signal%20and%20bakes%20in%20our%20segmentation.%20Dose-response%20across%20all%20zips%20reveals%3A%20is%20the%20ridge%20*special*%20or%20just%20*dry*%3F%20linear%20decline-vs-exposure%20or%20a%20cliff%3F%20which%20zips%20defy%20the%20pattern%20(%3D%20who%20absorbs%20the%20repricing)%3F%20%7C%0A%20%20%20%20%7C%20D4%20%7C%20SUPERSEDED%20%7C%20pre-results%20%7C%20Zip-membership%20filtering%20%E2%80%94%20dissolved%20by%20D3-revised%20%7C%20Every%20zip%20is%20now%20a%20point%20on%20the%20exposure%20axis%3B%20St-Pete-vs-all-Pinellas%20is%20a%20labeling%2Fsensitivity%20toggle%2C%20not%20a%20prep%20gate.%20F8%20(33712)%20%26%20F9%20(33715)%20survive%20as%20labeling%20input%20%7C%0A%20%20%20%20%7C%20D5%20%7C%20decided%20%7C%20pre-data%20%7C%20zip%E2%86%92cohort%3A%20weighted%20mean%20by%20%60total_housing_units%60%20(prices%2FDOM)%2C%20sum%20(inventory)%20%7C%20Stops%20tiny%20zips%20swinging%20the%20cohort%20%7C%0A%20%20%20%20%7C%20D6%20%7C%20decided%20%7C%20pre-data%20%7C%20Index%20base%20%3D%20**Aug%202024%20%3D%20100**%20%7C%20Last%20full%20pre-storm%20month%20%7C%0A%20%20%20%20%7C%20D7%20%7C%20decided%20%7C%20pre-data%20%7C%20Pre-baseline%20%3D%20**Jan%202022%20%E2%80%93%20Aug%202024**%20%7C%20Post-rate-hike%20regime%3B%20avoids%202020%E2%80%9321%20boom%20contamination%20%7C%0A%20%20%20%20%7C%20D8%20%7C%20DONE%20(V7)%20%7C%20pre-data%20%7C%20Resolve%20condo%2FSFH%20confound%20(F11%2FF12)%20by%20ingesting%20Zillow%20**SFH-only**%20%2B%20**Condo-only**%20ZHVI%20at%20zip%20%E2%80%94%20Zillow%20pre-classifies%20property%20type%2C%20which%20our%20parcel%20data%20lacks%20%7C%20Trivial%20pipeline%20add%3A%202%20metric%20mappings%20%2B%202%20columns%20in%20ingest_zillow.py%20%2F%20schema.sql.%20CAVEAT%3A%20fixes%20property-type%2C%20NOT%20ZHVI%20smoothing%2Flag%20(F3)%20%E2%86%92%20pair%20with%20sales_history%20for%20the%20storm%20edge%20%7C%0A%0A%20%20%20%20%23%23%23%20D4%20%E2%80%94%20sub-decisions%20(SUPERSEDED%20by%20D3-revised%20%E2%80%94%20kept%20for%20history)%0A%20%20%20%20_The%20filtering%20question%20below%20dissolved%3A%20we%20no%20longer%20pre-select%20zips.%20Exposure%20is%0A%20%20%20%20continuous%20across%20all%20zips%3B%20the%20calls%20below%20survive%20only%20as%20optional%20labels._%0A%0A%20%20%20%201.%20**Non-St-Pete%20zips**%20%6033767%60%20(Clearwater)%2C%20%6033715%60%20(Tierra%20Verde)%2C%20%6033781%60%20(Pinellas%0A%20%20%20%20%20%20%20Park)%3A%20keep%20(%E2%86%92%20%22Pinellas-coastal%20vs%20St-Pete%20ridge%22%2C%20bigger%20sample)%20or%20drop%20(strict%0A%20%20%20%20%20%20%20St%20Pete)%3F%0A%20%20%20%202.%20**%6033712%60**%20in%20the%20control%3A%20flood-safe%20but%20rides%20a%20gentrification%20story%20unrelated%20to%0A%20%20%20%20%20%20%20the%20ridge%20%E2%80%94%20keep%20%26%20name%20the%20confound%2C%20swap%2C%20or%20drop%3F%20(%6033709%60%2F%6033714%60%20cleaner.)%0A%0A%20%20%20%20**Evidence%20(V2%2C%20F7)%3A**%20%6033767%60%20fell%20least%20of%20the%20beach%20zips%20(10.2%25)%20and%20tracks%20the%0A%20%20%20%20inland%20cohort%20%E2%86%92%20strong%20drop%20candidate%20(Clearwater%2C%20different%20city).%20%6033715%60%20is%0A%20%20%20%20intermediate%20(12.2%25).%20%6033712%60%20drawdown%20is%20mid-pack%20inland%20(11.3%25).%0A%20%20%20%20**Resolution%3A**%20%232%20CLOSED%20(V3%2FF8)%20%E2%80%94%20keep%20%6033712%60%2C%20confound%20absent%20in%20baseline.%0A%20%20%20%20%231%20still%20open%20%E2%80%94%20your%20call%20on%20%6033767%60%20(lean%20drop)%20and%20%6033715%60%20(lean%20keep%2Bflag).%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Data%20Lineage%0A%0A%20%20%20%20Nodes%20%3D%20datasets%20(with%20grain)%3B%20edges%20%3D%20transforms%20tagged%20with%20the%20governing%20decision.%0A%20%20%20%20Verified%20transforms%20later%20graduate%20into%20dbt%20models%20(%60models%2Fintermediate%2F%60)%2C%20where%0A%20%20%20%20dbt's%20DAG%20takes%20over.%0A%0A%20%20%20%20%60%60%60mermaid%0A%20%20%20%20flowchart%20TD%0A%20%20%20%20%20%20%20%20P%5B%22parcels%3Cbr%2F%3E1%20row%20%2F%20parcel%20%C2%B7%20~196k%22%5D%0A%20%20%20%20%20%20%20%20M%5B%22market_metrics%3Cbr%2F%3Ezip%20%C3%97%20month%20%C3%97%20source%22%5D%0A%20%20%20%20%20%20%20%20D%5B%22demographics%3Cbr%2F%3Ezip%20%C3%97%20year%22%5D%0A%20%20%20%20%20%20%20%20P%20--%3E%7C%22%25%20A*%2FV*%20per%20zip%20%C2%B7%20D2%22%7C%20S%5B%22zip%20flood%20profile%3Cbr%2F%3E1%20%2F%20zip%22%5D%0A%20%20%20%20%20%20%20%20S%20--%3E%7C%22assign%20cohort%20%C2%B7%20D3%2CD4%22%7C%20C%5B%22cohort%20map%22%5D%0A%20%20%20%20%20%20%20%20D%20--%3E%7C%22latest%20total_housing_units%22%7C%20W%5B%22cohort%20weights%22%5D%0A%20%20%20%20%20%20%20%20M%20--%3E%7C%22filter%20source%20%C2%B7%20join%20cohort%22%7C%20MC%5B%22tagged%20series%3Cbr%2F%3Ezip%20%C3%97%20month%22%5D%0A%20%20%20%20%20%20%20%20C%20--%3E%20MC%0A%20%20%20%20%20%20%20%20MC%20--%3E%7C%22wtd%20mean%20%2F%20sum%20%C2%B7%20D5%22%7C%20AGG%5B%22cohort%20%C3%97%20month%22%5D%0A%20%20%20%20%20%20%20%20W%20--%3E%20AGG%0A%20%20%20%20%20%20%20%20AGG%20--%3E%7C%22rebase%20Aug-2024%3D100%20%C2%B7%20D6%22%7C%20IDX%5B%22indexed%20series%22%5D%0A%20%20%20%20%20%20%20%20IDX%20--%3E%7C%22post-gap%20%E2%88%92%20pre-gap%20%C2%B7%20D7%22%7C%20DID%5B%22diff-in-diff%3Cbr%2F%3Ecohort-pair%20%C3%97%20metric%22%5D%0A%20%20%20%20%20%20%20%20DID%20--%3E%20V%7B%22decoupled%3F%22%7D%0A%20%20%20%20%60%60%60%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Cell%201%20%E2%80%94%20Cohort%20assignment%20(D2%2C%20D3%2C%20D4)%0A%0A%20%20%20%20First%20analytical%20decision%2C%20so%20look%20here%20first.%20SFHA%20share%2C%20evac%20share%2C%20parcel%20count%2C%0A%20%20%20%20housing-unit%20weight%2C%20dominant%20municipality%20per%20candidate%20zip%20%E2%86%92%20proposed%20cohort.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(q)%3A%0A%20%20%20%20q(%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20%20%20%20%20with%20sfha%20as%20(%0A%20%20%20%20%20%20%20%20%20%20select%20zip%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20count(*)%20as%20parcels%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20round(100.0*sum(case%20when%20upper(flood_zone)%20like%20'A%25'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20or%20upper(flood_zone)%20like%20'V%25'%20then%201%20else%200%20end)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2Fcount(*)%2C1)%20as%20sfha_pct%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20round(100.0*sum(case%20when%20upper(evac_zone)%20in%20('A'%2C'B')%20then%201%20else%200%20end)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2Fcount(*)%2C1)%20as%20evac_ab_pct%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20mode(municipality)%20as%20top_muni%0A%20%20%20%20%20%20%20%20%20%20from%20parcels%20where%20zip%20is%20not%20null%20group%20by%20zip%0A%20%20%20%20%20%20%20%20)%2C%0A%20%20%20%20%20%20%20%20units%20as%20(%0A%20%20%20%20%20%20%20%20%20%20select%20zip%2C%20total_housing_units%20from%20demographics%0A%20%20%20%20%20%20%20%20%20%20where%20(zip%2C%20year)%20in%20(select%20zip%2C%20max(year)%20from%20demographics%20group%20by%20zip)%0A%20%20%20%20%20%20%20%20)%0A%20%20%20%20%20%20%20%20select%20s.zip%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20case%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20when%20s.zip%20in%20('33706'%2C'33767'%2C'33715'%2C'33708')%20then%20'beach_condo'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20when%20s.zip%20in%20('33702'%2C'33703')%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20then%20'flooded_sfh'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20when%20s.zip%20in%20('33710'%2C'33713')%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20then%20'ridge'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20when%20s.zip%20in%20('33709'%2C'33712'%2C'33714'%2C'33781')%20%20then%20'inland_control'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20end%20as%20cohort%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20s.sfha_pct%2C%20s.evac_ab_pct%2C%20s.parcels%2C%20u.total_housing_units%20as%20units%2C%20s.top_muni%0A%20%20%20%20%20%20%20%20from%20sfha%20s%20left%20join%20units%20u%20using%20(zip)%0A%20%20%20%20%20%20%20%20where%20s.zip%20in%20('33706'%2C'33767'%2C'33715'%2C'33708'%2C'33702'%2C'33703'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'33710'%2C'33713'%2C'33709'%2C'33712'%2C'33714'%2C'33781')%0A%20%20%20%20%20%20%20%20order%20by%20cohort%2C%20s.sfha_pct%20desc%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Cell%202%20%E2%80%94%20Raw%20rows%20(no%20aggregation)%0A%0A%20%20%20%20Look%20at%20the%20data%20at%20its%20native%20grain%20*before*%20trusting%20any%20average.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(q)%3A%0A%20%20%20%20%23%202a%20%E2%80%94%20actual%20flood_zone%20codes%20(governs%20the%20A*%2FV*%20rule%20in%20D2)%0A%20%20%20%20q(%22select%20flood_zone%2C%20count(*)%20n%20from%20parcels%20group%20by%201%20order%20by%202%20desc%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(q)%3A%0A%20%20%20%20%23%202b%20%E2%80%94%20raw%20parcel%20rows%3A%205%20each%20from%20a%20beach%20zip%20(33706)%20and%20the%20ridge%20(33713)%0A%20%20%20%20q(%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20%20%20%20%20select%20zip%2C%20parcel_id%2C%20flood_zone%2C%20evac_zone%2C%20year_built%2C%20sqft_living%2C%20assessed_value%0A%20%20%20%20%20%20%20%20from%20parcels%20where%20zip%20in%20('33706'%2C'33713')%0A%20%20%20%20%20%20%20%20qualify%20row_number()%20over%20(partition%20by%20zip%20order%20by%20parcel_id)%20%3C%3D%205%0A%20%20%20%20%20%20%20%20order%20by%20zip%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(q)%3A%0A%20%20%20%20%23%202c%20%E2%80%94%20raw%20monthly%20ZHVI%20at%20native%20grain%2C%20storm%20window%0A%20%20%20%20q(%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20%20%20%20%20select%20month%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20max(case%20when%20zip%3D'33713'%20then%20zhvi%20end)%20as%20ridge_33713%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20max(case%20when%20zip%3D'33706'%20then%20zhvi%20end)%20as%20beach_33706%0A%20%20%20%20%20%20%20%20from%20market_metrics%20where%20source%3D'zillow'%20and%20month%20between%20'2024-01-01'%20and%20'2026-04-30'%0A%20%20%20%20%20%20%20%20group%20by%20month%20order%20by%20month%0A%20%20%20%20%20%20%20%20%22%22%22%0A%20%20%20%20)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Findings%0A%0A%20%20%20%20%7C%20ID%20%7C%20Cell%20%7C%20Observation%20%7C%20Quality%20%7C%20Implication%20%7C%0A%20%20%20%20%7C----%7C------%7C-------------%7C---------%7C-------------%7C%0A%20%20%20%20%7C%20F1%20%7C%202a%20%7C%20A*%2FV*%20rule%20captures%20every%20SFHA%20code%20(AE%2055%2C796%20%C2%B7%20A%20%C2%B7%20VE%20%C2%B7%20AO%20%C2%B7%20AH)%3B%20X%20%3D%20dry%3B%201%20OPEN%20WATER%20parcel%20%7C%20clean%20%7C%20Cohort%20rule%20sound%20%7C%0A%20%20%20%20%7C%20F2%20%7C%202b%20%7C%20%60evac_zone%60%20is%20text%20(%60NON%20EVAC%60%2C%60A%60)%3B%20flood%20%26%20evac%20agree%20at%20row%20level%20%7C%20clean%20%7C%20No%20contradiction%20between%20risk%20fields%20%7C%0A%20%20%20%20%7C%20F3%20%7C%202c%20%7C%20ZHVI%20smooth%2Fmonotonic%20%E2%80%94%20a%20smoothed%20index%3B%20trough%20~14mo%20post-storm%20%7C%20caveat%20%7C%20Understates%20%26%20lags%20storm%3B%20read%20Redfin%20%60median_sale_price%60%20too%20%7C%0A%20%20%20%20%7C%20F4%20%7C%202c%20%7C%20**Downturn%20predates%20the%20storms**%20(beach%20peaks%20Apr-24%2C%20ridge%20Jun-24%3B%20storms%20Sep%2FOct-24)%20%7C%20caveat%20%7C%20Decline%20%3D%20rate%20regime%2C%20not%20storm%20crater%3B%20storm%20signal%20is%20*differential*%20decline%20%E2%86%92%20validates%20D6%2FD7%20%7C%0A%20%20%20%20%7C%20F5%20%7C%202c%20%7C%20Raw%20peak%E2%86%92trough%3A%20beach%20%E2%88%9218.7%25%2C%20ridge%20%E2%88%929.3%25%20(~2%C3%97)%20%7C%20%E2%80%94%20%7C%20Preliminary%20decoupling%2C%20single-zip%2C%20pre-aggregation%20%E2%80%94%20hold%20loosely%20%7C%0A%20%20%20%20%7C%20F6%20%7C%20V1%2CV2%20%7C%20All%2012%20candidate%20zips%20dense%20%26%20uniform%20since%202022%20(52%20ZHVI%20mo%2C%2050%20Redfin%20mo%2C%20zero%20nulls)%3B%20indexed%20series%20show%20real%207%E2%80%9317%25%20movement%20%7C%20clean%20(verified)%20%7C%20Uniformity%20is%20genuine%20data%2C%20not%20flat%20imputation%3B%20no%20composition%20bias%20for%20the%20cohort%20weighted-mean%20%7C%0A%20%20%20%20%7C%20F7%20%7C%20V2%20%7C%20Per-zip%20drawdown%20since%20Aug-2024%20ranks%20by%20flood%20exposure%3A%20flooded_sfh%20%26%20St-Pete%20beach%20~16%E2%80%9317%25%20%3E%20non-St-Pete%20beach%20%26%20inland%20~10%E2%80%9312%25%20%3E%20ridge%207.6%2F8.8%25%20%7C%20signal%20%7C%20Decoupling%20visible%20%26%20exposure-ordered%20pre-aggregation%3B%20conservative%20(ZHVI%20smoothed%2C%20F3).%20%6033767%60%20Clearwater%20behaves%20like%20inland%20%E2%86%92%20D4%20evidence%20%7C%0A%20%20%20%20%7C%20F8%20%7C%20V3%20%7C%20Baseline%202022%E2%86%92Aug-2024%20ZHVI%20change%3A%2033712%20%2B20.1%25%20sits%20mid-pack%20inland%20and%20%E2%89%88%20ridge%2033710%20(%2B20.0)%20%7C%20clean%20%7C%20Gentrification%20confound%20absent%20in%20baseline%20%E2%86%92%20keep%2033712%20as%20control.%20Ridge%20%26%20inland%20share%20a%20parallel%20pre-trend%20%E2%86%92%20supports%20diff-in-diff%20%7C%0A%20%20%20%20%7C%20F9%20%7C%20V4%20%7C%2033715%20(Tierra%20Verde)%20tracks%20the%20St-Pete%20beach%20pair%20in%20shape%20%26%20trough%20timing%20but%20attenuated%20(%E2%88%9212.2%25)%3B%2033706%E2%89%8833708%20nearly%20identical%20%7C%20clean%20%7C%2033715%20coherent%20with%20beach_condo%2C%20soft%20member%20%E2%86%92%20keep%2Bflag%20%2B%20sensitivity-check%3B%20reinforces%20dropping%2033767%20%7C%0A%20%20%20%20%7C%20F10%20%7C%20V5%20(all%2044%20zips)%20%7C%20Dose-response%20real%20on%20AVERAGE%20(SFHA%3E60%25%20~%E2%88%9216%25%20vs%20%3C13%25%20~%E2%88%928%25%2C%20~2%C3%97)%20but%20loose%20%26%20confounded%20by%20municipality%3A%20Clearwater%20off-trend%20both%20ways.%20Clean%20gradient%20lives%20WITHIN%20St%20Pete%20%7C%20signal%2Bcaveat%20%7C%20Control%20for%20municipality%20(or%20restrict%20to%20St%20Pete)%20%2B%20property%20type%20before%20trusting%20the%20slope.%20Outlier%2033716%20(%E2%88%9222%25%2C%20condo%2FGateway)%20%3D%20property-type%20effect%20%7C%0A%20%20%20%20%7C%20F11%20%7C%20V5%20%7C%20Ridge%20NOT%20uniquely%20safe%3A%2033710%20(%E2%88%926.8)%2F33713%20(%E2%88%927.8)%20sit%20in%20the%20resilient%20cluster%2C%20but%2033701%20(%E2%88%924.0)%2C%2033704%20(%E2%88%927.1)%2C%2033756%2F33778%20(%E2%88%925.0)%20did%20as%20well%2Fbetter%20%7C%20caveat%20%7C%20First-cut%20%22dry%20premium%22%20%3E%20%22ridge-specific%20premium%22%20%E2%80%94%20tempers%20the%20personal%20thesis.%20Needs%20diff-in-diff%20%2B%20SFH-only%20before%20relied%20on%20%7C%0A%20%20%20%20%7C%20F12%20%7C%20V6%20(sales_history)%20%7C%20Realized%20sales%20current%20to%202026-06-04%3B%2041%2C244%20post-storm%20txns%3B%2097%25%20of%20parcels%20have%20%E2%89%A52%20sales%20%E2%86%92%20repeat-sales%20feasible%20%7C%20signal%20(w%2F%20prep%20caveat)%20%7C%20Ground-truth%20check%20on%20ZHVI%20dose-response.%20DANGER%3A%20raw%20median%20sale%20price%20is%20mix-biased%20%E2%86%92%20use%20%24%2Fsqft%20%2B%20arms-length%20%2B%20repeat-sales%20%7C%0A%20%20%20%20%7C%20F13%20%7C%20V7%20(SFH%2Fcondo%20ZHVI%20ingested%2C%20D8%20done)%20%7C%20Condo%20confound%20real%20%26%20concentrated%3A%20stripping%20condos%20moved%20condo-heavy%20zips%20sharply%20(33716%20%E2%88%9222%E2%86%92%E2%88%929.2)%20but%20left%20low-condo%20zips%20unchanged%20(ridge%20~%2B0.1)%20%7C%20clean%20%7C%20F10's%20dramatic%20outliers%20were%20CONDO%20stories%2C%20not%20flood%20%E2%80%94%20RESOLVED%20%7C%0A%20%20%20%20%7C%20F14%20%7C%20V7%20%7C%20De-confounded%20SFH-only%3A%20dose-response%20survives%20but%20weaker%20(high-exposure%20St-Pete%20SFH%20~%E2%88%9215%20vs%20dry%20~%E2%88%927%2C%20~2%C3%97)%3B%20ridge%2033710%2F33713%20is%20MID-PACK%20among%20dry%20zips%20%7C%20caveat%20%7C%20F11%20REINFORCED%20on%20clean%20data%3A%20%22dry%20premium%22%20not%20%22ridge-specific%20premium%22%20%7C%0A%20%20%20%20%7C%20F15%20%7C%20V8%20(ingest_pcpao%20trace)%20%7C%20**parcels%20%26%20sales_history%20are%20SFR-ONLY**%20%E2%80%94%20ingest%20filters%20DOR%20PROPERTY_USE%20prefix%20'01'.%20Condo-heavy%20zips%20have%20most%20stock%20excluded%20(33767%2017%25%20SFR%2C%2033706%2031%25%20vs%20ridge%2075%2F67%25)%20%7C%20clean%20%7C%20RESOLVES%20the%20property_type%20%22bug%22%20%E2%80%94%20parcels%20are%20SFR%20by%20construction.%20Beach-zip%20parcel%20views%20cover%20only%20their%20SFR%20minority%20%E2%86%92%20use%20zhvi_condo%20there%20%7C%0A%20%20%20%20%7C%20F16%20%7C%20V9%20(realized-sales%20ridge%20test)%20%7C%20Repeat-sales%20(n%2042%E2%80%93208%2Fzip)%20AND%20median%20%24%2Fsqft%20both%20show%20NO%20clean%20ridge%20separation%3B%20the%20two%20ridge%20zips%20don't%20cluster%20and%20the%20measures%20disagree%20on%20rank%20%7C%20signal%20%7C%20**Pre-registered%20prediction%20(divergence)%20NOT%20supported.**%20Reinforces%20F11%2FF14%3A%20ridge%20is%20dry-resilient%2C%20not%20ridge-specific%20%7C%0A%20%20%20%20%7C%20F17%20%7C%20V10%20(controlled%20OLS)%20%7C%20Restricting%20to%20St-Pete%20(n%3D13)%20STRENGTHENS%20the%20flood%20signal%3A%20slope%20%E2%88%920.60%E2%86%92%E2%88%920.92%25%2F10pp%2C%20R%C2%B2%200.36%E2%86%920.54%20(Simpson's%3A%20Clearwater%20diluted%20the%20pooled%20line).%20Ridge%20residual%20~0%20%7C%20signal%20%7C%20Flood%20exposure%20is%20a%20strong%20within-St-Pete%20predictor%20of%20decline%3B%20ridge%20%22dry%20not%20special%22%20holds%20under%20the%20cleaner%20model.%20CAVEAT%3A%20n%3D13%20small%20%7C%0A%20%20%20%20%7C%20F18%20%7C%20V11%20(St%20Pete%20vs%20rest%20of%20Pinellas%2C%20SFH)%20%7C%20St%20Pete%20fell%20modestly%20MORE%20(%E2%88%929.7%25%20vs%20%E2%88%927.7%25)%2C%20boomed%20MORE%20(%2B63%25%20vs%20%2B57%25)%2C%20more%20flood-exposed%20(33%25%20vs%2023%25%20SFHA).%20corr(boom%2C%20decline)%3D%E2%88%920.45%20%7C%20signal%20%7C%20St%20Pete's%20bigger%20decline%20jointly%20explained%20by%20reversion%20%2B%20flood%20exposure%20%E2%80%94%20entangled%2C%20modest.%20Realized%20damage%20NOT%20yet%20in%20data%20%7C%0A%20%20%20%20%7C%20F19%20%7C%20V12%20(NFIP%20realized%20claims%2C%202024%20Helene%2BMilton)%20%7C%20St%20Pete%20flooded%20~1.8%C3%97%20harder%20per%20housing%20unit%3A%2067.2%20vs%2037.3%20claims%2F1k%20units%2C%20%248%2C745%20vs%20%244%2C835%20paid%2Funit.%20Worst%20zips%20waterfront%20(33706%20286%2F1k%2C%2033703%20260%2C%2033708%20231)%3B%20RIDGE%20NOT%20in%20flood%20list%20(dry)%20%7C%20signal%20%7C%20Q2%20CONFIRMED%20with%20REALIZED%20damage%20(gap%201.8%C3%97%20%3E%20exposure%20gap%201.4%C3%97).%20The%20ridge%20is%20the%20dry%20refuge%20in%20a%20flood-hit%20city.%2051%2C759%20Pinellas%20claims%20%2F%20%243.74B%20%7C%0A%20%20%20%20%7C%20F20%20%7C%20V13%20(multivariate%2C%20n%3D44)%20%7C%20decline%20~%20boom%20%2B%20flood_intensity%3A%20FLOOD%20dominates%20%E2%80%94%20std%20coeffs%20flood%20%E2%88%921.99pp%2FSD%20vs%20boom%20%E2%88%920.31pp%2FSD%20(~6%C3%97).%20Flood%20alone%20R%C2%B2%3D0.55%2C%20%2Bboom%E2%86%920.56%20%7C%20signal%20%7C%20St%20Pete's%20bigger%20decline%20is%20overwhelmingly%20REALIZED%20FLOOD%20DAMAGE%2C%20not%20boom-reversion.%20Strongest%20%22buy%20dry%22%20support.%20CAVEAT%3A%20n%3D44%2C%20cross-sectional%2C%20smoothed%20%7C%0A%20%20%20%20%7C%20F21%20%7C%20V14%20(parcel-level%20repeat-sales%2C%20zip%20FE%2C%203%2C357%20pairs%20%2F%2047%20zips)%20%7C%20Within-neighborhood%20flood%20penalty%20STABLE%20at%20%E2%88%928.9%25%20to%20%E2%88%9210.1%25%20across%20no-trim%20%2F%20trim%20%2F%20robust-RLM.%20Significance%20marginal%20once%20clustered%20by%20zip%3A%20OLS%20p%3D0.065%E2%80%930.11%20%7C%20signal%2Bcaveat%20%7C%20Credible%20within-neighborhood%20flood%20penalty%20~9%E2%80%9310%25%2C%20a%20CONSERVATIVE%20FLOOR.%20Flood%20houses%20lost%20~9%E2%80%9310%25%20more%20than%20dry%20houses%20on%20the%20same%20streets%20%E2%80%94%20cleanest%20confound-controlled%20cut%20%7C%0A%20%20%20%20%7C%20F22%20%7C%20V15%20(block-group%20realized-claims%20mechanism)%20%7C%20Horse%20race%20(parcel%20repeat-sales%20n%3D3%2C357%3B%20logratio%20~%20designation%20%2B%20own-BG%20realized-claim-intensity%20%2B%20zip%20FE%2C%20cluster%20BG)%3A%20each%20predicts%20alone%20but%20r%3D%2B0.67%20collinear.%20With%20both%20in%2C%20realized%20EDGES%20OUT%20designation%20(p%3D.08%20vs%20.24)%20%7C%20caveat%20%7C%20Suggestive%20the%20market%20prices%20realized%20flooding%20%E2%89%A5%20the%20FEMA%20label%20%E2%80%94%20collinearity%20prevents%20clean%20separation.%20Mechanism%20refinement%2C%20not%20a%20headline%20%E2%86%92%20see%20%6005_blockgroup_mechanism.py%60%20%7C%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Results%20%26%20Verdict%0A%0A%20%20%20%20The%20pre-registered%20prediction%20was%20**divergence**%20(coastal%20zips%20decoupling%20from%20the%0A%20%20%20%20ridge).%20The%20realized-sales%20tests%20(F16)%20**did%20not%20support%20a%20ridge-*specific*%20decoupling**%3A%0A%20%20%20%20the%20two%20ridge%20zips%20don't%20cluster%20and%20the%20measures%20disagree%20on%20their%20rank.%20What%20the%20deck%0A%20%20%20%20*does*%20support%2C%20repeatedly%20and%20on%20progressively%20cleaner%20data%2C%20is%20a%20**dry%20premium**%20rather%0A%20%20%20%20than%20a%20ridge%20premium%20%E2%80%94%20flood%20exposure%20is%20the%20dominant%20driver%20of%20post-storm%20SFH%20decline%0A%20%20%20%20(F17%2C%20F20)%2C%20realized%202024%20flooding%20hit%20St-Pete's%20waterfront%20~1.8%C3%97%20harder%20than%20the%20rest%20of%0A%20%20%20%20Pinellas%20(F19)%2C%20and%20within%20the%20same%20neighborhood%20flood%20houses%20lost%20~9%E2%80%9310%25%20more%20(F21).%0A%0A%20%20%20%20**Verdict%3A**%20the%20ridge%20is%20the%20*dry%20refuge%20in%20a%20flood-hit%20city*%2C%20not%20a%20uniquely%20special%0A%20%20%20%20asset.%20For%20the%20buy%20decision%20that's%20the%20same%20actionable%20read%20%E2%80%94%20buy%20dry%20ground%20%E2%80%94%20reached%0A%20%20%20%20without%20overclaiming%20a%20ridge%20mystique%20the%20data%20won't%20carry.%20The%20realized-claims%20thread%0A%20%20%20%20started%20here%20(F19%E2%80%93F22)%20is%20taken%20to%20its%20block-group%20conclusion%20in%0A%20%20%20%20%6005_blockgroup_mechanism.py%60%20and%20to%20the%20elevation%20gradient%20in%20%6007_elevation_claims.py%60.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
ecaf4a30ae716e86a7ff5ca676a96051