<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Real Estate - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Real Estate - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sat, 30 May 2026 16:32:22 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/real-estate/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How a Bubble Plot Reveals the Best Cities to Live in the US ]]>
                </title>
                <description>
                    <![CDATA[ By Zhen Liu In this article, I’ll show you some exciting facts about American cities, the value of bubble plots in deciding which city to live in, and how to create those plots. Are you thinking about investing in real estate in 2018? Moving to a new... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-a-bubble-plot-can-reveal-the-best-places-to-live-in-the-us-e2054c844062/</link>
                <guid isPermaLink="false">66c34ca10fa3812cdd5ea9dd</guid>
                
                    <category>
                        <![CDATA[ Life Hacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Data Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Real Estate ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 02 Apr 2018 11:03:26 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*HffpBV9kNhHCBT0D77zm3w.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Zhen Liu</p>
<p>In this article, I’ll show you some exciting facts about American cities, the value of bubble plots in deciding which city to live in, and how to create those plots.</p>
<p>Are you thinking about investing in real estate in 2018? Moving to a new city? When considering these decisions, you need to weigh in different factors like unemployment rate, housing price, the size of the city, safety and so on. Even with all that data and four corresponding bar charts, you’ll still be clueless staring at that table. You’ll try to find the best candidates, but those factors are telling different stories… Sounds like a complex problem.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*YJKL-SBnPHPO5Eb69w-eGQ.png" alt="Image" width="469" height="222" loading="lazy"></p>
<p>So, is there a way we can visualize all these factors in 1 chart and compare them ALL? Yes, we can use a bubble plot!</p>
<h4 id="heading-whats-a-bubble-plot"><em>What’s a bubble plot?</em></h4>
<p>A bubble plot is a type of chart that displays more than two dimensions of data (compared to traditional scatter plots). In addition to plotting a dot on an X-Y plane, it uses the size, color, or shape of the point to display more dimensions.</p>
<p>We use <strong>unemployment rate as the X-axis, median home price as the Y-axis</strong>, and the <strong>population of the cities as the size of the dots.</strong> This makes a good third dimension. Color is randomly assigned to each city.</p>
<h3 id="heading-the-best-city-in-the-us-to-live-in-iswait-for-it">The best city in the US to live in is…(wait for it)</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*wyVxxjaM_oQF0utG6__cog.png" alt="Image" width="800" height="455" loading="lazy"></p>
<p>Winner<em>:</em> <strong>Nashville!</strong></p>
<p>Other recommendations: <strong>Austin, Omaha, Milwaukee, Dallas, Minneapolis, Denver and Aurora.</strong></p>
<p>They have low unemployment (and therefore there’s higher chance of finding a job), and low home price, because they are on the lower left side of the plot. What does that mean?</p>
<p><strong>It means you can make your choices based on this plot.</strong></p>
<p>For example, if you consider unemployment rate to be more important and don’t mind the higher home prices, then Honolulu, Oakland, Boston, and San Diego are strong candidates</p>
<h3 id="heading-what-about-adding-safety-as-another-factor">What about adding safety as another factor?</h3>
<p>Sure. Let’s add safety as a fourth factor (the other three factors are still home price, unemployment rate, and population). Instead of randomly assigning a color for a city, we use the <strong>color scale for crime</strong> (crime rate per 100,000 people). <strong>Red</strong> means more crime and <strong>blue</strong> means less.</p>
<h4 id="heading-does-the-result-change">Does the result change?</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*hjgKmyxuTeXeNTyxE9shiA.png" alt="Image" width="800" height="510" loading="lazy"></p>
<p>It did! If safety is very important for you, then Milwaukee might not be such a great choice among the previous recommendations (even though it’s at the lower left side of the graph).</p>
<p><strong>Now you see the power of a bubble plot:</strong> the ability to demonstrate multiple factors in one 2-D plot. If you only have bar charts for those factors, it’s hard for you to identify the cities with an ideal combination of factors. The bubble plot basically created a “visual objective function” for you to optimize a multi-variable decision-making problem.</p>
<h3 id="heading-how-do-unemployment-rate-and-home-price-change-over-time"><strong>How do unemployment rate and home price change over time?</strong></h3>
<p>We can create an interactive motion chart to add time as a dimension (2013 to 2017) to see how the factors change for these cities over time.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*yYFcThB3pQ8wxPODrP4ZgQ.gif" alt="Image" width="600" height="506" loading="lazy"></p>
<p>To avoid too much visual information, I didn’t use crime data and used the different colors to represent a few selected cities.</p>
<p>The good news is that the unemployment rate for almost all cities decreased significantly (moving from right to left). But the bad news is that the housing prices are going up pretty fast (especially for San Francisco, San Jose, Los Angles, New York, and Seattle).</p>
<p>Want to create the charts yourself? Here is my code for the bubble plots and the motion chart in R. Have fun playing with the plots :)</p>
<pre><code>################ Bubble Plot ################library(data.table)library(ggplot2)library(ggrepel)
</code></pre><pre><code>bubble_data &lt;-fread(<span class="hljs-string">"https://raw.githubusercontent.com/zhendata/Medium_Posts/c007346db1575aca391a6623c87bb5a31a60b365/bubble_plot_merged_city_data.csv"</span>,sep=<span class="hljs-string">","</span>)
</code></pre><pre><code>bubble_plot &lt;- ggplot(bubble_data,                aes(x = Unemployment_Rate, y = Home_Price/<span class="hljs-number">1000</span>)) +
</code></pre><pre><code>geom_point(aes(size = Population, fill = Total_Crime),shape=<span class="hljs-number">21</span>) +# Create <span class="hljs-string">'Bubble'</span> by assigning size a variable #
</code></pre><pre><code>scale_fill_continuous(low = <span class="hljs-string">"#33FFFF"</span>, high =<span class="hljs-string">"#FF6699"</span> ) +scale_size_area(max_size = <span class="hljs-number">20</span>)+# Select bubble color scale and bubble maximum size #
</code></pre><pre><code>geom_text_repel(          aes(label = City),nudge_x = <span class="hljs-number">0</span>,nudge_y = <span class="hljs-number">0.75</span>,size = <span class="hljs-number">6</span>) +# Use geom_text_repel to repel the labels away <span class="hljs-keyword">from</span> each other #
</code></pre><pre><code>theme_bw()+# Use white background instead <span class="hljs-keyword">of</span> the <span class="hljs-keyword">default</span> grey one #
</code></pre><pre><code>ggtitle(<span class="hljs-string">"Best Cities in US to Live in"</span>) +labs(x = <span class="hljs-string">"Unemployment Rate%"</span>, y = <span class="hljs-string">"Home Price"</span>,       size = <span class="hljs-string">"Population"</span>,fill=<span class="hljs-string">"Crime"</span>) +theme(plot.title = element_text(size=<span class="hljs-number">25</span>, hjust = <span class="hljs-number">0.5</span>),        axis.title=element_text(size=<span class="hljs-number">20</span>, face = <span class="hljs-string">"bold"</span>),        axis.text=element_text(size=<span class="hljs-number">15</span>)) +# Style title and axis #
</code></pre><pre><code>scale_y_continuous(name=<span class="hljs-string">"Home Price"</span>, breaks = seq(<span class="hljs-number">0</span>, <span class="hljs-number">1500</span>, by=<span class="hljs-number">250</span>),                       labels=c(<span class="hljs-string">"0"</span>, <span class="hljs-string">"250K"</span>, <span class="hljs-string">"500K"</span>, <span class="hljs-string">"750K"</span>, <span class="hljs-string">"1000k"</span>,    <span class="hljs-string">"1250k"</span>, <span class="hljs-string">"1500K"</span>))# Make y-axis more readable by replacing scientific number by <span class="hljs-string">"K"</span> #
</code></pre><pre><code>print(bubble_plot)
</code></pre><pre><code>################# Motion Chart #################library(data.table)library(googleVis)
</code></pre><pre><code>motion_data &lt;-fread(<span class="hljs-string">"https://raw.githubusercontent.com/zhendata/Medium_Posts/c007346db1575aca391a6623c87bb5a31a60b365/motion_chart_merged_city_data.csv"</span>,sep=<span class="hljs-string">","</span>)
</code></pre><pre><code>motion_chart &lt;- gvisMotionChart(motion_data, idvar = <span class="hljs-string">"City"</span>, timevar = <span class="hljs-string">"Year"</span>,xvar = <span class="hljs-string">"Unemployment Rate"</span>,yvar= <span class="hljs-string">"Home Price"</span>,sizevar=<span class="hljs-string">"Population"</span>)
</code></pre><pre><code>plot(motion_chart)# R automatically opens a tab <span class="hljs-keyword">in</span> the browser <span class="hljs-keyword">for</span> you# The flash player needs to be enabled <span class="hljs-keyword">in</span> browser
</code></pre><p><img src="https://cdn-media-1.freecodecamp.org/images/1*J9UiAP39_gGy14vmn_Qtrw.png" alt="Image" width="441" height="306" loading="lazy">
<em>Click the “⌽” icon to enable Flash</em></p>
<pre><code>######### Data #########<span class="hljs-string">""</span><span class="hljs-string">"The datasets I used are from Zillow (medium housing), FBI’s UCR program, census.gov (population), Bureau of Labor (unemployment). I did some data cleaning and joining for the format I needed in this article, and you can click the links below to download."</span><span class="hljs-string">""</span>bubble_plot_merged_city_data.csv, motion_chart_merged_city_data.csv
</code></pre><p>Follow me and give me a few claps if you found this helpful!</p>
<p>You can also read my previous articles on data science, real estate, and decision making:</p>
<p><a target="_blank" href="https://medium.freecodecamp.org/how-to-analyze-seasonality-and-trends-to-save-money-on-your-apartment-lease-714d1d82771a"><strong>How to analyze seasonality and trends to save money on your apartment lease.</strong></a><br><a target="_blank" href="https://medium.freecodecamp.org/how-to-analyze-seasonality-and-trends-to-save-money-on-your-apartment-lease-714d1d82771a">_When I was looking for a new apartment to rent, I started to wonder: is there a data-driven decision making strategy…_medium.freecodecamp.org</a><a target="_blank" href="https://medium.freecodecamp.org/https-medium-freecodecamp-org-how-to-predict-rent-and-select-the-best-lease-duration-to-save-money-5cf35145d398"><strong>How to Use Data to Predict Rent and Optimize Your Lease Duration So You Can Save Money</strong></a><br><a target="_blank" href="https://medium.freecodecamp.org/https-medium-freecodecamp-org-how-to-predict-rent-and-select-the-best-lease-duration-to-save-money-5cf35145d398">_In my last post, we talked about how to pick the best month to sign the lease based on seasonality. Now, how long…_medium.freecodecamp.org</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Predict Rent and Optimize Your Lease Duration So You Can Save Money ]]>
                </title>
                <description>
                    <![CDATA[ By Zhen Liu In my last post, we talked about how to pick the best month to sign the lease based on seasonality. Now, how long should you sign the lease for when facing different options like 12-month, 15-month, 18-month or longer? Is there any strate... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/https-medium-freecodecamp-org-how-to-predict-rent-and-select-the-best-lease-duration-to-save-money-5cf35145d398/</link>
                <guid isPermaLink="false">66c3571de9895571912a0cb1</guid>
                
                    <category>
                        <![CDATA[ Data Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ data visualization ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Real Estate ]]>
                    </category>
                
                    <category>
                        <![CDATA[ startup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 11 Feb 2018 01:45:26 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*XkBmEX4MUwXSb8eo98TsXg.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Zhen Liu</p>
<p>In my <a target="_blank" href="https://medium.freecodecamp.org/how-to-analyze-seasonality-and-trends-to-save-money-on-your-apartment-lease-714d1d82771a">last post</a>, we talked about how to pick the best month to sign the lease based on seasonality. Now, how long should you sign the lease for when facing different options like 12-month, 15-month, 18-month or longer? Is there any strategy in selecting the best option to save money?</p>
<p>To analyze this, I modelled 353 cities’ rent data from <a target="_blank" href="https://www.zillow.com/research/data/#other-metrics">Zillow</a> (one-bedroom, city-level data). In this article, I will show you how to make time series predictions, and which cities are predicted to increase the most in rent!</p>
<h4 id="heading-first-how-does-lease-duration-help-you-save-money">First, how does lease duration help you save money?</h4>
<p>As shown below, you can save money by signing a longer lease if you predict the rent will increase in your city. If the monthly rent increases $100 in the next year, you’ll save $1,200 by signing a 2-year lease, then renew it year-by-year.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*7bY_4ic8FMaImPsaRZz8Sg.png" alt="Image" width="800" height="315" loading="lazy"></p>
<h4 id="heading-how-do-you-predict-if-rent-will-increase">How do you predict if rent will increase?</h4>
<p>We observed that rent is an additive time series with a combination of seasonality, trend and some random noise.</p>
<p>Additive model: Y(t) =Seasonality(t) + Trend(t) + Randomness(t)</p>
<p>We can decompose a time series into the right hand side of the equation above by applying R’s <code>stl()</code> function (stl stands for "seasonal and trend decomposition using locally weighted scatterplot smoothing”).</p>
<pre><code># Decompose the additive time seriesdecomposed_rent &lt;- stl(rent.series, s.window=<span class="hljs-string">"periodic"</span>) #periodic means the seasonality factor is same <span class="hljs-keyword">for</span> every year
</code></pre><pre><code># Extract the components <span class="hljs-keyword">from</span> time seriesseasonal   &lt;- decomposed_rent$time.series[,<span class="hljs-number">1</span>]trend       &lt;- decomposed_rent$time.series[,<span class="hljs-number">2</span>]random     &lt;- decomposed_rent$time.series[,<span class="hljs-number">3</span>]
</code></pre><p><img src="https://cdn-media-1.freecodecamp.org/images/1*pOSifCkvyN2LLvesF_A8sg.png" alt="Image" width="800" height="800" loading="lazy">
<em>The plot of the decomposed time series of rent verified that the components are additive, where rent = Seasonality + Trend + Randomness</em></p>
<p>You can simply apply the <code>st()</code> function in R on the time series format of rent data to predict rent in the next 2 years.</p>
<pre><code># Forecast rent <span class="hljs-keyword">for</span> the next <span class="hljs-number">24</span> months <span class="hljs-keyword">with</span> <span class="hljs-number">95</span>% Confidence Intervalfore_rent&lt;-stlf(rent.series, s.window=<span class="hljs-string">"period"</span>,h=<span class="hljs-number">24</span>, level = <span class="hljs-number">95</span>)
</code></pre><h4 id="heading-which-cities-have-the-predicted-increase-of-rent">Which cities have the predicted increase of rent?</h4>
<p><em><em>How to read the plots: The <strong>light green</strong> <strong>band</strong> area after 2018 is the 95% Confidence Interval of the rent prediction. The <em>*text in purple</em></em> tells you how much you can save if you sign a 2-year rent vs 1-year rent, according to the purple rectangular area outlined. I used</em> <code>ggplot2</code> <em>for all the plots.</em></p>
<h3 id="heading-1-bay-area">1. Bay Area</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*xx2OynsXjT9euYGLOzCNRQ.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p>Sunnyvale’s predicted monthly rent increase is the greatest among all 246 cities I analyzed, which is $165 (comparing 2018–01’s rent to the predicted rent in 2019–01). So signing a 2-year lease in 2018 Jan can save you 165<em>12= <strong>$ 1980</strong> on the second year; signing a 18-month lease can save 165</em>6 = <strong>$990</strong>. Given the seasonality effect in Sunnyvale, you should also try to avoid renewing the lease around July.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*ks6lXmPRK_jsaQk00T7DJg.png" alt="Image" width="800" height="600" loading="lazy"></p>
<h3 id="heading-2denver">2.Denver</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*gLXQKu8gp8aOfSApU5_mwA.png" alt="Image" width="800" height="600" loading="lazy"></p>
<h3 id="heading-3southern-california">3.Southern California</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*T7QFELfN2wQSe_ghzijkYg.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*m0gtYNI_qtSWXpZshROYJA.png" alt="Image" width="800" height="600" loading="lazy"></p>
<h3 id="heading-4-seattle-area">4. Seattle Area</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*pL4yYcZbfdXY3PiyrKdhdQ.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*2CgkcLhr-MrvsitBFP3DiQ.png" alt="Image" width="800" height="600" loading="lazy"></p>
<h3 id="heading-5-florida">5. Florida</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*wsEj6o6zivPOBleX_rbD4w.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*ZxAlZ9_lZQfQ88_Vma1qLw.png" alt="Image" width="800" height="600" loading="lazy"></p>
<h3 id="heading-6-texas">6. Texas</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*kzDwYdn4AjTvjFAd66USoQ.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p>For the 11 cities above, if a 2-year lease isn’t an option, 18-months can still save a lot compared to an yearly updated increasing rent.</p>
<p>Which other cities show a huge leap in rent? I plotted the 20 cities total (including the cities mentioned above) to show you a comparison of rent as well as the increase of rent among more cities.</p>
<p>The <strong><em>length of line segment</em></strong> of each city is the increase of the rent where the red dot is the rent in 2018–01 and the green is the predicted rent in 2019 -01.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*ZfRNJEjyDvOiPfxWatzEsw.png" alt="Image" width="800" height="480" loading="lazy"></p>
<p>From the plot above, Lakewood (Denver Metro in CO) and El Cajon (San Diego Metro in CA)’s rents are not that high among the 20 cities, but the “step” of increase is bigger compared to other cities with similar range of rent.</p>
<p>The cities with rent &gt;$2000 and significant predicted increase are all in CA (Top 4 of the plot). The rent there is already expensive, and they are getting more expensive, faster.</p>
<p>Among the top 20, there are 8 in CA, 6 in FL, 2 in WA, 2 in TX, 1 in NY and 1 in CO.</p>
<h4 id="heading-are-there-any-cities-that-dont-show-much-trend-in-rent">Are there any cities that don’t show much trend in rent?</h4>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*HPApNP5vlsnuecn8ldeukQ.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*mcw3q3DVsto1ZhDBLbW4tQ.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*v1rbNlgNjuLOPv1uJ6I6Bg.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p>For the cities above, there’s no predicted increase. So for cities with very significant seasonality effect like Boston and Wilmington, it doesn’t really matter <strong><em>how long</em></strong> you sign the lease; but <strong><em>which month</em></strong> you sign.</p>
<p>The month with the highest rent in Boston is November, while it’s April in Wilmington.</p>
<p>If you are curious about what are other cities like this, read more about cities with seasonality in my <a target="_blank" href="https://medium.freecodecamp.org/how-to-analyze-seasonality-and-trends-to-save-money-on-your-apartment-lease-714d1d82771a"><em>last post</em></a><em>!</em></p>
<p>_Find the R code for time series models and visualization with ggplot2 <a target="_blank" href="https://github.com/zhendata/Medium_Posts/blob/master/Rent%20Prediction_zhendata.R">here</a>._</p>
<p>Give me a few claps and follow me here if you find it helpful!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Analyze Rental Seasonality and Trend to Save Money on Your Lease ]]>
                </title>
                <description>
                    <![CDATA[ By Zhen Liu When I was looking for a new apartment to rent, I started to wonder: is there any seasonality impact? Is there a month when the rent is lowest so I can save money when I start my lease? To tackle this question, I used Zillow’s public data... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-analyze-seasonality-and-trends-to-save-money-on-your-apartment-lease-714d1d82771a/</link>
                <guid isPermaLink="false">66c34eeb4f7405e6476b020a</guid>
                
                    <category>
                        <![CDATA[ Data Science ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Real Estate ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 29 Nov 2017 10:04:37 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*ltPh1YrsG8dK9VnnM9-rzg.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Zhen Liu</p>
<p>When I was looking for a new apartment to rent, I started to wonder: is there any seasonality impact? Is there a month when the rent is lowest so I can save money when I start my lease?</p>
<p>To tackle this question, I used Zillow’s public data <a target="_blank" href="https://www.zillow.com/research/data/#other-metrics">here</a>. I analyzed their one-bedroom rental data from January, 2011 to September, 2017 for the top 100 US cities ranked by size.</p>
<p><strong>The short answer is YES</strong>. You can save from <strong>$1000 to $2000</strong> if you pick the right month to start renting in certain cities. By simply fitting a linear regression model using time and month to estimate rent, I found some interesting seasonality patterns for a few cities.</p>
<p><strong>Methodology:</strong></p>
<p>On the high level, <strong>rent = trend + seasonality</strong>. I fit a linear regression model for each city to breakdown trend and seasonality (using a cycle of 12 months).</p>
<p>Model: estimated rent(for a specific month)=t+t²+m1+m2+m3+…+m12</p>
<p>Variables: <strong>t</strong> and <strong>t²</strong> are continuous variables to estimate trend; t is the count of months from the beginning month in a city. I added t² to adjust for quadratic trend, and you’ll see some clear curves in the plot of Philadelphia below.</p>
<p><strong>m1</strong>, <strong>m2</strong>, … , <strong>m12</strong> are binary variables (0 or 1) that indicate to which month one data point (rent) belongs. Each rent data point can only be assigned one of the monthly variable (as 1). The rest will be 0.</p>
<p>After fitting the model above for all cities, I counted how many months’ coefficients were statistically significantly higher than the month estimated to have the lowest rent. I considered cities with a count ≥3 to have a potentially large seasonality effect.</p>
<p>Then I examined the the overall model fitting to filter out cities with a lot of noise, and came up with a final list of the six most representative cities.</p>
<p>Now I’m going to show you these cities so you can see the sweetest month for you to start renting. I plotted the simulated rent against the actual rent below. You can see the pure seasonal difference (adjusted by each city’s trend) for each month on the lower right corner. Here’s how to read the plots:</p>
<p><strong>Black line</strong>: actual rent data</p>
<p><strong>Green line</strong>: simulated rent by regression model given month and year</p>
<p><strong>Green bar plot on the right corner</strong>: pure seasonal effect estimated by model</p>
<p><strong>Grey line</strong>: estimated trend by regression model</p>
<p><strong>Seasonal gap</strong>: highest rent minus lowest rent (the difference estimated between the highest and lowest point from the regression model without trend effect)</p>
<p><strong>Numerical labels</strong>: represent the months estimated to have highest (red) and lowest (blue) rent</p>
<h4 id="heading-six-cities-with-significant-seasonality-effect">Six Cities with Significant Seasonality Effect</h4>
<p>You’ll definitely save money if you start renting on a “low” month in these cities.</p>
<ol>
<li><strong>Boston</strong></li>
</ol>
<p>If you start renting in June, you’ll save about <strong>$2484</strong> a year (207*12) compared to starting a lease in November. The grey line shows a slight trend in Boston, but it’s not very significant compared to the strong seasonal factor.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*O7j2jme7i-NfCwiCaqclOw.png" alt="Image" width="800" height="600" loading="lazy"></p>
<ol start="2">
<li><strong>Minneapolis</strong></li>
</ol>
<p>There is a slight upward trend, but the seasonality effect is more significant than the trend. Your yearly savings, if renting from December, can be as high as <strong>$1896</strong> (158*12). In reality, this number is likely to be slightly lower, because the upward trend tends to shrink the difference a bit.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*g-LTRX9KAENiS9i1VdJong.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><strong>3. Philadelphia</strong></p>
<p>After the regression model’s adjustment for the curve-shaped trend, the estimated yearly saving on rent is <strong>$1404</strong> (117*12). This number is greater during the period with a downward trend: you can see that the distance between January and May’s rent is stretched further prior to 2014. The estimated savings are smaller when the overall rent increased during recent years.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*nFFdZPnBAU-WfZBgX8zBCg.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><strong>4. Chicago</strong></p>
<p>The overall trend in Chicago is actually the opposite of Philadelphia’s — it went up and then down. But the seasonality effect is still significant after adjusting for trend. The estimated yearly saving is <strong>$1248</strong> (104*12). If the downward trend continues, the saving will be greater — the rent distance between November and April is stretched further as plotted in recent years.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*ODN13xjLVsENCt9WM0EJdQ.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><strong>5. Columbus</strong></p>
<p>There is a noticeable upward trend in Columbus’s rent, but the seasonality effect is also quite significant. The estimated yearly savings are smaller after adjusting the pure seasonal gap ($89) by the upward trend, so you’d save around <strong>$720</strong> (60*12). But you should still consider starting your lease in November and avoiding August.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*uJ7DZrhZbn5PgxIoU-LDVA.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><strong>6. Woodbridge</strong></p>
<p>If you start renting in December, you’ll save about <strong>$948</strong> (79*12) a year compared to renting from July. The trend isn’t very significant here, so it’s still seasonality that drives the rent price in Woodbridge.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*R08gdHIMwHRp8-AeYTZsrg.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p><strong>What about Seattle, the city where I live?</strong></p>
<p>The seasonality effect also exists in Seattle, and it shows significance in the regression model. However, the trend is so big that the seasonality almost doesn’t matter.</p>
<p>Even so, understanding the seasonality for cities like Seattle can be helpful. While you might not able to negotiate the rent down that much in a less busy season, you could ask that the application fee be waived or something like that.</p>
<p>My current apartment waived mine when I started my lease in January — December has the lowest rent, followed by January. But they might not offer this perk in the busiest months with higher rents, like May and June.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*g-Odn1rQgGeAIrfq8bgbIw.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p>Another city where the trend outweighs the seasonality is Omaha.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*5SWacHouHqUv5kro3ONA_A.png" alt="Image" width="800" height="600" loading="lazy"></p>
<p>Knowing your city’s seasonality in rent can help you save thousands if you know the pattern. I did my analysis and plots using R, but you can simply plot your city’s data in Excel if you just want to see if there are any noticeable trend and seasonality. Using open source data to hack your life decisions and save money is actually pretty simple.</p>
<h4 id="heading-now-how-long-should-you-sign-your-lease">Now, how long should you sign your lease?</h4>
<p>Say you are offered a few different options for the length of your lease. Usually it’s nine months to 18 months. Do you know what’s the best length to choose when you sign your lease? There is actually another trick to save money when you pick the duration, and I’ll show you the trick and the math behind it in my next post.</p>
<p>Give me a few claps and share this with friends who might find it useful!</p>
<p><strong>_You can find my code <a target="_blank" href="https://github.com/zhendata/Rent_Seasonality/blob/master/rent_seasonality_zhendata.R">here</a>_</strong>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
