Fair Market Rent Data Analyzer

Fork me on GitHub As part of my work in the CUNY Master of Science, Data Analytics program, I developed a small application to load and analyze Fair Market Rent (FMR) data from the U.S. Department of Housing and Urban Development (HUD). The application, simply named HudFmrDataAnalyzer, is written in Python, and is just chipping at the iceberg of how rents compare between localities in the United States, and also how they are changing in recent years. A light weight 1 year future forecast using linear regression is included as well.

I decided to share the project and source code via the MIT License on GitHub with the concept that others might find it useful whether through code examples, using the app as is, or enhancing it for further analysis of the FMR data.

The following map shows rents across the United States for 2015 per the HUD FMR data. You can see Key West hanging out at the tip of Florida (orange dot), and the San Fransisco area mid-way up California (also with orangeish dots).

United States Fair Market Rent 2015

The following chart shows how rents have changed over time for Union County, NJ for a 4 bedroom residence.

Fair Market Rent - Union County, NJ, 2005 - 2016

2016 and Beyond

As it turns out, HUD has modified their data format for the FMR data almost every year since 2005. As a result, HudFmrDataAnalyzer has some hardcoded mappings between columns and the data expected for the analysis functions. Depending on how the data format looks for 2016 and beyond, a new mapping dictionary might need to be created, or alternatively an existing mapping dictionary can be specified. To illustrate, the code below shows mapping dictionaries for years 2005 and 2006.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
def prepColumnMappings(self): 

         # 2005 
         mapping2005 = dict() 
         mapping2005["county"] = 8 
         mapping2005["state"] = 6 
         mapping2005["fmr0"] = 1 
         mapping2005["fmr1"] = 2 
         mapping2005["fmr2"] = 3 
         mapping2005["fmr3"] = 4 
         mapping2005["fmr4"] = 5 
         mapping2005["areaName"] = 10 
         mapping2005["countyName"] = 9 
         mapping2005["stateAlpha"] = 13 
         self.columnMapping[2005] = mapping2005 
 

         # 2006 
         mapping2006 = dict() 
         mapping2006["county"] = 7 
         mapping2006["state"] = 6 
         mapping2006["fmr0"] = 2 
         mapping2006["fmr1"] = 3 
         mapping2006["fmr2"] = 1 
         mapping2006["fmr3"] = 4 
         mapping2006["fmr4"] = 5 
         mapping2006["areaName"] = 11 
         mapping2006["countyName"] = 13 
         mapping2006["stateAlpha"] = 14 
         self.columnMapping[2006] = mapping2006 

Links:

Best,

Daniel (@dwdii)