Git Product home page Git Product logo

housing-affordability-index's Introduction

Housing Affordability Index Code

Production code to create housing affordability index data for California counties (and cities).

Index Basics

The index incorporates county/city income distribution, mortgage rates, and housing prices to determine what percentage of people in a particular place can afford to purchase a home based on their income and the maximum monthly mortgage that can be carried.

Price data comes from internally ETLed and calculated MLS transaction data but can be used from any publicly aggregated source.

The income distribution (and forecast) data is interpolated from the 5 year trend forecast, into yearly and quarterly data, but only gets updated once per year.

The Index is calculated for regular buyers and first-time buyers who face a slightly different calculation of mortgage rates. As housing price data is revised from quarter to quarter, the process reads in previous quarter and previous year data checks for revisions and applies revision tags.

Data is ingested through a variety of excel sheets based on ETL processes and commercial output formats, and requires some cross-walks to harmonize data names for calculation, then re-translated and reformatted again into naming formats for news releases.

The data is exported in clean csvs, outputted for dashboards with specific ingestion requirements and placed into templated xlsx files.

Automating Reporting for News Releases

For regions and counties, impacts and magnitudes of changes in affordability is automated and written out for each region and county along with some tricks to make the language natural for the changes.

Some news rooms have experimented with this type of automated event reporting, but it has seen the most use in sports (in particular fantasy sports) event recaps.

Automating numeric reporting reduces the tediousness of looking at basic point changes for many areas, while allowing some

Readme Todos

  • add links to examples
  • add pictures / screenshots to readme
  • add example to "glue" reporting trick which should have value for others

Code Improvements TBD

Incorporate some thesaursus packages to draw from a list of randomized key words for language reasons.

Re-write calculation in a callable function: given that it gets re-run several times. Requires some work with non-standard evaluation to properly pass some dplyr and global environment names into a function environment. Not super tricky but haven't had a chance to implement yet.

housing-affordability-index's People

Contributors

azadag avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.