Well travelled or just plain old?

A friend of mine has always said that young cars with high mileage are better than old cars with low mileage. The theory being that company cars, which have spent their time cruising on the motorways, have had a much easier life than their stay-at-home cousins who’ve done short hops around town and sat on their driveways seizing up.

So I pointed some very simple Spark queries at the UK government’s open MOT data to see what I could find (you can read about the last time I did this here). First factoid to note is that both mileage and age are relevant when it comes to predicting pass rates. The following two charts show pass rate vs mileage and age.

Pass Rate vs Mileage

Pass Rate vs Age

To look at all three variables together I created the following chart which shows shows age on on the x axis and mileage on the y. Pass rate is a colour scale with red being the worst and green the best. Green squares show combinations of mileage and age at which vehicles are more likely to pass their MOT on the first attempt. Red squares show combinations where a first-try failure is likely.

Pass Rate vs Mileage and Age

There is some truth to my mate’s theory – at least if this chart is to be believed – the pass rate for 3-5 year old cars looks pretty good even at very high mileages. Looking horizontally for very-low-mileage cars of increasing age there seems to be something quite odd going on for vehicles on less than 20k miles. For the 20k-40k range there does seem to be a green stripe across the ages, but it is not as apparent as it’s vertical counterpart.

So should we all be buying a four-year-old car with 180k miles on the clock? Well, no. At least not if we want to keep it for more than a year or two. Cars with high mileages on the clock go into the red much earlier than those with low mileage (based on the fact that vehicles can only move right and up through the chart as they get older and drive further).

Pass Rate vs Mileage and Age… to the MAX

That last chart shows the same heat-matrix view, but to the full extents of the data. There are some interesting facts hidden in that chart… but I’ll leave them as an exercise for the reader!144

UPDATE: Proper Stats:

So it turns out that calculating correlation and covariance with Spark is pretty easy. Here’s the results and the code:

For cars < 20 years and < 250,000 miles
cov(testMileage, pass) = -3615.011
corr(testMileage, pass) = -0.195
cov(age, pass) = -0.401
corr(age, pass) = -0.235
For all data
cov(testMileage, pass) = -3680.0456
corr(testMileage, pass) = -0.177
cov(age, pass) = -0.383
corr(age, pass) = -0.152

Looking at cars in the “normal” range (i.e. less than 20 years old and less than 250k miles) there’s a stronger correlation between age and pass rate than between mileage and pass rate. Interestingly, looking over the full range of the data this relationship is inverted, with mileage being very slightly better.  There’s little to separate the two as a predictor for pass or fail – not least because age and mileage are largely dependant on each other (with a correlation of 0.277 across all data).

Basic statistical functions are available under DataFrame.stat. See the calls hidden in the println lines below:

  it should "calculate covariance and correlation for normal cars" in {
    val motTests = Spark.sqlContext.read.parquet(parquetData).toDF()
    motTests.registerTempTable("mot_tests")

    val df = motTests
      .filter("testClass like '4%'") // Cars, not buses, bikes etc
      .filter("testType = 'N'") // only interested in the first test
      .filter("age &amp;lt;= 20")
      .filter("testMileage &amp;lt;= 250000")
      .withColumn("pass", passCodeToInt(col("testResult")))

    println("For cars &amp;lt; 20 years and &amp;lt; 250,000 miles")
    println(s"cov(testMileage, pass) = ${df.stat.cov("testMileage", "pass")}")
    println(s"corr(testMileage, pass) = ${df.stat.corr("testMileage", "pass")}")

    println(s"cov(age, pass) = ${df.stat.cov("age", "pass")}")
    println(s"corr(age, pass) = ${df.stat.corr("age", "pass")}")
  }

A sheared bolt and a mini adventure

On Thursday night last week my charge light didn’t go out. Since it was very wet I just assumed it was down to a slippy fan belt and decided to fix it at the weekend, provided the never-ending rains let up.
2014-02-16 15.02.07
After a huge fry-up at the farm, daughter and I set about fixing the problem – which turned out to be caused by the alternator completely snapping off! The 200Di conversion involved making a custom alternator bracket. Though the bracket itself is made from 10mm sheet steel welded to a chunky steel tube I made on the lathe, the weak spot is the M8 bolt which runs through it. This bolt had sheared off, leaving the alternator hanging loose. Luckily the fan belt didn’t fall off on the way home and I didn’t drive far enough to overheat the engine (the water pump must have stopped working as a result of the belt going slack).
2014-02-16 15.18.37
In the end I used a length of threaded bar instead of the stainless set screw that Emma is holding in the photo. Hopefully this will last a bit longer; stainless steel being notoriously brittle.
2014-02-16 16.39.27
I wasn’t allowed to start the engine “unless we’re going on a journey” so, once the fix was in, we headed up the road to Bucklebury Common. After the weeks of heavy rain and strong winds the common was pretty muddy and there were fallen trees and branches everywhere. I think the daughter enjoyed her introduction to Green Laning.
2014-02-16 16.39.30
In fact she took it so seriously she started compiling some pace notes!

Fixing the gear stick

For the last couple of weeks, gear changes in The Duke have been very hard work. The tiny pin which stops the stick spinning sheared off, adding a new element of drama to my commute.

image

The original pin had sheared and was stuck in the channel in the ball at the base of the stick.

image

So I had to strip the whole thing down.

image

The pin and the thread on the hole were totally ruined, so I had to think if something new.

image

I drilled out the hole

image

Then tapped it with an M8 thread. Much bigger and stronger than the old one.

image

Then turned down a set screw on the lathe

image

And heat treated it with case hardening compound, which will hopefully stop it getting squashed and bent.

image

I doubt there are many Land Rovers on the road with the original rubber blob on the base of the great stick. It’s meant to prevent vibrations but was totally worn away.

image

So I turned a replacement out of nylon and hammered it on.

image

At 19.3mm diameter is a snug fit on my spare gearbox and should help prevent rattles and make gears a bit easier to find.

image

All in all I’m very happy with my evening’s work. Just need the sun to come up so I can put it all back together again!

Insulation

I’ve decided to add some more “creature comforts” to The Duke. I am sick of the noise and the condensation that runs down my neck when I start off on cold mornings. I didn’t much like the ice that formed on the inside of the walls when we went camping back in December either!

After much research I found some 7mm thick closed-cell “van insulation” foam on eBay. It cost me £70 for 8m and I used 7m of it lining the roof and walls. A couple of cans of “trimfix” glue were included in the price. I almost managed to do the whole job with just one can of glue but had to open the second for the last roof section over the front seats!

20130421_180253

It looks like the international space station in there now! Emma enjoyed looking around once I was finished – though she still refers to The Duke as “Daddy’s Tractor”.

20130421_180343

It was all pretty easy except the final section over the front seats. The roof tapers and the chunk of foam needed to be aligned on all sides. I had to peel and re-stick several times before I got it right.

Went out for a test drive and I can confirm that it’s still very noisy in there. Not sure if the newly insulated roof helped much as the overdrive whine is still deafening at motorway speeds. I still have the door seals to replace and maybe I’ll stick the last metre of insulation under the bonnet to see if that makes a difference!

It does seem to help with the heat a little – it was sunny this weekend and the uninsulated skin of the roof was hot enough to (slowly) cook an egg. Insulated sections are much less hot to the touch.

South West Coast – Lands End to (almost) The Lizard

Several years ago we finished the northern section of the South West Coast Path. This week a smaller group of us went back to take on the next section – Lands End to The Lizard.

We managed 16 “strenuous” miles on day one, 18 “moderate” miles on day two and then cut day three short to 8 more moderate miles. We didn’t make the Lizard, but we had fun trying! The landscape was beautiful but the weather was cruel to say the least. Snack breaks on day three were bitterly cold with a constant freezing wind blowing head-on as we walked. Can’t complain too much though as the rest of the UK was hit by unseasonal snowstorms.

We witnessed a real life air-sea rescue on day two. An RAF Sea King turned up to winch a fisherman from the freezing sea after he’d been swept off the rocks. We were convinced they were pulling out a corpse but next day the local radio confirmed he had miraculously survived the 10-foot swells, jagged rocks and freezing water. Watching the rescue unfold from the coast path left us in awe but also a little shaken. Coastal erosion was in full swing and we often found ourselves on detours around huge new cracks in the ground or navigating slippery wet rocks above certain-death falls. Maybe these things are best done in the summer!

That said, it was fantastic to notch up another 42 miles of stunning coastline. Hopefully next year will see us back in Cornwall for the next section of walking and more warm pub parlours, good beer and fresh fish suppers.

Greenham Common Sunrise

Woke up early and met Dr Johnson just after dawn at Greenham Common. The control tower car park was closed so we stopped in a lay-by with the dog walkers and wandered over to the north taxiway. The ground is very wet and I am hopelessly out of practice with FPV so I stuck to line-of-sight flying. Turns out I am also out of practice at that as after about 10 minutes I got disoriented and crashed, snapping a leg off and ending the festivities for the morning.

Since flying was out of the question, we decided to go on a survey mission round the base. It was my first time on the airbase so was quite interesting to wander over to the bunkers and stare through the fence. The runway has been torn up and bulldozed into lumps to stop planes landing, so where the mighty B52s once rumbled in to land there’s now just gravel and gorse bushes. Saw the odd cow and some horses too, since the common is now common land again.

Here are some photos and a video from the ‘copter. I am somewhat annoyed that a drop of water got on the lens (again!) and smudged up the image. We shall return to the base soon I hope.

IMG_8297

IMG_8294

IMG_8290

Snapshot 2 (15-02-2013 08-31)