我有一个睡眠时间信息的数据集,我想用Python生成它的可视化效果。在
我拥有的.csv
数据集如下所示:
SleepStartDate,SleepStartTime,SleepStopTime
17/03/2017,23:45,07:25
19/03/2017,01:05,09:10
19/03/2017,23:50,08:25
我要制作的视觉效果应该类似于以下内容: 图片来源:http://quantifiedself.com/wp-content/uploads/2015/08/qs2.png
我知道这是一个非常简单的可视化,想象一下它已经内置在一些已经存在的库中,但是我在google上的最大努力都无法找到它。如果有人能给我指出正确的方向,我将不胜感激。在
提前感谢你的时间和智慧。在
典型的Python选择是使用matplotlib包。看看你的示例图,它看起来像一个垂直条形图。在
找不到一个具有功能的库来执行我想要的功能,所以最后为自己编写了一个脚本:
脚本:
输入:
^{pr2}$输出:
我有空的时候可能会想一想:https://github.com/ambidextrous/timeLogGrapher
相关问题 更多 >
编程相关推荐