<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/oil-leakage-those-old-bmws-are-bad/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://longhowlam.wordpress.com/2017/08/18/oil-leakage-those-old-bmws-are-bad/"> R – Longhow Lam's Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><img data-orig-file="https://longhowlam.files.wordpress.com/2017/08/lekkage.jpg?w=456" data-orig-size="1024,616" data-medium-file="https://longhowlam.files.wordpress.com/2017/08/lekkage.jpg?w=456?w=300" data-attachment-id="2250" data-image-meta="{" data-image-description="" src="https://longhowlam.files.wordpress.com/2017/08/lekkage.jpg?w=456" data-permalink="https://longhowlam.wordpress.com/2017/08/18/oil-leakage-those-old-bmws-are-bad/lekkage/" data-large-file="https://longhowlam.files.wordpress.com/2017/08/lekkage.jpg?w=456?w=440" alt="lekkage" data-image-title="lekkage" sizes="(max-width: 440px) 100vw, 440px" data-comments-opened="1" class="wp-image-2250" data-recalc-dims="1"></p>
<h2>Introduction</h2>
<p>My first car was a 13 year Mitsubishi Colt, I paid 3000 Dutch Guilders for it. I can still remember a friend that would not like me to park this car in front of his house because of possible oil leakage.</p>
<p><img data-orig-file="https://longhowlam.files.wordpress.com/2017/08/mitsubishi_colt_turbo_red_1984.jpg?w=406&amp;h=187&amp;fit=406%2C187&amp;resize=406%2C187" data-orig-size="576,265" data-medium-file="https://longhowlam.files.wordpress.com/2017/08/mitsubishi_colt_turbo_red_1984.jpg?w=406&amp;h=187&amp;fit=406%2C187&amp;resize=406%2C187?w=300" data-attachment-id="2259" data-image-meta="{" data-image-description="" src="https://longhowlam.files.wordpress.com/2017/08/mitsubishi_colt_turbo_red_1984.jpg?w=406&h=187&fit=406%2C187&resize=406%2C187" data-permalink="https://longhowlam.wordpress.com/2017/08/18/oil-leakage-those-old-bmws-are-bad/mitsubishi_colt_turbo_red_1984/" data-large-file="https://longhowlam.files.wordpress.com/2017/08/mitsubishi_colt_turbo_red_1984.jpg?w=406&amp;h=187&amp;fit=406%2C187&amp;resize=406%2C187?w=440" alt="mitsubishi_colt_turbo_red_1984" data-image-title="mitsubishi_colt_turbo_red_1984" sizes="(max-width: 406px) 100vw, 406px" data-comments-opened="1" class="wp-image-2259" data-recalc-dims="1"></p>
<p>Can you get an idea of which cars will likely to leak oil? Well, with <strong>open car data</strong> from the Dutch RDW you can. <a rel="nofollow" href="https://www.rdw.nl/englishinformation/Paginas/About-RDW.aspx?path=Portal/Information%20in%20English/About%20RDW" target="_blank">RDW</a> is the Netherlands Vehicle Authority in the mobility chain.</p>
<h2>RDW Data</h2>
<p>There are many data sets that you can <a rel="nofollow" href="https://opendata.rdw.nl/browse" target="_blank">download</a>. I have used the following:</p>
<ul>
<li><a rel="nofollow" href="https://opendata.rdw.nl/Keuringen/Open-Data-RDW-Geconstateerde-Gebreken/a34c-vvps" target="_blank">Observed Defects</a>. This set contains 22 mln. records on observed defects at car level (license plate number). Cars in The Netherlands have to be checked yearly, and the findings of each check are submitted to RDW.</li>
<li><a rel="nofollow" href="https://opendata.rdw.nl/Voertuigen/Personenauto-basisdata/qyrd-w56j" target="_blank">Basic car details</a>. This set contains 9 mln. records, they are all the cars in the Netherlands, license plate number, brand, make, weight and type of car.</li>
<li><a rel="nofollow" href="https://opendata.rdw.nl/Keuringen/Open-Data-RDW-Gebreken/hx2c-gt7k" target="_blank">Defects code</a>. This little table provides a description of all the possible defect codes. So I know that code ‘RA02’ in the observed defects data set represents ‘oil leakage’.</li>
</ul>
<h2>Simple Analysis in R</h2>
<p>I have imported the data in R and with some simple dplyr statements I have determined per car make and age (in years) the number of cars with an observed oil leakage defect. Then I have determined how many cars there are per make and age, then dividing those two numbers will result in a so called <strong>oil leak percentage.</strong></p>
<p> </p>
<p>For example, in the Netherlands there are 2043 Opel Astra’s that are four years old, there are three observed with an oil leak, so we have an oil leak percentage of <strong>0.15%.</strong></p>
<p>The graph below shows the oil leak percentages for different car brands and ages. Obviously, the older the car the higher the leak percentage.  But look at BMW: waaauwww those <strong>old BMW’s are leaking like oil crazy… <img alt="🙂" src="https://i0.wp.com/s0.wp.com/wp-content/mu-plugins/wpcom-smileys/twemoji/2/72x72/1f642.png?w=456&ssl=1" class="wp-smiley" data-recalc-dims="1"> </strong>The few lines of R code can be found <a rel="nofollow" href="https://github.com/longhowlam/OlieLekkage" target="_blank">here</a>.</p>
<p><img data-orig-file="https://longhowlam.files.wordpress.com/2017/08/rplot01.png?w=450&amp;h=396&amp;fit=736%2C396" data-orig-size="980,528" data-medium-file="https://longhowlam.files.wordpress.com/2017/08/rplot01.png?w=450&amp;h=396&amp;fit=736%2C396?w=300" data-attachment-id="2304" data-image-meta="{" data-image-description="" src="https://longhowlam.files.wordpress.com/2017/08/rplot01.png?w=450&h=396&fit=736%2C396" data-permalink="https://longhowlam.wordpress.com/2017/08/18/oil-leakage-those-old-bmws-are-bad/rplot01/" data-large-file="https://longhowlam.files.wordpress.com/2017/08/rplot01.png?w=450&amp;h=396&amp;fit=736%2C396?w=440" alt="Rplot01" data-image-title="Rplot01" sizes="(max-width: 736px) 100vw, 736px" data-comments-opened="1" class="wp-image-2304" data-recalc-dims="1"></p>
<h2>Conclusion</h2>
<p>There is a lot in the open car data from RDW, you can look at much more aspects / defects of cars. Regarding my old car that i had, according to this data Mitsubishi’s have a low oil leak percentage, even older ones.</p>
<p>Cheers, Longhow</p>
<p> </p>
<p> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/longhowlam.wordpress.com/2249/" target="_blank"><img border="0" alt="" src="http://feeds.wordpress.com/1.0/comments/longhowlam.wordpress.com/2249/"></a> <img border="0" alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" data-recalc-dims="1"></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="https://longhowlam.wordpress.com/2017/08/18/oil-leakage-those-old-bmws-are-bad/"> R – Longhow Lam's Blog</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/m9aBHwfG8JU" height="1"></a></div>