Flask on AWS Serverless: A learning journey - Part 2
About 3 years ago I learnt some basic Python, which I've used almost exclusively to
Over the last few years, since 2011, I started noting down some data each time I filled up petrol at the garage/petrol station. I used a simple Google Drive spreadsheet, and I captured these data points:
I realised I could have used an app to do this. I actually did start using one, but it was quite complex, and needed a lot of data to populate. Using Google Docs was quite simple on the phone, and the best part is that the data belongs to me, and I can now do some comparisons. And I don't know if any app allows you to capture data for different cars, using the same phone.
I did this for each car, so now I have quite a lot of data to compare stats across each car, per year. Below I have used the built in Charts in Google Docs to graph the data.
When you have data like this, it would be ideal if you can ask questions of the data, like:
Let's thats looking at what the data can tell us.
For each car, if I combined the data onto one graph, I get something like this, for one of the cars, the Tazz in this case:
I don't quite like that too much, because the y axis now has different values of measurement, representing Cost in Rands, Fuel amount in Liters, and Kilometers travelled. Because Rands is in thousands, while fuel/Liters is in the tens, it's difficult to see whats really happening.
So instead, I have a chart per measurement (Kilometers per year, Liters per year) for each car, so we can compare the cars, across time
For each of the 3 cars, their total kilometers travelled has been plotted. I calculated this by taking the last odometer reading, minus the starting odometer per year, per car.
I had data for the Red Corolla from 2011 until 2017 when it was sold, replaced by the Silver Corolla. The Tazz data points only started in 2013. Here are the interesting things that we can pick up from the data:
How economical is each car? How efficient is it with respect to consuming fuel? Here we refer to economy as Kilometers per Liter (km/L), or how many kilometers can you get per liter of fuel. Obviously, the higher the better.
As an aside, economy or fuel efficiency can also be measured by liters per 100 kilometers (L/100 km). I prefer the km/L measure.
Lets see what the data tells us:
We can also look at the average economy:
What I don't have here is data on speed. That could answer the age-old question of what is the most economical speed to drive at - the sweet spot.
This is probably the best answer to what is the best speed, which says that wind resistance at higher speeds causes lower output, but the power curve of the engine will affect power output, so the most efficient power output will be at higher speeds. The sweet spot is quoted at around 70km/h, and if I consider my increased speeds in the Tazz since 2016, I can see the negative effect that is having.
Fuel Costs
Lets look at the cost of each car, regarding the cost of fuel and how much kilometers were driven.
The total costs in fuel, according to the data, is a total of R228 000 from 2011 till 2019. According to 22seven (the free financial analysis tool), based on the  'Transport and Fuel' category, I have spent R178 000 on fuel costs since 2011. A small part of that amount includes Uber and parking costs, but we can brush that off as minimal. We can attribute the difference to some missing data in 22seven, because I started using it 2012/2013.
Looking at the green bar - the total costs of fuel for all 3 cars, there has been a dramatic increase since 2017. Â We can contribute some of these increases to kids starting school, then both kids in school, and then extra-mural activities.
However, most of that is due to the increase in price of fuel over time, in rands:
Thats a 97% increase from 2011 to 2019!
If we look at how much each km costs, we can do an analysis of Rands/km:
This is pretty much an inverse of the Economy graph above, which shows that the Silver Corolla is the most expensive (least economical), while the Red Corolla got more expensive over time.
For tax purpose, SARS publishes a rate card, saying how much an employer should reimburse an employee for business travel per km. Using that, in 2019, at the current value of the cars, the rates would be R1.30 for the Tazz, and R1.49 for the Silver Corolla. Looking back at the graph, thats kinda equals what we have.