#!/usr/bin/env python
# coding: utf-8
#
#
What is the Going Trend in the Rental Market - Morgan Hill CA?
#
#
#
#
#
#
#
#
#
#
#
#
#
# Hello!
# I’m Mikaela Rojas!
#
#
# Thank you for choosing me as your South Bay Realtor! Let's take a
# a look at Morgan Hill CA Rental Prices for the year so far.
#
#
#
#
#
# In[1]:
import pandas as pd
import matplotlib.pyplot as plt # only needed for advanced plotting
plt.style.use('ggplot')
get_ipython().run_line_magic('matplotlib', 'inline')
# In[2]:
# grab Zillow data
# Morgan Hill,CA,San Jose,Santa Clara|01424
# RAH = Estimated Rent, All Homes in Region
df = pd.read_csv('http://www.quandl.com/api/v3/datasets/ZILL/C01424_RAH.csv')
df.head();
# In[3]:
# convert to date format
df['Date'] = pd.to_datetime(df['Date'])
# In[4]:
# rename columns
df.columns = ['Date','Rent']
# In[5]:
# set Date to be the index
df = df.set_index('Date')
# ## What was the Highest Estimated Rental Price?
#
# > It was August 2016!
# In[6]:
df[df['Rent'] == df.values.max()]
# ## Prices dropped as we reached the end of 2016, but they are starting to climb back up in 2017.
# In[7]:
mask = df.index >= pd.to_datetime('1/1/2016')
df[mask].sort_index().plot(figsize=(15,5));
#
#
#
# the information came from quandl and Zillow
#
# In[8]:
from IPython.display import HTML
HTML('''
''')