title: How do I read my Google Location History in R
body: <p>I found my Google Location History at</p>
  
  <p><a href="https://maps.google.co.uk/locationhistory/b/0/?hl=en-GB" rel="nofollow noreferrer">https://maps.google.co.uk/locationhistory/b/0/?hl=en-GB</a></p>
  
  <p>I then downloaded the KML file</p>
  
  <p>I installed <code>rgdal</code> correctly but am unable to read the file</p>
  
  <p>I put the file name and layer name as from <a href="https://gis.stackexchange.com/questions/58131/how-to-efficiently-read-a-kml-file-into-r">https://gis.stackexchange.com/questions/58131/how-to-efficiently-read-a-kml-file-into-r</a></p>
  
  <pre><code> hist = readOGR(dsn="/home/ajay/Desktop/history-05-04-2015",layer="Location history from 05/05/2015 to 06/04/2015")
  </code></pre>
  
  <p>this is how file looks like</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;kml xmlns="http://www.opengis.net/kml/2.2"         xmlns:gx="http://www.google.com/kml/ext/2.2"       xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"&gt;
  &lt;Document&gt;
   &lt;name&gt;Location history from 05/05/2015 to 06/04/2015&lt;/name&gt;
  &lt;open&gt;1&lt;/open&gt;
  &lt;description/&gt;
  &lt;StyleMap id="multiTrack"&gt;
  </code></pre>
  
  <p>This is the error</p>
  
  <pre><code>&gt;Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv,  : 
   Cannot open file
  </code></pre>
  
  <p>Additional Information</p>
  
  <pre><code>&gt; ogrDrivers()
               name write
  1          AVCBin FALSE
  2          AVCE00 FALSE
  3             BNA  TRUE
  4             CSV  TRUE
  5             DGN  TRUE
  6            DODS FALSE
  7             DXF  TRUE
  8  ESRI Shapefile  TRUE
  9      Geoconcept  TRUE
  10        GeoJSON  TRUE
  11         GeoRSS  TRUE
  12            GML  TRUE
  13            GMT  TRUE
  14  GPSTrackMaker  TRUE
  15            GPX  TRUE
  16     Interlis 1  TRUE
  17     Interlis 2  TRUE
  18            KML  TRUE
  19   MapInfo File  TRUE
  20         Memory  TRUE
  21          MySQL  TRUE
  22           ODBC  TRUE
  23           OGDI FALSE
  24         PCIDSK FALSE
  25           PGeo FALSE
  26     PostgreSQL  TRUE
  27            REC FALSE
  28            S57  TRUE
  29           SDTS FALSE
  30         SQLite  TRUE
  31          TIGER  TRUE
  32        UK .NTF FALSE
  33            VFK FALSE
  34            VRT FALSE
  35         XPlane FALSE
  
  &gt; sessionInfo()
  R version 3.2.0 (2015-04-16)
  Platform: i686-pc-linux-gnu (32-bit)
  Running under: Ubuntu precise (12.04.5 LTS)
  
  locale:
   [1] LC_CTYPE=en_IN.UTF-8       LC_NUMERIC=C              
   [3] LC_TIME=en_IN.UTF-8        LC_COLLATE=en_IN.UTF-8    
   [5] LC_MONETARY=en_IN.UTF-8    LC_MESSAGES=en_IN.UTF-8   
   [7] LC_PAPER=en_IN.UTF-8       LC_NAME=C                 
   [9] LC_ADDRESS=C               LC_TELEPHONE=C            
   [11] LC_MEASUREMENT=en_IN.UTF-8 LC_IDENTIFICATION=C       
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods  
  [7] base     
  
  other attached packages:
  [1] rgdal_0.9-3 sp_1.1-0   
  
  loaded via a namespace (and not attached):
  [1] tools_3.2.0     grid_3.2.0      lattice_0.20-31
  </code></pre>