<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/oakland-real-estate-full-eda/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://analystatlarge.com/oakland-real-estate-full-eda/"> R Analysis – Analyst at Large</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Living in the Bay Area has led me to think more and more about real estate (and how amazingly expensive it is here…)  I’ve signed up for trackers on Zillow and Redfin, but the data analyst in me always wants to dive deeper, to look back historically, to quantify, to visualize the trends, etc…  With that in mind, here is my first view at Oakland real estate prices over the past decade.  I’ll only be looking at multi-tenant units (duplexes, triplexes, etc.)</p>
<p>The first plot is simply looking at the number of sales each month:</p>
<p><img data-orig-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/04/OaklandSalesCount_20170420.jpeg?fit=1200%2C800" data-orig-size="1200,800" data-medium-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/04/OaklandSalesCount_20170420.jpeg?fit=300%2C200" data-attachment-id="93" data-image-meta="{" data-image-description="" src="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/04/OaklandSalesCount_20170420.jpeg?resize=640%2C426" data-permalink="http://analystatlarge.com/oakland-real-estate-prices-multi-tenant/oaklandsalescount_20170420/" data-large-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/04/OaklandSalesCount_20170420.jpeg?fit=640%2C427" alt="" data-image-title="OaklandSalesCount_20170420" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-93" data-recalc-dims="1"></p>
<p>You can clearly see a strong uptick in the number of units sold from 2003 to 2005 and the following steep decline in sales bottoming out during the financial crisis in 2008.  Interestingly, sales pick up again very quickly in 2009 and 2010 (a time when I expected to see low sales figures) before stabilizing at the current rate of ~30 properties sold per month.</p>
<p>The next plot shows the price distribution for multi-tenant buildings sold in Oakland:</p>
<p><img data-orig-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/04/OaklandSalePriceBoxplot_20170420-1.jpeg?fit=1200%2C800" data-orig-size="1200,800" data-medium-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/04/OaklandSalePriceBoxplot_20170420-1.jpeg?fit=300%2C200" data-attachment-id="95" data-image-meta="{" data-image-description="" src="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/04/OaklandSalePriceBoxplot_20170420-1.jpeg?resize=640%2C426" data-permalink="http://analystatlarge.com/oakland-real-estate-prices-multi-tenant/oaklandsalepriceboxplot_20170420-2/" data-large-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/04/OaklandSalePriceBoxplot_20170420-1.jpeg?fit=640%2C427" alt="" data-image-title="OaklandSalePriceBoxplot_20170420" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-95" data-recalc-dims="1"></p>
<p>Here we can see prices rising pretty steadily right up until 2008 when the financial crisis hit (peaking with median prices around $650K).  The prices are rising in 2006 and 2007 even while the number of sales is dropping rapidly.  After prices drop to ~$250K we can see that they stay low from 2009 – 2013 (even though sales picked up dramatically in 2009).  This suggests that a number of investors recognized the low prices and bought up a lot of the available properties.  Starting in 2013 prices begin rising and they have continued to present where we are looking at record high median prices of ~$750K.</p>
<p><span><strong>Does month of year matter?</strong></span></p>
<p>I’ve started doing some <a rel="nofollow" href="http://analystatlarge.com/oakland-real-estate-prices-multi-tenant/" target="_blank">basic analysis on Oakland real estate prices</a> over the past decade (multi-tenant buildings only).  There’s still a lot to unpack here, but I’m only able to investigate this 30 minutes at a time (new dad life), so I’m breaking the analysis into small, manageable pieces.  The first one I wanted to explore quickly is: does month of year matter?  I’ve often heard that summer is the busy season for buying a house because families with children try not to move during the school year.  Does this rule also apply to multi-tenant buildings as well (which tend to be purchased by investors)?</p>
<p><img data-orig-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandMonthSalesBoxplot_20170420.jpeg?fit=1200%2C800" data-orig-size="1200,800" data-medium-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandMonthSalesBoxplot_20170420.jpeg?fit=300%2C200" data-attachment-id="103" data-image-meta="{" data-image-description="" src="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandMonthSalesBoxplot_20170420.jpeg?resize=640%2C426" data-permalink="http://analystatlarge.com/oakland-real-estate-prices-does-month-of-year-matter/oaklandmonthsalesboxplot_20170420/" data-large-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandMonthSalesBoxplot_20170420.jpeg?fit=640%2C427" alt="" data-image-title="OaklandMonthSalesBoxplot_20170420" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-103" data-recalc-dims="1"></p>
<p>I’ve collected the sales over the past decade and group by month of year.  We can see that summer months (May, June, and July) do see more sales than other months.  Interestingly, December also tends to see a large number of sales.  Maybe people have more time over the holidays to check out investment properties?  Not sure what else could be driving this weird spike in sales in December – any ideas?</p>
<p>Given that the most sales occur in summer months, I wanted to see if this has any impact on sale price.</p>
<p><img data-orig-file="https://i2.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandMonthMedianPriceBoxplot_20170420.jpeg?fit=1200%2C800" data-orig-size="1200,800" data-medium-file="https://i2.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandMonthMedianPriceBoxplot_20170420.jpeg?fit=300%2C200" data-attachment-id="104" data-image-meta="{" data-image-description="" src="https://i2.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandMonthMedianPriceBoxplot_20170420.jpeg?resize=640%2C426" data-permalink="http://analystatlarge.com/oakland-real-estate-prices-does-month-of-year-matter/oaklandmonthmedianpriceboxplot_20170420/" data-large-file="https://i2.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandMonthMedianPriceBoxplot_20170420.jpeg?fit=640%2C427" alt="" data-image-title="OaklandMonthMedianPriceBoxplot_20170420" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-104" data-recalc-dims="1"></p>
<p>There doesn’t seem to be much of a relationship at all between month of year and sale price.  I had expected to see higher prices in the summer months under the assumption that demand is higher during that period, but maybe supply is also higher during that time (and they rise in roughly equal proportion).  This is something that I could theoretically test (since I have the list date as well as the sale date for each property), but I think there are more interesting topics to explore…  It’s enough for me to know that month of year doesn’t appear to be correlated with sale price!</p>
<p><span><strong>Are multi-tenant houses going above or below asking price?</strong></span></p>
<p>For many people one of the most difficult aspects of the house-buying process is deciding what to bid.  I decided to take a look at the relationship between list price and sale price.</p>
<p><img data-orig-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandSalesListDiffBoxplot_20170527.jpeg?fit=1200%2C800" data-orig-size="1200,800" data-medium-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandSalesListDiffBoxplot_20170527.jpeg?fit=300%2C200" data-attachment-id="116" data-image-meta="{" data-image-description="" src="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandSalesListDiffBoxplot_20170527.jpeg?resize=640%2C426" data-permalink="http://analystatlarge.com/oakland-real-estate-full-eda/oaklandsaleslistdiffboxplot_20170527/" data-large-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandSalesListDiffBoxplot_20170527.jpeg?fit=640%2C427" alt="" data-image-title="OaklandSalesListDiffBoxplot_20170527" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-116" data-recalc-dims="1"></p>
<p>Since 2000 the average difference between list and sale price has generally been less than $25K.  We can see that in 2004-2006 multi-tenant houses in Oakland were generally selling for an average of $15K – $25K above the asking price.  In financial crisis in 2008, we can see houses going for an average of $25K less than asking.  From 2010-2013, list price and sale price averaged close to $0K difference.  Starting in 2013 we start to see houses selling for more than asking with multi-tenant houses in Oakland now averaging $50K more than asking!  I know that housing prices have increased over time, so my next step was to look at these as percentage of asking price (attempting to control for inflation in housing values over the past two decades).</p>
<p><img data-orig-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandSalesListDiffPercBoxplot_20170527.jpeg?fit=1200%2C800" data-orig-size="1200,800" data-medium-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandSalesListDiffPercBoxplot_20170527.jpeg?fit=300%2C200" data-attachment-id="117" data-image-meta="{" data-image-description="" src="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandSalesListDiffPercBoxplot_20170527.jpeg?resize=640%2C426" data-permalink="http://analystatlarge.com/oakland-real-estate-full-eda/oaklandsaleslistdiffpercboxplot_20170527/" data-large-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandSalesListDiffPercBoxplot_20170527.jpeg?fit=640%2C427" alt="" data-image-title="OaklandSalesListDiffPercBoxplot_20170527" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-117" data-recalc-dims="1"></p>
<p>The shape of this plot matches the plot showing absolute dollar figures, but it is helpful to see percentages.  The most recent data shows that Oakland multi-tenant houses sell at an average of 7.5% premium over asking price.</p>
<p><span><strong>How are days on market and sales price vs. list price premium related?</strong></span></p>
<p>I’ve often heard that the longer a house is on the market, the lower the premium vs. asking price.  This seems as good a dataset as any to test this theory out!</p>
<p><img data-orig-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandDaysOnMarketBoxplot_20170527.jpeg?fit=1200%2C800" data-orig-size="1200,800" data-medium-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandDaysOnMarketBoxplot_20170527.jpeg?fit=300%2C200" data-attachment-id="118" data-image-meta="{" data-image-description="" src="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandDaysOnMarketBoxplot_20170527.jpeg?resize=640%2C426" data-permalink="http://analystatlarge.com/oakland-real-estate-full-eda/oaklanddaysonmarketboxplot_20170527/" data-large-file="https://i1.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandDaysOnMarketBoxplot_20170527.jpeg?fit=640%2C427" alt="" data-image-title="OaklandDaysOnMarketBoxplot_20170527" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-118" data-recalc-dims="1"></p>
<p>This first plot just shows the relationship between days on market (x-axis) and difference between sale price and list price (y-axis).  This plot isn’t particularly helpful, but it does show me a couple of things.  I see a handful of outliers (houses on the market for 1000+ days or selling $1M below asking price).  There also seems to be a fairly large cluster of houses selling significantly above asking price between 7-30 days after going on the market.  Next step was just to bucket these days on market:</p>
<p><img data-orig-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandDaysOnMarketBoxplotGroup_20170527.jpeg?fit=1200%2C800" data-orig-size="1200,800" data-medium-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandDaysOnMarketBoxplotGroup_20170527.jpeg?fit=300%2C200" data-attachment-id="119" data-image-meta="{" data-image-description="" src="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandDaysOnMarketBoxplotGroup_20170527.jpeg?resize=640%2C426" data-permalink="http://analystatlarge.com/oakland-real-estate-full-eda/oaklanddaysonmarketboxplotgroup_20170527/" data-large-file="https://i0.wp.com/analystatlarge.com/wp-content/uploads/2017/05/OaklandDaysOnMarketBoxplotGroup_20170527.jpeg?fit=640%2C427" alt="" data-image-title="OaklandDaysOnMarketBoxplotGroup_20170527" sizes="(max-width: 640px) 100vw, 640px" data-comments-opened="1" class="wp-image-119" data-recalc-dims="1"></p>
<p>We can see that there does appear to be an inverse relationship between days on market and sales price – list price premium.  Roughly 75% of houses sold in less than 30 days were sold above asking price (with median premiums of ~$10K). On the other hand, roughly 75% of houses on the market for 60+ days were sold below asking price (with median discounts of ~$10K).  Next steps here would be converting to percent of list price and then reviewing these trends over time, but that will have to wait for another day!</p>
<p>R code here:</p>
<p></p>
<p> </p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://analystatlarge.com/oakland-real-estate-full-eda/"> R Analysis – Analyst at Large</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/ZuvdVGxZRX4" height="1"></a></div>