Zillow Lab

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Amy Fullington

Dr. Bixler
Computer Science
Dr. Bixler
Zillow Lab

import matplotlib.pyplot as plt


import csv
import numpy as np

year = []
us = []
newYork = []
boston = []
phoenix = []
seattle = []
orlando = []
kansasCity = []
sanJose = []

with open('Metro_Zhvi_SingleFamilyResidence.csv', 'r') as csvfile:


plots = csv.reader(csvfile, delimiter = ',')
next(plots) #skip the first line
for row in plots:
year.append(float(row[1])) #Append values to x and y list to make coordinates
us.append(float(row[2]))
newYork.append(float(row[3]))
boston.append(float(row[4]))
phoenix.append(float(row[5]))
seattle.append(float(row[6]))
orlando.append(float(row[7]))
kansasCity.append(float(row[8]))
sanJose.append(float(row[9]))

plt.plot (year, us, label = 'United States')


plt.plot(year, newYork, label = 'New York')
plt.plot(year, boston, label = 'Boston')
plt.plot(year, phoenix, label = 'Phoenix')
plt.plot(year, seattle, label = 'Seattle')
plt.plot(year, orlando, label = 'Orlando')
plt.plot(year, kansasCity, label = 'Kansas City')
plt.plot(year, sanJose, label = 'San Jose')

lots_of_x = np.linspace(2000, 2018.833333, 1000)


p = np.poly1d(np.polyfit(year, sanJose, 2))
plt.plot(lots_of_x, p(lots_of_x), label = "San Jose Trendline")
plt.legend(loc = 2)

plt.xlabel('Year', fontsize=14, fontname='DejaVu Sans')


plt.ylabel('House Price', fontsize=14, fontname='DejaVu Sans')
plt.title('House Price vs. Year', fontsize=20, fontname='DejaVu Sans',
fontstyle='italic', fontweight='bold')
plt.show()

import matplotlib.pyplot as plt


import csv
import numpy as np

year = []
orlando = []

with open('Metro_Zhvi_SingleFamilyResidence.csv', 'r') as csvfile:


plots = csv.reader(csvfile, delimiter = ',')
next(plots) #skip the first line
for row in plots:
year.append(float(row[1])) #Append values to x and y list to make coordinates
orlando.append(float(row[7]))

plt.plot(year, orlando, label = 'Orlando')


lots_of_x = np.linspace(2000, 2018.833333, 1000)
p = np.poly1d(np.polyfit(year, orlando, 1))
plt.plot(lots_of_x, p(lots_of_x), label = "First Degree")
q = np.poly1d(np.polyfit(year, orlando, 2))
plt.plot(lots_of_x, q(lots_of_x), label = "Second Degree")
r = np.poly1d(np.polyfit(year, orlando, 3))
plt.plot(lots_of_x, r(lots_of_x), label = "Third Degree")
u = np.poly1d(np.polyfit(year, orlando, 4))
plt.plot(lots_of_x, u(lots_of_x), label = "Fourth Degree")

plt.legend(loc = 2)

plt.xlabel('Year', fontsize=14, fontname='DejaVu Sans')


plt.ylabel('House Price', fontsize=14, fontname='DejaVu Sans')
plt.title('Orlando Trendlines', fontsize=20, fontname='DejaVu Sans',
fontstyle='italic', fontweight='bold')
plt.show()

import matplotlib.pyplot as plt


import csv
import numpy as np

year = []
us = []
newYork = []
boston = []
phoenix = []
seattle = []
orlando = []
kansasCity = []
sanJose = []

with open('Metro_Zhvi_MiddleTier_yoy.csv', 'r') as csvfile:


plots = csv.reader(csvfile, delimiter = ',')
next(plots) #skip the first line
for row in plots:
year.append(float(row[1])) #Append values to x and y list to make coordinates
us.append(float(row[2]))
newYork.append(float(row[3]))
boston.append(float(row[4]))
phoenix.append(float(row[5]))
seattle.append(float(row[6]))
orlando.append(float(row[7]))
kansasCity.append(float(row[8]))
sanJose.append(float(row[9]))

plt.plot (year, us, label = 'United States')


plt.plot(year, newYork, label = 'New York')
plt.plot(year, boston, label = 'Boston')
plt.plot(year, phoenix, label = 'Phoenix')
plt.plot(year, seattle, label = 'Seattle')
plt.plot(year, orlando, label = 'Orlando')
plt.plot(year, kansasCity, label = 'Kansas City')
plt.plot(year, sanJose, label = 'San Jose')

lots_of_x = np.linspace(2000, 2018.833333, 1000)


p = np.poly1d(np.polyfit(year, sanJose, 2))
plt.plot(lots_of_x, p(lots_of_x), label = "San Jose Trendline")
plt.legend(loc = 4)

plt.xlabel('Year', fontsize=14, fontname='DejaVu Sans')


plt.ylabel('House Price', fontsize=14, fontname='DejaVu Sans')
plt.title('House Price Percent Change vs. Year', fontsize=20, fontname='DejaVu Sans',
fontstyle='italic', fontweight='bold')
plt.show()
import matplotlib.pyplot as plt
import csv
import numpy as np

year = []
orlando = []

with open('Metro_Zhvi_MiddleTier_yoy.csv', 'r') as csvfile:


plots = csv.reader(csvfile, delimiter = ',')
next(plots) #skip the first line
for row in plots:
year.append(float(row[1])) #Append values to x and y list to make coordinates
orlando.append(float(row[7]))

plt.plot(year, orlando, label = 'Orlando')


lots_of_x = np.linspace(2000, 2018.833333, 1000)
p = np.poly1d(np.polyfit(year, orlando, 1))
plt.plot(lots_of_x, p(lots_of_x), label = "First Degree")
q = np.poly1d(np.polyfit(year, orlando, 2))
plt.plot(lots_of_x, q(lots_of_x), label = "Second Degree")
r = np.poly1d(np.polyfit(year, orlando, 3))
plt.plot(lots_of_x, r(lots_of_x), label = "Third Degree")
u = np.poly1d(np.polyfit(year, orlando, 4))
plt.plot(lots_of_x, u(lots_of_x), label = "Fourth Degree")

plt.legend(loc = 2)

plt.xlabel('Year', fontsize=14, fontname='DejaVu Sans')


plt.ylabel('House Price', fontsize=14, fontname='DejaVu Sans')
plt.title('Orlando Percent Change Trendlines', fontsize=20, fontname='DejaVu Sans',
fontstyle='italic', fontweight='bold')
plt.show()

1. Did one metro area in particular outperform or underperform the others when just looking
at the starting and ending prices over this period?
The metro area that outperformed the others when observing the starting and ending prices was
San Jose, California. The prices started at $449,800 in January 2000 and were $1,335,600 in
December 2018. Kansas City, Missouri demonstrated the lowest average house prices, the price
being $113,900 in January 2000 and $189,200 in December 2018.

2. Was any particular metro area much more volatile or stable than the others?
One metro area that was much more volatile than the others was Phoenix, Arizona. The rate of
change went up 0.418331 between July 2005 and August 2005, the greatest changes occurring
between 2005 and 2007. The most stable metro area was Kansas City, Missouri, a rate of change
of only 0.019539 occurring between April 2005 and May 2005.

3. When was the peak of the housing bubble and when did it start to recover in most areas?
The peak of the housing bubble occurred around 2006, cities like San Jose, California experiencing
average housing prices of $790,800 and New York, New York experiencing prices of $459,100.
It began to recover in most areas around 2012 after the values rose and fell again around 2008-
2009.

4. Did any areas seem to completely miss out on the boom and bust of the housing bubble?
One area that seemed to miss out on the housing bubble was New York, New York. The area did
not experience much of an increase during the housing bubble but did experience the bust with all
the other areas. This is most likely due to the city being well established but also jobs being lost
on Wall Street when the bust occurred.

5. Do prices seem more stable in the last year or so than they were a decade earlier?
Price do seem more stable in the last year or so than they were a decade earlier, as seen by the rate
of change. During the housing bubble, areas such as Orlando, Florida experienced percent changes
such as 0.345513. During the bust, the same area displayed a decline of -0.24447. Most recently,
these dramatic shifts have stabilized to 0.097183.

6. What factors do you think contributed to the higher stability in some metro areas versus
another?
The factors that contributed to the higher stability in some metro areas versus others are based on
how established a city is and what opportunities it presents. Some cities, like Kansas City,
Missouri, were also not as affected by the crash of Wall Street due to its distance from the primary
place of impact. Also, some metro areas are highly populated and are prime locations for job
building, so housing around them will always be in high demand.

You might also like