export function addAffordabilityComparisonToNeighborhood(baseAffordabilityIndex, comparingNeighborhood) {
    if (baseAffordabilityIndex == null ||
        comparingNeighborhood.affordability_index == null) {
        return comparingNeighborhood;
    }
    let affordabilityComparison = "";
    if (Math.abs(1 - baseAffordabilityIndex / comparingNeighborhood.affordability_index) < 0.05) {
        affordabilityComparison = "neutral";
    }
    else if (baseAffordabilityIndex > comparingNeighborhood.affordability_index) {
        affordabilityComparison = "negative";
    }
    else {
        affordabilityComparison = "positive";
    }
    return Object.assign(Object.assign({}, comparingNeighborhood), { affordabilityComparison: affordabilityComparison });
}
//# sourceMappingURL=index.js.map