Google Mapの履歴から勤怠を生成する

1 https://takeout.google.com/settings/takeout/custom/location_history からzipをダウンロード

2 zipを展開

$ unzip takeout-20220405T052057Z-001.zip

3 jqで抜く

$ cat Takeout/ロケーション履歴/Semantic\ Location\ History/2022/2022_MARCH.json | jq -r '
    .timelineObjects[].placeVisit |
    select(.) |
    {n: .location.name, s: .duration.startTimestamp, e: .duration.endTimestamp} |
    .s |= (.|sub("(?<time>.*)\\.[\\d]{3}(?<tz>.*)"; "\(.time)\(.tz)")|fromdate|.+32400|todate) |
    .e |= (.|sub("(?<time>.*)\\.[\\d]{3}(?<tz>.*)"; "\(.time)\(.tz)")|fromdate|.+32400|todate) |
    [.s, .e, .n] |
    @csv' | grep '会社名'

"2022-03-12T09:59:34Z","2022-03-12T17:34:38Z","会社名"
"2022-03-23T09:42:07Z","2022-03-23T17:23:33Z","会社名"
"2022-03-31T10:03:57Z","2022-03-31T20:30:25Z","会社名"

ヨシ!