Google Location Data

Big Brother is real

So you want to know what Google knows about your location? As a part of saying goodbye to Google services, I exported all Google Location data it has on me. Thanks to GDPR I know have a bunch of JSON files from which I can extract some valuable information.

I was surprised by the granularity of the dataset. It was quite straightforward to turn it into a readable tabular data with a single pipeline:

jq -cr ".timelineObjects[].placeVisit | [.duration.startTimestamp,.location.address,.location.locationConfidence,.duration.endTimestamp] | @tsv" */*.json |\
sed 's/\\n/ - /g' |\
sed '/^\s*$/d'

The jq reads all JSON files in the Semantic Location History directory (grouped by year and month), extracts only four values from duration and location keys, converts them into TSV file which is then cleaned a bit: newlines in the address are replaced by a hyphen and empty lines (no data available) are removed.

The JSON contains a lot of data, here just an example of one (rather simple) placeVisit datapoint:

{
  "placeVisit": {
    "location": {
      "latitudeE7": 493076694,
      "longitudeE7": 166996570,
      "placeId": "ChIJWe2xwBmNEkcRn2HotDYN2ag",
      "address": "Jihomoravský kraj, Česká republika",
      "name": "Moravian Karst",
      "sourceInfo": {
        "deviceTag": 1160389998
      },
      "locationConfidence": 89.86943
    },
    "duration": {
      "startTimestamp": "2017-04-02T09:24:26.494Z",
      "endTimestamp": "2017-04-02T09:30:33.198Z"
    },
    "placeConfidence": "MEDIUM_CONFIDENCE",
    "centerLatE7": 492862163,
    "centerLngE7": 166906738,
    "visitConfidence": 67,
    "otherCandidateLocations": [
      {
        "latitudeE7": 492842150,
        "longitudeE7": 166948030,
        "placeId": "ChIJsXYZ6JaSEkcRDLhjgSKyBoI",
        "address": "Babice nad Svitavou 24\n664 01 Babice nad Svitavou\nČesko",
        "name": "Babická pálenice a moštárna",
        "locationConfidence": 5.9388905
      },
      {
        "latitudeE7": 492842488,
        "longitudeE7": 166911259,
        "placeId": "ChIJ57npP5GSEkcRRE3tCU-BkJ8",
        "address": "Babice nad Svitavou 61\n664 01 Babice nad Svitavou\nČesko",
        "name": "61",
        "locationConfidence": 1.6920232
      },
      {
        "latitudeE7": 492853893,
        "longitudeE7": 166934898,
        "placeId": "ChIJM_-V1JCSEkcRsA6SEfrKD6U",
        "address": "Babice nad Svitavou 309\n664 01 Babice nad Svitavou\nČesko",
        "name": "309",
        "locationConfidence": 1.6073189
      },
      {
        "latitudeE7": 492856691,
        "longitudeE7": 166932568,
        "placeId": "ChIJlViD0ZCSEkcRumELjVzmFbI",
        "address": "Babice nad Svitavou 310\n664 01 Babice nad Svitavou\nČesko",
        "name": "310",
        "locationConfidence": 0.89233327
      }
    ],
    "editConfirmationStatus": "NOT_CONFIRMED",
    "locationConfidence": 72,
    "placeVisitType": "SINGLE_PLACE",
    "placeVisitImportance": "MAIN"
  }
}

From years 2016, 2017, 2018 and 2019 the export contained 757 location datapoints. And you need to know that I didn’t use the Android phone much, I didn’t even use GPS very often.

The command above yielded a table, here just a first few lines:

Start TimestampAddressConfidenceEnd Timestamp
2016-12-01T05:27:55Botanická 554/68A - 602 00 Brno-Královo Pole-Ponava - Česko54.312016-12-01T10:25:12
2016-12-01T11:59:16Botanická 554/68A - 602 00 Brno-Královo Pole-Ponava - Česko48.512016-12-01T13:43:32
2016-12-02T13:59:45Rejhotice 149E, 788 11 Loučná nad Desnou, Česká republika99.992016-12-02T22:36:14
2016-12-03T17:00:45Rejhotice 149E, 788 11 Loučná nad Desnou, Česká republika99.992016-12-03T20:08:15
2016-12-04T15:04:10Babice nad Svitavou 62, 664 01 Babice nad Svitavou, Česká republika58.122016-12-04T15:44:45

Big brother is real. :)

I’ve got my iPhone in September 2020. I am curious what Apple knows…

published: 2022-08-28
last modified: 2023-01-21

https://vit.baisa.cz/notes/code/google-location-data/