Generate cost per mile on a per garage basis - allowing for comparison of fuel economy between different garages.

Needs to be carefully implemented though as the metric that needs to be used is the distance between the current and the next fill;

|Garage|Litres|Mileage|PPL|

|Tesco|12|1|£1|

|Shell|10|11|£1.50|

|Texaco|5|21|£1.25|

From the table above we could calculate

|Garage|Economy|CPM|

|Tesco|1 mile per litre|£1|

|Shell|2 miles per litre|75p|

|Texaco| - | - |

i.e. after filling up at Tesco's, a journey of 10 miles required us to put another 10 litres in the tank. The fuel we bought at Tesco's was £1 a litre (I wish) therefore

* (10 miles / 10 litres) * £1 = £1 per mile *

May be tricky to generate monthly per-garage CPM stats as it's unlikely that all recorded garages will be used each month - an overall stat is probably the better move.

Needs to be carefully implemented though as the metric that needs to be used is the distance between the current and the next fill;

|Garage|Litres|Mileage|PPL|

|Tesco|12|1|£1|

|Shell|10|11|£1.50|

|Texaco|5|21|£1.25|

From the table above we could calculate

|Garage|Economy|CPM|

|Tesco|1 mile per litre|£1|

|Shell|2 miles per litre|75p|

|Texaco| - | - |

i.e. after filling up at Tesco's, a journey of 10 miles required us to put another 10 litres in the tank. The fuel we bought at Tesco's was £1 a litre (I wish) therefore

May be tricky to generate monthly per-garage CPM stats as it's unlikely that all recorded garages will be used each month - an overall stat is probably the better move.

## Activity

Ben Tasker Permalink2013-11-17 06:12:00So in the stats table, we might add

|Year|Month|StatType|Value|Modifier|Description|

|2013|11|GarageFuelBurnt|10|Tesco|In the example above, we had to replace 10 litres of Tesco petrol|

|2013|11|GarageTotalSpend|12|Tesco|In the example above, we bought 12 litres of petrol at £1 from Tesco|

|2013|11|GarageTotalMileage|10|Tesco|In the example above, we travelled 10 miles burning Tesco petrol|

That final statistic will be the most complex to generate, in the sense that we don't want to resort to consistently querying for the next record - it'll put quite a load on the database if we're not careful.

Ben Tasker Permalink2013-11-17 06:14:29From a stats point of view we then travelled another 10 miles on Shell petrol, before replacing 5 litres of it.

In reality though, at that point we're travelling with a blend of Shell/Tesco petrol (we know from the stats that the tank holds at least 12 litres). This will almost certainly affect fuel economy, but there's no easy way to quantify it from a stats generation point of view.

The best thing we can do is probably to add an FAQ somewhere which explains why you might see a spike/dip in the chart just after changing garages.