Skip to content

Main content

Housing Unit Mix Share Tool

Calculate mutually exclusive housing-unit category shares from nonnegative counts and a positive total.

Loading tool…

Description

Validate nonnegative integer unitCounts and a positive integer total.

Urban indicators compare counts or areas within a defined study boundary. Changing the denominator, the counted units, or whether a share is expressed as a fraction changes the meaning even when the arithmetic is correct.

Validate nonnegative integer unitCounts and a positive integer total.

When to use this tool

Use Housing Unit Mix Share when you need a reproducible density or share using an explicitly chosen study boundary and denominator.

How to use the tool and how it works

  1. Enter unitCounts. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read shares, totalUnits. Use the output convention below.

Validate nonnegative integer unitCounts and a positive integer total. Divide each count by totalUnits for shares.1

Input fieldMeaning and unitsAccepted input
unitCountsUnit CountsRequired. Array of safe integer; maximum items 256.
Output fieldInterpretationReturned shape
sharesSharesRequired. Array of finite number; maximum items 256.
totalUnitsTotal UnitsRequired. Safe integer.
json
{
  "input": {
    "unitCounts": [
      20,
      30,
      50
    ]
  },
  "output": {
    "shares": [
      0.2,
      0.3,
      0.5
    ],
    "totalUnits": 100
  }
}

Limitations and assumptions

  • The counts must already use compatible categories; no deduplication, occupancy, or housing policy standard is inferred.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Document the data definitions and compare several planning indicators rather than treating one ratio as a design verdict.

References

  1. Calculation and input contract: urban-planning/housing-unit-mix-share — tool.io

Similar or alternative tools