feat: add calc_lycd_land_values — Least You Can Do land valuation#319
Open
drussellmrichie wants to merge 1 commit intolarsiusprime:masterfrom
Open
feat: add calc_lycd_land_values — Least You Can Do land valuation#319drussellmrichie wants to merge 1 commit intolarsiusprime:masterfrom
drussellmrichie wants to merge 1 commit intolarsiusprime:masterfrom
Conversation
Implements the LYCD method described in "valuing land - the simplest
viable method" (Andelson / Tideman tradition).
For each geographic cell the method:
1. Takes the median market value and median lot size of improved
(non-vacant) parcels in the cell.
2. Derives a uniform local land rate:
local_land_rate = (median_market_value × land_alloc) / median_lot_size
3. Paints every parcel in the cell with:
land_value = local_land_rate × parcel_lot_size
Key design decisions:
- `subarea_field` parameter (e.g. "neighborhood", "census_tract") partitions
the jurisdiction into geographic cells so that rates reflect local price
levels rather than a flat county-wide rate per land-use type.
- Rates are computed per (subarea, model_group) cell; cells below
`min_improved_per_cell` (default 10) fall back to the model-group rate,
then to the global rate.
- `land_alloc` can be a float, a per-group dict, or None (auto-derived from
the vacant/improved per-unit value ratio with the same fallback chain).
- Output columns: lycd_land_alloc, lycd_local_land_rate, lycd_land_value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Thank you for your contribution. I affirm that this contributor has signed the CLA Russell Richie seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
calc_lycd_land_values()toland.py, implementing the Least You Can Do (LYCD) method of land valuation described by Andelson/Tideman.How it works
For each geographic cell the method:
Because land value is driven by the typical parcel in an area rather than each parcel's own improvement value, the method avoids the absurd side-by-side disparities that arise from naively multiplying each parcel's market value by a fixed allocation fraction.
Key parameters
subarea_field(str | None) — column whose values define geographic subareas (e.g."neighborhood","census_tract"). When supplied, one rate is derived per(subarea, model_group)cell, capturing neighbourhood-to-neighbourhood price variation that a flat county-wide rate per land-use type would miss. WhenNone, one rate is derived permodel_group(the minimal viable case).min_improved_per_cell(int, default 10) — cells with fewer than this many improved parcels fall back to the model-group rate, then to the global rate.land_alloc(float | dict | None) — fixed fraction, per-group dict, orNoneto auto-derive from the vacant/improved per-unit value ratio (same cell → group → global fallback chain).Output columns added to
dflycd_land_alloclycd_local_land_ratelycd_land_value[0, market_value])Test plan
subarea_field=Noneon a small synthetic DataFrame and verifylycd_land_valueequalslocal_land_rate × land_areasubarea_field="neighborhood"and verify cells belowmin_improved_per_cellfall back to group rateland_alloc=Noneauto-derives from vacant/improved ratio and falls back gracefully when a group has no vacant parcels🤖 Generated with Claude Code