# What Percentage of Sales were Foreclosures in Morgan Hill CA?

## I’m Mikaela Rojas!

Thank you for choosing me as your South Bay Realtor! Let's take a
a look at Morgan Hill CA Foreclosure rates.
In [1]:
import pandas as pd
import matplotlib.pyplot as plt # only needed for advanced plotting
import matplotlib.dates as dates
plt.style.use('ggplot')
%matplotlib inline

In [8]:
# grab Zillow data
# Morgan Hill,CA,San Jose,Santa Clara|01424
# FR = Percentage of Sales that were Foreclosures

In [3]:
# convert to date format
df['Date'] = pd.to_datetime(df['Date'])

In [4]:
# rename columns
df.columns = ['Date','Foreclosure_pct']

In [5]:
# set Date to be the index
df = df.set_index('Date')


## Foreclosures for 2015 and 2016 seem to be total opposites. What kind of trend will we have for 2017?¶

In [6]:
# Advanced Plotting
####################
fig, axes = plt.subplots(nrows=1, ncols=1, figsize=(13, 5))
fig.subplots_adjust(hspace=1.0) ## Create space between plots

# Chart 1

# Chart 2

axes.set_title('Forclosure Percentages: 2015 vs 2016')
axes.set_ylabel('Forclosure Percentages')
axes.legend(["2015","2016"], loc='best');


# Morgan Hill CA Realtor:ROJAS REALTY

the information came from quandl and Zillow

In [7]:
from IPython.display import HTML

HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide(); } else {$('div.input').show();
}
code_show = !code_show
}