R
R
runapa2022-03-02 12:26:48
Algorithms
runapa, 2022-03-02 12:26:48

What is the best way to handle car mileage?

At work, you need to make statistics on the mileage of cars.
The bottom line is this: They want to see the number of kilometers traveled by month, for half a year, and so on ... But the problem is that the mileage is recorded during refueling and, accordingly, the data is not very convenient.

That is, let's say the first date was 11.01, then 23.01, and then only in February - 13.02. How to extract the mileage for January from this data? I understand that it will not work normally to get a mileage from this, but it must be done as accurately as possible. Maybe there is some formula? What do you advise?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2022-03-02
@runapa

Interpolate. How exactly - depends on how the cars are used.
If we assume that the mileage is the same every day, then we take the total mileage for the interval and divide by the number of days in the interval. Then either we save the resulting average mileage for each day of the interval, or we calculate the mileage at the end of the month and save it monthly.
If, for example, the entire run is only on weekdays, then, accordingly, we calculate the number of working days in the interval and divide by it. When spreading by day, again, we record zero mileage on weekends and average on weekdays.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question