real estate26 Feb 2008 10:33 am

Blogger’s Note: In response to reader demand, I have decided to make this animation a regular feature. The next installment will coincide with the May 22 data release.

Homes in The West from Washington state to California to Texas continue to sell at prices well above the long-term inflation-adjusted trend. There is the smallest of hints that New Hampshire, New York, and Pennsylvania are beginning to cool. Ohio and Indiana appear to be holding ground as their neighbor Michigan continues to have woes.

To show the trends I’ve produced an inflation adjusted heat map reflecting today’s OFHEO data release. The methodologies are the same as the original heatmap.

Red means that homes in the state are selling for prices above the historical price trend and blue indicates that homes are selling for prices below the area’s long-term trend based on same-home sales data. The movie starts in 1975 and runs through December 2007.

For more on how I did it, please refer to my detailed original post. The tab-delimited data set I used to construct this animation is here.

real estate11 Feb 2008 12:02 am

As a way of whetting your appetite — with just fifteen days to go until the next OFHEO House Price Index data release — I thought it would be neat to compile an Overprice Index using the same data set I used to generate the popular U.S. house price heat map animation.

Based on gov’t historical local growth rate data for homes in each metropolitan statistical area (MSA) going back to 1975, this table ranks each surveyed city from most overvalued to most undervalued. Assuming that the inflation-adjusted same-house sale price growth rate trend (rightmost number) continues, this table lets you see at a glance how hot (or not) a particular metro area is and how much of a home price premium you’d typically pay (or discount you’d get) if you bought a home there today.

Rank City Home Price Premium (Discount) Historic Long Term Home Price Growth (Shrink) Rate Beyond Inflation
1. Midland, TX +67.1% -2.08%
2. Miami-Miami Beach-Kendall, FL +65.7% +1.86%
3. Bakersfield, CA +60.3% +0.13%
4. Fort Lauderdale-Pompano Beach-Deerfield Beach, FL +57.4% +1.16%
5. Riverside-San Bernardino-Ontario, CA +51.6% +1.53%
6. Phoenix-Mesa-Scottdale, AZ +51.4% +0.95%
7. Fresno, CA +51.2% +0.72%
8. Odessa, TX +50.6% -1.17%
9. Orlando-Kissimmee, FL +48.0% +1.02%
10. West Palm Beach-Boca Raton-Boynton Beach, FL +47.3% +1.19%
11. Tampa-St. Petersburg-Clearwater, FL +44.5% +1.15%
12. Visalia-Porterville, CA +43.5% +0.69%
13. Lakeland, FL +43.4% +0.96%
14. Virginia Beach-Norfolk-Newport News, VA-NC +43.3% +1.11%
15. Los Angeles-Long Beach-Glendale, CA +41.6% +2.62%
16. Deltona-Daytona Beach-Ormond Beach, FL +41.4% +1.45%
17. Las Vegas-Paradise, NV +41.2% +0.84%
18. Jacksonville, FL +38.9% +1.19%
19. Tucson, AZ +37.5% +1.10%
20. Palm Bay-Melbourne-Titusville, FL +37.3% +0.87%
21. Baltimore-Towson, MD +37.1% +1.67%
22. Washington-Arlington-Alexandria, DC-VA-MD-WV +36.6% +2.01%
23. Santa Ana-Anaheim-Irvine, CA +36.1% +2.47%
24. Port St. Lucie, FL +35.6% +1.49%
25. Kingston, NY +33.4% +1.11%
25. Richmond, VA +33.4% +0.74%
27. Boise City-Nampa, ID +33.3% +1.16%
27. New Orleans-Metairie-Kenner, LA +33.3% -0.12%
29. Wenatchee, WA +33.0% +1.67%
30. Bremerton-Silverdale, WA +32.6% +2.10%
31. Atlantic City, NJ +32.5% +2.00%
32. Redding, CA +32.3% +1.77%
33. Modesto, CA +31.7% +1.95%
34. El Paso, TX +31.6% -0.71%
35. Madera, CA +31.4% +2.86%
36. Spokane, WA +31.2% +1.06%
37. Salt Lake City, UT +31.1% +1.54%
37. Tacoma, WA +31.1% +2.12%
39. Sarasota-Bradenton-Venice, FL +31.0% +1.96%
40. Anchorage, AK +30.9% +0.05%
40. Baton Rouge, LA +30.9% -0.56%
42. Chico, CA +30.8% +1.83%
43. Merced, CA +30.5% +2.09%
43. Portland-Vancouver-Beaverton, OR-WA +30.5% +2.21%
45. Reno-Sparks, NV +30.4% +1.08%
46. Bethesda-Gaithersburg-Frederick, MD +30.3% +2.00%
46. Lake Havasu City-Kingman, AZ +30.3% +2.09%
46. San Antonio, TX +30.3% -1.03%
49. Vineland-Millville-Bridgeton, NJ +29.7% +1.28%
50. Cape Coral-Fort Myers, FL +29.5% +2.35%
51. Gainesville, FL +29.3% +2.09%
52. Charleston-North Charleston, SC +28.4% +1.93%
53. Lafayette, LA +27.9% -0.42%
53. Oklahoma City, OK +27.9% -1.18%
55. Houston-Sugar Land-Baytown, TX +27.8% -1.23%
56. Binghamton, NY +27.6% -1.14%
57. Eugene-Springfield, OR +27.4% +2.17%
58. Tallahassee, FL +27.3% +1.14%
59. Beaumont-Port Arthur, TX +27.1% -1.12%
60. Naples-Marco Island, FL +27.0% +4.22%
61. Hanford-Corcoran, CA +26.9% +2.20%
62. Albuquerque, NM +26.6% +0.50%
62. Corpus Christi, TX +26.6% -0.94%
62. Stockton, CA +26.6% +2.14%
65. Ocean City, NJ +26.3% +3.50%
65. Oxnard-Thousand Oaks-Ventura, CA +26.3% +2.64%
67. San Diego-Carlsbad-San Marcos, CA +25.6% +2.65%
67. Vallejo-Fairfield, CA +25.6% +2.51%
69. Seattle-Bellevue-Everett, WA +25.5% +2.86%
70. Dover, DE +25.3% +1.24%
70. Ithaca, NY +25.3% +0.11%
72. Charlottesville, VA +24.9% +2.32%
72. Salinas, CA +24.9% +3.51%
74. Norwich-New London, CT +24.7% +0.68%
75. Honolulu, HI +23.8% +2.44%
76. Flagstaff, AZ-UT +23.6% +3.59%
76. Sebastian-Vero Beach, FL +23.6% +2.16%
78. Yuma, AZ +23.5% +2.51%
79. Camden, NJ +23.4% +1.65%
79. Ocala, FL +23.4% +3.20%
81. Casper, WY +23.1% +3.36%
82. Harrisonburg, VA +23.0% +1.41%
82. Pittsfield, MA +23.0% +0.21%
84. Bellingham, WA +22.9% +2.73%
85. Longview, TX +22.5% -0.26%
86. Lewiston-Auburn, ME +22.3% +0.59%
87. Allentown-Bethlehem-Easton, PA-NJ +22.2% +1.16%
88. Utica-Rome, NY +22.0% -0.54%
89. Coeur d’Alene, ID +21.8% +2.86%
90. Austin-Round Rock, TX +21.7% +0.35%
91. Las Cruces, NM +21.5% +0.87%
91. Panama City-Lynn Haven, FL +21.5% +2.86%
91. San Angelo, TX +21.5% -0.08%
94. Philadelphia, PA +21.1% +1.73%
94. Sacramento-Arden-Arcade-Roseville, CA +21.1% +2.16%
96. El Centro, CA +20.9% +3.14%
96. Ogden-Clearfield, UT +20.9% +0.99%
98. Winchester, VA-WV +20.6% +2.74%
99. San Luis Obispo-Paso Robles, CA +20.5% +2.93%
100. Fort Walton Beach-Crestview-Destin, FL +20.3% +2.86%
101. Wilmington, NC +20.2% +2.58%
102. Hagerstown-Martinsburg, MD-WV +20.1% +2.45%
103. Oakland-Fremont-Hayward, CA +20.0% +3.19%
104. Napa, CA +19.9% +3.61%
105. Palm Coast, FL +19.7% +2.93%
106. Edison, NJ +19.6% +2.47%
106. Pensacola-Ferry Pass-Brent, FL +19.6% +1.52%
106. Savannah, GA +19.6% +2.03%
109. Prescott, AZ +19.5% +3.41%
110. Glens Falls, NY +19.3% +2.29%
110. Salisbury, MD +19.3% +3.00%
112. Tulsa, OK +19.1% -0.94%
113. Idaho Falls, ID +18.9% +0.90%
114. Bend, OR +18.8% +4.89%
114. Wilmington, DE-MD-NJ +18.8% +1.84%
116. York-Hanover, PA +18.7% +1.07%
117. Myrtle Beach-Conway-North Myrtle Beach, SC +18.6% +2.39%
117. Santa Barbara-Santa Maria-Goleta, CA +18.6% +2.99%
119. Olympia, WA +18.3% +2.90%
120. Cumberland, MD-WV +18.2% +2.35%
121. Burlington-South Burlington, VT +18.1% +1.62%
121. Salem, OR +18.1% +2.25%
123. Shreveport-Bossier City, LA +18.0% -0.10%
124. Lewiston, ID-WA +17.9% +2.25%
125. Poughkeepsie-Newburgh-Middletown, NY +17.8% +2.09%
125. Reading, PA +17.8% +0.75%
127. Punta Gorda, FL +17.6% +2.75%
128. Mobile, AL +17.4% +0.81%
129. Asheville, NC +17.0% +2.68%
129. Trenton-Ewing, NJ +17.0% +1.94%
131. Farmington, NM +16.9% +2.16%
132. Bangor, ME +16.8% +1.10%
133. Brunswick, GA +16.7% +2.66%
133. Minneapolis-St. Paul-Bloomington, MN-WI +16.7% +1.40%
135. Topeka, KS +16.5% -0.51%
136. Barnstable Town, MA +16.4% +2.62%
137. Lancaster, PA +16.3% +0.86%
138. St. George, UT +16.2% +3.15%
139. New Haven-Milford, CT +16.1% +1.44%
140. Chicago-Naperville-Joliet, IL +15.9% +1.61%
141. Albany-Schenectady-Troy, NY +15.8% +1.58%
141. Fort Worth-Arlington, TX +15.8% -1.05%
141. Manchester-Nashua, NH +15.8% +1.40%
141. Milwaukee-Waukesha-West Allis, WI +15.8% +1.06%
141. New York-White Plains-Wayne, NY-NJ +15.8% +3.20%
141. St. Louis, MO-IL +15.8% +0.52%
147. Augusta-Richmond County, GA-SC +15.7% +0.10%
147. College Station-Bryan, TX +15.7% -0.31%
149. Davenport-Moline-Rock Island, IA-IL +15.4% -0.08%
149. Grand Junction, CO +15.4% +3.81%
149. Newark-Union, NJ-PA +15.4% +2.60%
149. Rockingham County-Strafford County, NH +15.4% +1.68%
153. Little Rock-North Little Rock-Conway, AR +15.2% -0.19%
153. Portland-South Portland-Biddeford, ME +15.2% +1.93%
155. Amarillo, TX +14.9% -0.08%
155. Wichita, KS +14.9% -0.87%
157. Mount Vernon-Anacortes, WA +14.6% +3.52%
158. Killeen-Temple-Fort Hood, TX +14.4% -0.23%
158. Tyler, TX +14.4% -0.01%
160. Huntsville, AL +14.3% -0.22%
160. Santa Cruz-Watsonville, CA +14.3% +3.76%
162. Carson City, NV +14.1% +3.11%
162. Houma-Bayou Cane-Thibodaux, LA +14.1% +1.81%
164. Lebanon, PA +14.0% +0.95%
165. Harrisburg-Carlisle, PA +13.8% +0.73%
165. San Francisco-San Mateo-Redwood City, CA +13.8% +3.73%
165. San Jose-Sunnyvale-Santa Clara, CA +13.8% +3.79%
168. Yuba City, CA +13.7% +3.04%
169. Lynchburg, VA +13.6% +1.35%
170. Abilene, TX +13.4% +0.16%
170. Kansas City, MO-KS +13.4% +0.08%
172. Columbus, GA-AL +13.3% +0.87%
173. Dallas-Plano-Irving, TX +13.1% -0.76%
173. Fairbanks, AK +13.1% +1.31%
173. Rockford, IL +13.1% +0.02%
176. Bismarck, ND +13.0% +1.43%
176. Jacksonville, NC +13.0% +2.85%
178. Hartford-West Hartford-East Hartford, CT +12.9% +0.94%
179. Bridgeport-Stamford-Norwalk, CT +12.8% +2.09%
179. Santa Rosa-Petaluma, CA +12.8% +3.24%
181. Jackson, MS +12.7% -0.11%
182. Nassau-Suffolk, NY +12.5% +3.69%
183. Fayetteville-Springdale-Rogers, AR-MO +12.4% +1.10%
183. Roanoke, VA +12.4% +1.52%
185. Madison, WI +12.3% +1.44%
186. Knoxville, TN +12.1% +1.12%
186. Providence-New Bedford-Fall River, RI-MA +12.1% +2.70%
188. Billings, MT +11.8% +2.15%
188. Lake Charles, LA +11.8% +1.09%
190. Nashville-Davidson–Murfreesboro–Franklin, TN +11.7% +1.14%
191. Gulfport-Biloxi, MS +11.6% +2.73%
192. Alexandria, LA +11.4% +1.07%
192. Des Moines-West Des Moines, IA +11.4% +0.29%
192. Lubbock, TX +11.4% -0.60%
195. Columbia, SC +11.0% +0.51%
195. Montgomery, AL +11.0% -0.03%
197. Birmingham-Hoover, AL +10.9% +0.71%
198. Dothan, AL +10.5% +1.04%
198. State College, PA +10.5% +1.41%
200. Longview, WA +10.4% +2.73%
200. Provo-Orem, UT +10.4% +2.93%
200. Santa Fe, NM +10.4% +3.00%
203. Lexington-Fayette, KY +10.2% +0.36%
203. Pascagoula, MS +10.2% +2.49%
205. Pittsburgh, PA +10.1% +0.33%
205. Springfield, MA +10.1% +1.90%
205. Syracuse, NY +10.1% +0.02%
208. Lawton, OK +9.92% +0.76%
209. Blacksburg-Christiansburg-Radford, VA +9.90% +2.00%
210. Medford, OR +9.75% +4.59%
211. Auburn-Opelika, AL +9.63% +1.67%
212. Peoria, IL +9.47% +0.64%
213. Chattanooga, TN-GA +9.24% +1.16%
214. Waco, TX +9.19% +0.22%
215. Sumter, SC +9.13% +1.49%
216. Champaign-Urbana, IL +8.78% +0.77%
217. Charlotte-Gastonia-Concord, NC-SC +8.67% +0.94%
218. Elmira, NY +8.64% +0.20%
219. Wichita Falls, TX +8.59% +0.44%
220. Albany, GA +8.22% +0.32%
221. Colorado Springs, CO +8.11% +1.25%
222. Fayetteville, NC +8.01% +0.31%
223. Kingsport-Bristol-Bristol, TN-VA +7.97% +1.34%
224. Great Falls, MT +7.96% +1.95%
224. Pocatello, ID +7.96% +1.82%
226. Cheyenne, WY +7.61% +1.91%
227. Atlanta-Sandy Springs-Marietta, GA +7.55% +0.78%
228. Morgantown, WV +7.38% +2.50%
229. Fargo, ND-MN +7.35% +1.06%
229. McAllen-Edinburg-Mission, TX +7.35% +0.01%
231. Monroe, LA +7.32% +0.85%
232. Springfield, MO +7.30% +0.52%
233. Decatur, AL +7.06% +0.17%
234. Texarkana, TX-Texarkana, AR +6.93% +0.95%
235. Fort Smith, AR-OK +6.90% +0.52%
236. Williamsport, PA +6.85% +0.85%
237. Raleigh-Cary, NC +6.82% +0.80%
238. Scranton-Wilkes-Barre, PA +6.71% +1.63%
239. Grand Forks, ND-MN +6.70% +1.77%
240. Pine Bluff, AR +6.68% +1.06%
241. Valdosta, GA +6.59% +1.78%
242. Gary, IN +6.52% +0.70%
243. Danville, VA +6.51% +1.25%
244. Macon, GA +6.49% +0.28%
245. Durham, NC +6.29% +1.14%
246. Corvallis, OR +5.92% +3.69%
247. Hot Springs, AR +5.80% +2.15%
248. Missoula, MT +5.68% +4.37%
249. Lake County-Kenosha County, IL-WI +5.65% +1.68%
250. Hattiesburg, MS +5.58% +2.08%
251. Laredo, TX +5.56% +0.82%
252. Columbia, MO +5.47% +0.89%
253. Denver-Aurora, CO +5.44% +1.45%
254. Omaha-Council Bluffs, NE-IA +5.41% +0.42%
255. Victoria, TX +5.33% +0.58%
256. Johnstown, PA +5.27% +1.92%
257. Memphis, TN-MS-AR +5.21% +0.19%
258. Greenville-Mouldin-Easley, SC +4.94% +0.79%
259. Morristown, TN +4.92% +2.20%
260. Athens-Clarke County, GA +4.90% +1.51%
261. Louisville-Jefferson County, KY-IN +4.87% +0.97%
262. Brownsville-Harlingen, TX +4.69% +0.76%
263. Racine, WI +4.65% +1.95%
264. Evansville, IN-KY +4.43% +0.34%
265. Warner Robins, GA +4.42% +0.22%
266. Anniston-Oxford, AL +4.34% +1.59%
267. Dalton, GA +4.23% +1.15%
268. Pueblo, CO +4.20% +1.00%
269. Kennewick-Richland-Pasco, WA +4.12% +0.59%
270. Huntington-Ashland, WV-KY-OH +4.10% +1.35%
271. Greenville, NC +4.09% +0.38%
272. Sherman-Denison, TX +4.07% +0.19%
273. Cincinnati-Middletown, OH-KY-IN +4.03% +0.44%
274. Florence-Muscle Shoals, AL +3.96% +0.38%
275. Kankakee-Bradley, IL +3.94% +1.67%
275. La Crosse, WI-MN +3.94% +1.94%
277. Altoona, PA +3.58% +2.02%
278. Johnson City, TN +3.46% +1.93%
279. Clarksville, TN-KY +3.45% +1.52%
280. Danville, IL +3.21% +1.24%
281. Worcester, MA +3.14% +2.49%
282. Jefferson City, MO +3.03% +1.08%
283. Winston-Salem, NC +2.93% +0.48%
284. Duluth, MN-WI +2.85% +3.65%
285. Florence, SC +2.75% +1.11%
285. Hickory-Lenoir-Morganton, NC +2.75% +1.39%
287. Gainesville, GA +2.68% +1.81%
288. Rochester, MN +2.49% +1.37%
289. Yakima, WA +2.48% +2.29%
290. Lincoln, NE +2.27% +0.64%
291. Elizabethtown, KY +2.15% +1.97%
292. Charleston, WV +2.07% +0.70%
292. Fort Wayne, IN +2.07% -0.46%
294. Fort Collins-Loveland, CO +1.90% +1.78%
295. Wheeling, WV-OH +1.86% +1.69%
296. Boulder, CO +1.70% +2.47%
297. Eau Claire, WI +1.63% +2.30%
298. Kalamazoo-Portage, MI +1.54% +0.98%
299. Buffalo-Niagara Falls, NY +1.47% +0.58%
300. Tuscaloosa, AL +1.43% +1.81%
301. Hinesville-Fort Stewart, GA +0.88% +5.29%
302. Rochester, NY +0.82% -0.14%
303. Springfield, IL +0.55% +0.14%
304. Toledo, OH +0.41% +0.41%
305. Decatur, IL +0.38% +0.69%
305. Oshkosh-Neenah, WI +0.38% +1.42%
307. Cedar Rapids, IA +0.33% +0.69%
308. Columbus, OH +0.16% +0.69%
309. Sheboygan, WI +0.15% +2.16%
310. Rocky Mount, NC +0.08% +0.15%
311. Greensboro-High Point, NC +0.05% +0.55%
312. St. Cloud, MN +0.04% +2.89%
313. Elkhart-Goshen, IN -0.02% +0.84%
314. Lansing-East Lansing, MI -0.21% +0.93%
315. Bloomington-Normal, IL -0.33% +0.88%
316. Janesville, WI -0.34% +2.11%
317. Joplin, MO -0.45% +1.05%
318. Sioux Falls, SD -0.47% +1.67%
319. Cleveland, TN -0.51% +2.33%
320. Lawrence, KS -0.59% +2.22%
321. Indianapolis-Carmel, IN -0.61% +0.40%
322. St. Joseph, MO-KS -0.68% +1.98%
323. Wausau, WI -0.82% +1.98%
324. Appleton, WI -0.89% +1.27%
324. Peabody, MA -0.89% +3.01%
326. Waterloo-Cedar Falls, IA -0.93% +2.54%
327. Erie, PA -0.96% +1.11%
328. Anderson, SC -1.00% +1.50%
328. Boston-Quincy, MA -1.00% +3.46%
330. Bloomington, IN -1.04% +1.41%
331. Gadsden, AL -1.08% +2.10%
332. Fond du Lac, WI -1.30% +2.15%
333. Dubuque, IA -1.36% +1.86%
334. Jackson, TN -1.46% +0.58%
335. Terre Haute, IN -1.61% +0.80%
336. Logan, UT-ID -1.75% +2.66%
337. Lima, OH -1.83% +0.93%
338. Bowling Green, KY -1.87% +1.21%
339. Cleveland-Elyria-Mentor, OH -1.88% +0.48%
339. South Bend-Mishawaka, IN-MI -1.88% +1.03%
341. Rome, GA -1.90% +1.78%
342. Goldsboro, NC -1.96% +0.99%
343. Niles-Benton Harbor, MI -2.06% +2.61%
344. Spartanburg, SC -2.19% +0.98%
345. Rapid City, SD -2.27% +3.28%
346. Canton-Massillon, OH -2.35% +0.59%
347. Dayton, OH -2.95% +0.40%
348. Akron, OH -3.03% +0.75%
349. Weirton-Steubenville, WV-OH -3.42% +2.04%
350. Owensboro, KY -3.60% +0.75%
351. Cambridge-Newton-Framingham, MA -3.69% +3.26%
352. Iowa City, IA -3.86% +1.49%
353. Parkersburg-Marietta-Vienna, WV-OH -3.91% +1.38%
354. Michigan City-La Porte, IN -4.05% +2.21%
355. Green Bay, WI -4.67% +1.86%
356. Burlington, NC -5.54% +0.76%
357. Ames, IA -5.69% +1.82%
358. Sioux City, IA-NE-SD -6.17% +1.46%
359. Columbus, IN -6.31% +1.30%
360. Youngstown-Warren-Boardman, OH-PA -6.46% +1.27%
361. Jonesboro, AR -6.49% +0.73%
362. Grand Rapids-Wyoming, MI -6.96% +1.42%
363. Flint, MI -7.32% +1.07%
364. Springfield, OH -8.03% +1.38%
365. Holland-Grand Haven, MI -8.42% +1.78%
366. Muncie, IN -8.47% +1.07%
367. Saginaw-Saginaw Township North, MI -9.13% +1.29%
368. Warren-Troy-Farmington Hills, MI -9.24% +1.58%
369. Detroit-Livonia-Dearborn, MI -9.92% +1.70%
370. Lafayette, IN -9.93% +0.76%
371. Battle Creek, MI -10.1% +2.37%
372. Ann Arbor, MI -10.5% +1.78%
373. Kokomo, IN -10.6% +1.17%
374. Sandusky, OH -10.8% +1.84%
375. Muskegon-North Shores, MI -11.3% +2.05%
376. Mansfield, OH -11.7% +1.57%
377. Greeley, CO -11.8% +2.60%
378. Bay City, MI -14.0% +2.86%
379. Jackson, MI -15.3% +3.05%
380. Monroe, MI -15.5% +2.53%
381. Anderson, IN -15.6% +1.64%
real estate17 Dec 2007 07:16 am

Inflation adjusted analysis of mainland U.S. same home sales shows a cooling across Michigan and Massachusetts. For your enjoyment I have generated an animated heat map indicating the states that are burning above (red) and below (blue) the historical price trend for that area. The chart runs from 1975 through September 2007.

For every region I have done a regression analysis to determine the long-term historical growth rate. When local prices are way above sustainable long-term averages for that metropolitan area they contribute to a state being colored bright red. When home prices have fallen to be far below what they should be, they contribute to their state being colored deep blue.

Here’s how I did it. I built a mathematical model around the notion that a home price is dependent on volatility within a larger framework of inflation and regional factors such as population and income. To simplify the model I decided to reduce the regional factors into a single growth rate and set out to calculate the long term growth rate for every region.

Of course I needed data. I really liked that the U.S government’s Office of Federal Housing Enterprise Oversight (OFHEO) calculates a quarterly index based on same home sales. In order to calculate their trends they rely entirely on those homes that have sold two or more times. If there are two houses on the same street and one sold in 1980 for $100,000 and again in 1985 for the same price ($100,000) but a nearby house sold for $100,000 in 1980 and sold for $105,000 in 1986 then it can be inferred for that area that home prices did not change between 1980 and 1985 but increased 5% between 1985 and 1986. Clearly having access to lots of data helps establish trends, and that’s exactly what the OFHEO does.

Next I needed to remove inflation from the picture. To do that I chose to use the CPI data published by the Federal Reserve Bank of St. Louis to adjust prices into real dollars.

Then I logged the data and ran a least squared linear regression using the perl Regression.pm package off of CPAN using a constant weight for every data point. For each data point I then calculated the ratio of the prices relative to the trend line.

This was great. I had a massive spreadsheet and could look at any raw number I wanted. After a while of that I decided, “Hey, wouldn’t it be great to plot these trends?” Which I did. But it turned out that viewing a tangle of hundreds of metropolitan areas amounted to viewing a spaghetti of multicolored wiggles. Nonetheless I plowed ahead and graphed the discrete first derivative of every metropolitan area and noticed an unexpected smoothness in the data. So I analyzed the discrete second derivative and said to myself, “Wow, the time-variant trends are so predictable that this would make a great macroeconomic animation!!!”

But before I could make an animation I had to create even a single frame. I looked for charting software and found this amazingly helpful tutorial with sample code from IBM (Thank you IBM!!) that relies on the Cooperative Association for Internet Data Analysis (CAIDA) plot-latlong software (Thank you UCSD and NSF!!) to plot data onto maps.

I then annotated and animated the frames using ImageMagick convert. At this point I had an animated GIF, but I really wanted to let user move forward and back through the frames. So I converted the animation from GIF to FLA format using FFmpeg because that’s how all the cool cats like YouTube do it.

It was then I realized that I needed a bit more glue to make it all work. I researched for a couple hours and in the end decided to use the same javascript code as YouTube: Geoff Stearns’ SWFObject to play embedded shockwave files. To finish off what had started as a little project, I installed Jeroen Wijering’s FLV Media Player to provide the tidy controls and way cool full screen functionality.

All in all it was a nice “all nighter” project. I hope you find the animation educational and perhaps also a few coders out there can learn from some of the inside tricks on how I did it.