Habit Visualization
A python rework of "My terrible sleep habits visualized".
A python rework of "My terrible sleep habits visualized".
Given a text file containing instances of a certain activity, my scripts generates several visualizations to represent it. It also creates csv-like files that can be imported into software, such as Excel, to further work with the data.
See this album for past finished labeled versions to more quickly get a sense of what these represent.
This is a rectilinear representation that plainly displays the data with each row being the day after the previous and each column being a different hour, with the leftmost starting at midnight (12 AM).
A heatmap of a week that goes by the hour. The rows span from Monday to Sunday starting at the top, and the columns start on the left and begin at midnight. Each 'pixel' is the likelihood of the activity taking place during a specific time and day of the week, averaged to the hour.
This is a heatmap of a week that goes by the minute. It is the same as the previous hourly one except that it is not averaged to provide a denser representation.
This is what I call a 'spectrum', given its vague resemblance to emission spectra for certain activities (I find the sleep one to be best for this). It shows the same data as the previous heatmap but formatted so that it spans the entire week in a single line.
The polar visualizations are the rectilinear representations 'wrapped' to a circular coordinate system. This one, for example, is the heatmap of a week from above. The spiral is achieved through an initial offset of its line height prior to the transformation. In this case, the outer part of the spiral starts with Monday and transitions to a new day with each full rotation. The time is positioned to represent a 24-hour clock: midnight at the top with it progressing clockwise.
Heatmap reference/key. From left to right, it represents 0% to 100% respectively.
The images below are all unmodified outputs of the python scripts.