Between 2021 and 2022, I started my Laptop 628 times.

I found a log file that contained the dates and times that I booted up my laptop on while looking through my old hard drive. Because I didn’t have anything better to do, I decided to analyse these logs.

Table of Contents

Preparing the data

The way I aquired these logs is by putting a python file that just logged the date and time to a text file into my startup folder.

To begin extracting the data and converting it into a more useful format (like JSON), I copied the file into a separate folder, away from the other trash I had on my hard drive.

I then wrote a Node.js script that read every line of the log file and created a huge JSON file with all the useful informaton I need.

I turned the old format which looked like this:

> > > LOGON: 25.12.2020 13:00:12 - STARTED UP

to this:

{
    "date": "25.12.2020",
    "time": "13:00:12",
    "hour": 13,
    "minute": 0,
    "day": 25,
    "month": 12,
    "year": 2020,
    "weekday": "Friday",
    "wholeMonth": "December"
},

With this structure, I could easily insert the times where I started the computer into a graph.

Analysis

Now that we have the data, it’s time for making some graphs! For the graphs, I chose the Carbon Component Library, which worked really well.

And here is our first graph!

Starts per Month

The graph above shows how many times the computer was powered on each month. As you can see, each month, the computer was powered on more than 30 times. This means that the laptop was powered on more than once a day. As you can see, there are some irregularities in the graph i’d like to talk about: March, June, August and December.

I can’t explain why March has the most boot-ups. There weren’t any holidays or school-off days. June and August were months with school holidays. I was most likely on vacation there, which is why I wasn’t on the computer that much. December is the lowest month because some days are missing in the log files.

Overall I reached an average of 52 start-ups per month!

Starts per Hour of the day

The next graph shows at what time of the day I started my laptop.

In the graph there is a huge spike at 6:00, then it reaches a low point at 10:00 and then rises up again till 12:00. This is a pretty good reflection of my daily schedule.

Let me add some markers to the graph:

As you can see, the low point at 10:00 exists because I’m at school there. At 12:00 to 13:00 I arrive at home again, where I start my laptop once more. Back then I went to bed at ~20:30, so you will see the amount of starts slowly decreasing there.

Morning vs Afternoon

Even though it looks like most of the starts are in the morning, comparing the morning (before 12:00) with the afternoon (after 12:00) actually reveals that the amount of starts is almost the same in both halfs of the day.

The whole year

To summarise this analysis, here is a heatmap showing all the times I started my laptop. I started my laptop on average ~2 (1.68817) times day.

No, I cannot explain why my laptop has booted up 22 times on March 22nd.

Summary

Creating the charts and analysis the data was a lot of fun, I hope I get to do this more in the future. Perhaps I can track the letters I type on my keyboard, my mouse movement or even the programs I have opened.

The possibilites are endless.