USA/ Canada Roadtrip 2016

[This article was first published on Shirin's playgRound, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Mapping GPS data from our USA/ Canada Roadtrip

This September we went on a roadtrip to the US and Canada.
Of course, we had our trusty GPS to guide us along the way – the data from which I downloaded and used to play around with.

(If you want to see a few photos from the trip and don’t care about the rest, skip to the bottom…)

Loading the data

I used the XML package to load the gpx files following this blog post.

<span class="n">library</span><span class="p">(</span><span class="n">XML</span><span class="p">)</span><span class="w">

</span><span class="n">myfiles</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">list.files</span><span class="p">(</span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"../gpx/gpx_files"</span><span class="p">,</span><span class="w"> </span><span class="n">full.names</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="m">1</span><span class="o">:</span><span class="nf">length</span><span class="p">(</span><span class="n">myfiles</span><span class="p">)){</span><span class="w">

  </span><span class="c1"># One of the files seems to be broken, but since the file is one with earlier data
</span><span class="w">  </span><span class="c1"># not from the trip, I will simply skip it
</span><span class="w">  </span><span class="n">tryCatch</span><span class="p">({</span><span class="w">
    </span><span class="n">pfile</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">htmlTreeParse</span><span class="p">(</span><span class="n">myfiles</span><span class="p">[</span><span class="n">i</span><span class="p">],</span><span class="w"> </span><span class="n">useInternalNodes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">T</span><span class="p">)</span><span class="w">

  </span><span class="p">},</span><span class="w"> </span><span class="n">error</span><span class="o">=</span><span class="k">function</span><span class="p">(</span><span class="n">e</span><span class="p">){</span><span class="n">cat</span><span class="p">(</span><span class="s2">"ERROR\n"</span><span class="p">)})</span><span class="w">

  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">exists</span><span class="p">(</span><span class="s2">"pfile"</span><span class="p">)){</span><span class="w">
    </span><span class="c1"># Get all elevations, times and coordinates via the respective xpath
</span><span class="w">    </span><span class="n">elevations</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nf">as.numeric</span><span class="p">(</span><span class="nf">as.character</span><span class="p">(</span><span class="n">xpathSApply</span><span class="p">(</span><span class="n">pfile</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"//trkpt/ele"</span><span class="p">,</span><span class="w"> </span><span class="n">xmlValue</span><span class="p">)))</span><span class="w">
    </span><span class="n">times</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">xpathSApply</span><span class="p">(</span><span class="n">pfile</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"//trkpt/time"</span><span class="p">,</span><span class="w"> </span><span class="n">xmlValue</span><span class="p">)</span><span class="w">
    </span><span class="n">coords</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">xpathSApply</span><span class="p">(</span><span class="n">pfile</span><span class="p">,</span><span class="w"> </span><span class="n">path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"//trkpt"</span><span class="p">,</span><span class="w"> </span><span class="n">xmlAttrs</span><span class="p">)</span><span class="w">
    </span><span class="c1"># Extract latitude and longitude from the coordinates
</span><span class="w">    </span><span class="n">lats</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nf">as.numeric</span><span class="p">(</span><span class="nf">as.character</span><span class="p">(</span><span class="n">coords</span><span class="p">[</span><span class="s2">"lat"</span><span class="p">,]))</span><span class="w">
    </span><span class="n">lons</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="nf">as.numeric</span><span class="p">(</span><span class="nf">as.character</span><span class="p">(</span><span class="n">coords</span><span class="p">[</span><span class="s2">"lon"</span><span class="p">,]))</span><span class="w">
    </span><span class="c1"># Put everything in a dataframe and get rid of old variables
</span><span class="w">    </span><span class="n">geodf</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">data.frame</span><span class="p">(</span><span class="n">lat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lats</span><span class="p">,</span><span class="w"> </span><span class="n">lon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lons</span><span class="p">,</span><span class="w"> </span><span class="n">ele</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">elevations</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">times</span><span class="p">)</span><span class="w">

    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="m">1</span><span class="p">){</span><span class="w">
      </span><span class="n">geodata</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">geodf</span><span class="w">
      </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w">
      </span><span class="n">geodata</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">rbind</span><span class="p">(</span><span class="n">geodata</span><span class="p">,</span><span class="w"> </span><span class="n">geodf</span><span class="p">)</span><span class="w">
    </span><span class="p">}</span><span class="w">
  </span><span class="p">}</span><span class="w">
  </span><span class="n">rm</span><span class="p">(</span><span class="n">pfile</span><span class="p">)</span><span class="w">
</span><span class="p">}</span><span class="w">
</span><span class="n">geodata_all</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">geodata</span><span class="w">
</span>

I then did some cleaning of the date and time column and removed all the old track that were not part of our trip.

<span class="c1"># Transforming the time column
</span><span class="n">geodata_all</span><span class="o">$</span><span class="n">time</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">strptime</span><span class="p">(</span><span class="n">geodata_all</span><span class="o">$</span><span class="n">time</span><span class="p">,</span><span class="w"> </span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"%Y-%m-%dT%H:%M:%SZ"</span><span class="p">)</span><span class="w">

</span><span class="c1"># ordering by date
</span><span class="n">library</span><span class="p">(</span><span class="n">plyr</span><span class="p">)</span><span class="w">
</span><span class="n">geodata_all</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">arrange</span><span class="p">(</span><span class="n">geodata_all</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="p">)</span><span class="w">

</span><span class="c1"># removing all tracks from Germany
</span><span class="n">geodata</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">geodata_all</span><span class="p">[</span><span class="n">which</span><span class="p">(</span><span class="nf">as.numeric</span><span class="p">(</span><span class="nf">as.character</span><span class="p">(</span><span class="n">geodata_all</span><span class="o">$</span><span class="n">lon</span><span class="p">))</span><span class="w"> </span><span class="o"><</span><span class="w"> </span><span class="m">0</span><span class="p">),]</span><span class="w">

</span><span class="c1"># adding a column with day for separating the plotting by day lateron
</span><span class="n">geodata</span><span class="o">$</span><span class="n">day</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">as.factor</span><span class="p">(</span><span class="n">format</span><span class="p">(</span><span class="n">as.Date</span><span class="p">(</span><span class="n">geodata</span><span class="o">$</span><span class="n">time</span><span class="p">,</span><span class="n">format</span><span class="o">=</span><span class="s2">"%Y-%m-%d"</span><span class="p">),</span><span class="w"> </span><span class="s2">"%d"</span><span class="p">))</span><span class="w">
</span>

We have 119225 data points with a range from 2016-09-09 19:23:53 to 2016-09-23 21:36:06.

<span class="n">summary</span><span class="p">(</span><span class="n">geodata</span><span class="p">)</span><span class="w">
</span>
##       lat             lon              ele        
##  Min.   :36.99   Min.   :-88.68   Min.   :-26.78  
##  1st Qu.:40.09   1st Qu.:-84.86   1st Qu.:181.83  
##  Median :41.90   Median :-82.99   Median :198.65  
##  Mean   :41.27   Mean   :-82.76   Mean   :216.58  
##  3rd Qu.:42.33   3rd Qu.:-80.44   3rd Qu.:255.85  
##  Max.   :43.65   Max.   :-78.85   Max.   :438.02  
##                                                   
##       time                          day       
##  Min.   :2016-09-09 19:23:53   19     :17203  
##  1st Qu.:2016-09-12 12:14:47   12     :14455  
##  Median :2016-09-15 21:52:37   11     :14020  
##  Mean   :2016-09-15 22:35:18   10     :12061  
##  3rd Qu.:2016-09-19 15:59:09   16     :10856  
##  Max.   :2016-09-23 21:36:06   13     :10787  
##                                (Other):39843
<span class="n">str</span><span class="p">(</span><span class="n">geodata</span><span class="p">)</span><span class="w">
</span>
## 'data.frame':    119225 obs. of  5 variables:
##  $ lat : num  42 42 42 42 42 ...
##  $ lon : num  -87.9 -87.9 -87.9 -87.9 -87.9 ...
##  $ ele : num  122 122 122 122 122 ...
##  $ time: POSIXlt, format: "2016-09-09 19:23:53" "2016-09-09 19:23:53" ...
##  $ day : Factor w/ 15 levels "09","10","11",..: 1 1 1 1 1 1 1 1 1 1 ...

Getting additional data from Google Maps

Somehow the GPS didn’t record the last two days of our trip back to Chicago, so I added a few way points with the Google Maps Geocoding and Directions APIs (accessed via the googleway package).

<span class="n">library</span><span class="p">(</span><span class="n">googleway</span><span class="p">)</span><span class="w">

</span><span class="c1"># on th 26th we had lunch at cracker barrel
</span><span class="n">cracker_barrel</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"2101 N Kenyon Rd, Urbana, IL 61802, USA"</span><span class="p">,</span><span class="w">
                                 </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                                 </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                                 </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">cracker_barrel_data</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">data.frame</span><span class="p">(</span><span class="n">lat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cracker_barrel</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                  </span><span class="n">lon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cracker_barrel</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                                  </span><span class="n">ele</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"NA"</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">as.POSIXlt</span><span class="p">(</span><span class="s2">"2016-09-26 19:00:00"</span><span class="p">))</span><span class="w">

</span><span class="c1"># then we stayed the night in Aurora/ Naperville
</span><span class="n">super8</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"4228 Longmeadow Dr, Aurora, IL 60504, USA"</span><span class="p">,</span><span class="w">
                         </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                         </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                         </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">super8_data</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">data.frame</span><span class="p">(</span><span class="n">lat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">super8</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                          </span><span class="n">lon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">super8</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                          </span><span class="n">ele</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"NA"</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">as.POSIXlt</span><span class="p">(</span><span class="s2">"2016-09-26 23:30:00"</span><span class="p">))</span><span class="w">

</span><span class="c1"># on the 27th we went back to the airport to fly home
</span><span class="n">ohare</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"10000 W O'Hare Ave, Chicago, IL 60666, USA"</span><span class="p">,</span><span class="w">
                        </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                        </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                        </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">ohare_data</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">data.frame</span><span class="p">(</span><span class="n">lat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ohare</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                         </span><span class="n">lon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ohare</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                         </span><span class="n">ele</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"NA"</span><span class="p">,</span><span class="w"> </span><span class="n">time</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">as.POSIXlt</span><span class="p">(</span><span class="s2">"2016-09-27 18:00:00"</span><span class="p">))</span><span class="w">
</span>

Using only these three waypoints won’t plot nicely on a map because it will draw straight lines between the points.
So, I also want to get travel information from Google Maps between these points to get a few more waypoints along the actual route we drove.

<span class="c1">## Route from Paducah to Cracker Barrel
</span><span class="w">
</span><span class="n">route_pad_cracker</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_directions</span><span class="p">(</span><span class="n">origin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">geodata</span><span class="o">$</span><span class="n">lat</span><span class="p">[</span><span class="n">nrow</span><span class="p">(</span><span class="n">geodata</span><span class="p">)],</span><span class="w"> </span><span class="n">geodata</span><span class="o">$</span><span class="n">lon</span><span class="p">[</span><span class="n">nrow</span><span class="p">(</span><span class="n">geodata</span><span class="p">)]),</span><span class="w">
                  </span><span class="n">destination</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">cracker_barrel_data</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">cracker_barrel_data</span><span class="o">$</span><span class="n">lon</span><span class="p">),</span><span class="w">
                  </span><span class="n">mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"driving"</span><span class="p">,</span><span class="w">
                  </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                  </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                  </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">route_pad_cracker_legs</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">as.data.frame</span><span class="p">(</span><span class="n">route_pad_cracker</span><span class="o">$</span><span class="n">routes</span><span class="o">$</span><span class="n">legs</span><span class="p">)</span><span class="w">
</span><span class="n">route_pad_cracker_legs_steps</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">as.data.frame</span><span class="p">(</span><span class="n">route_pad_cracker_legs</span><span class="o">$</span><span class="n">steps</span><span class="p">)</span><span class="w">

</span><span class="c1">## Route from Cracker Barrel to Aurora
</span><span class="w">
</span><span class="n">route_cracker_aurora</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_directions</span><span class="p">(</span><span class="n">origin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">cracker_barrel_data</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">cracker_barrel_data</span><span class="o">$</span><span class="n">lon</span><span class="p">),</span><span class="w">
                                          </span><span class="n">destination</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">super8_data</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">super8_data</span><span class="o">$</span><span class="n">lon</span><span class="p">),</span><span class="w">
                                          </span><span class="n">mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"driving"</span><span class="p">,</span><span class="w">
                                          </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                                          </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                                          </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">route_cracker_aurora_legs</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">as.data.frame</span><span class="p">(</span><span class="n">route_cracker_aurora</span><span class="o">$</span><span class="n">routes</span><span class="o">$</span><span class="n">legs</span><span class="p">)</span><span class="w">
</span><span class="n">route_cracker_aurora_legs_steps</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">as.data.frame</span><span class="p">(</span><span class="n">route_cracker_aurora_legs</span><span class="o">$</span><span class="n">steps</span><span class="p">)</span><span class="w">

</span><span class="c1">## Route from Cracker Aurora to O'Hare
</span><span class="w">
</span><span class="n">route_aurora_ohare</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_directions</span><span class="p">(</span><span class="n">origin</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">super8_data</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">super8_data</span><span class="o">$</span><span class="n">lon</span><span class="p">),</span><span class="w">
                                        </span><span class="n">destination</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">ohare_data</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">ohare_data</span><span class="o">$</span><span class="n">lon</span><span class="p">),</span><span class="w">
                                        </span><span class="n">mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"driving"</span><span class="p">,</span><span class="w">
                                        </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                                        </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                                        </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">route_aurora_ohare_legs</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">as.data.frame</span><span class="p">(</span><span class="n">route_aurora_ohare</span><span class="o">$</span><span class="n">routes</span><span class="o">$</span><span class="n">legs</span><span class="p">)</span><span class="w">
</span><span class="n">route_aurora_ohare_legs_steps</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">as.data.frame</span><span class="p">(</span><span class="n">route_aurora_ohare_legs</span><span class="o">$</span><span class="n">steps</span><span class="p">)</span><span class="w">

</span><span class="c1"># Combining the data sets
</span><span class="n">geodata_2</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">data.frame</span><span class="p">(</span><span class="n">lat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">geodata</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                </span><span class="n">route_pad_cracker_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">route_pad_cracker_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                </span><span class="n">route_pad_cracker_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">cracker_barrel_data</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                </span><span class="n">route_cracker_aurora_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">route_cracker_aurora_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                </span><span class="n">route_cracker_aurora_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">super8_data</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                </span><span class="n">route_aurora_ohare_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">route_aurora_ohare_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                </span><span class="n">route_aurora_ohare_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">ohare_data</span><span class="o">$</span><span class="n">lat</span><span class="p">),</span><span class="w">
                      </span><span class="n">lon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">geodata</span><span class="o">$</span><span class="n">lon</span><span class="p">,</span><span class="w"> </span><span class="n">route_pad_cracker_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w"> </span><span class="n">route_pad_cracker_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                              </span><span class="n">route_pad_cracker_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w"> </span><span class="n">cracker_barrel_data</span><span class="o">$</span><span class="n">lon</span><span class="p">,</span><span class="w">
                              </span><span class="n">route_cracker_aurora_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w"> </span><span class="n">route_cracker_aurora_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                              </span><span class="n">route_cracker_aurora_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w"> </span><span class="n">super8_data</span><span class="o">$</span><span class="n">lon</span><span class="p">,</span><span class="w">
                              </span><span class="n">route_aurora_ohare_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w"> </span><span class="n">route_aurora_ohare_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                              </span><span class="n">route_aurora_ohare_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w"> </span><span class="n">ohare_data</span><span class="o">$</span><span class="n">lon</span><span class="p">),</span><span class="w">
                      </span><span class="n">day</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="nf">as.character</span><span class="p">(</span><span class="n">geodata</span><span class="o">$</span><span class="n">day</span><span class="p">),</span><span class="w"> </span><span class="nf">rep</span><span class="p">(</span><span class="s2">"26"</span><span class="p">,</span><span class="w">
                                               </span><span class="nf">length</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="n">route_pad_cracker_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                                        </span><span class="n">route_pad_cracker_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                                        </span><span class="n">route_pad_cracker_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">cracker_barrel_data</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                                        </span><span class="n">route_cracker_aurora_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                                        </span><span class="n">route_cracker_aurora_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                                        </span><span class="n">route_cracker_aurora_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">super8_data</span><span class="o">$</span><span class="n">lat</span><span class="p">))),</span><span class="w">
                              </span><span class="nf">rep</span><span class="p">(</span><span class="s2">"27"</span><span class="p">,</span><span class="w">
                                  </span><span class="nf">length</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="n">route_aurora_ohare_legs</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">route_aurora_ohare_legs_steps</span><span class="o">$</span><span class="n">start_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w">
                                           </span><span class="n">route_aurora_ohare_legs</span><span class="o">$</span><span class="n">end_location</span><span class="o">$</span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">ohare_data</span><span class="o">$</span><span class="n">lat</span><span class="p">)))))</span><span class="w">
</span>

Plotting

I tried several packages for plotting but ended up with ggmap as the nicest looking solution.

Overview of the trip

We flew to Chicago, went west across Michigan to Ann Arbor, Detroit, Toronto, then south again to Pittsburgh, from where we followed the Ohio river and headed to Louisville. From there, we went to Paducah, KY and back north again to Chicago. Each color shows a different day.

<span class="n">library</span><span class="p">(</span><span class="n">ggmap</span><span class="p">)</span><span class="w">

</span><span class="n">bc_bbox</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">make_bbox</span><span class="p">(</span><span class="n">lat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">lon</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lon</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">geodata_2</span><span class="p">,</span><span class="w"> </span><span class="n">f</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">.10</span><span class="p">)</span><span class="w">
</span><span class="n">map</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">get_map</span><span class="p">(</span><span class="n">location</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">bc_bbox</span><span class="p">,</span><span class="w"> </span><span class="n">maptype</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"roadmap"</span><span class="p">)</span><span class="w">

</span><span class="n">ggmap</span><span class="p">(</span><span class="n">map</span><span class="p">,</span><span class="w"> </span><span class="n">darken</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="m">0.3</span><span class="p">,</span><span class="w"> </span><span class="s2">"white"</span><span class="p">))</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">geom_point</span><span class="p">(</span><span class="n">aes</span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lon</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">factor</span><span class="p">(</span><span class="n">day</span><span class="p">),</span><span class="w"> </span><span class="n">group</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">factor</span><span class="p">(</span><span class="n">day</span><span class="p">)),</span><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">geodata_2</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w">
  </span><span class="n">geom_path</span><span class="p">(</span><span class="n">aes</span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lon</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">lat</span><span class="p">,</span><span class="w"> </span><span class="n">col</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">factor</span><span class="p">(</span><span class="n">day</span><span class="p">)),</span><span class="w"> </span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">geodata_2</span><span class="p">[</span><span class="n">which</span><span class="p">(</span><span class="n">geodata_2</span><span class="o">$</span><span class="n">day</span><span class="w"> </span><span class="o">%in%</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="s2">"26"</span><span class="p">,</span><span class="w"> </span><span class="s2">"27"</span><span class="p">)),</span><span class="w"> </span><span class="p">])</span><span class="w"> </span><span class="o">+</span><span class="w"> 
  </span><span class="n">theme</span><span class="p">(</span><span class="n">legend.position</span><span class="o">=</span><span class="s2">"none"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">labs</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="s2">"Longitude"</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="o">=</span><span class="s2">"Latitude"</span><span class="p">,</span><span class="w"> </span><span class="n">title</span><span class="o">=</span><span class="s2">"Roadtrip 2016"</span><span class="p">)</span><span class="w">
</span>

Road trip with stops

First, I need to obtain the geocodes from the stops (again via Google Maps API).

<span class="n">chicago</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Chicago"</span><span class="p">,</span><span class="w">
                          </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                          </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                          </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">stjospeh</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"St. Joseph, MI"</span><span class="p">,</span><span class="w">
                          </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                          </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                          </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">annarbor</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Ann Arbor, MI"</span><span class="p">,</span><span class="w">
                           </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                           </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                           </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">detroit</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Detroit, MI"</span><span class="p">,</span><span class="w">
                           </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                           </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                           </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">burlington</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Burlington, ON"</span><span class="p">,</span><span class="w">
                          </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                          </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                          </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">ashtabula</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Ashtabula"</span><span class="p">,</span><span class="w">
                             </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                             </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                             </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">pittsburgh</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Pittsburgh"</span><span class="p">,</span><span class="w">
                            </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                            </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                            </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">marietta</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Marietta, OH"</span><span class="p">,</span><span class="w">
                             </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                             </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                             </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">maysville</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Maysville, KY"</span><span class="p">,</span><span class="w">
                             </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                             </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                             </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">louisville</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Louisville, KY"</span><span class="p">,</span><span class="w">
                             </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                             </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                             </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">paducah</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">google_geocode</span><span class="p">(</span><span class="n">address</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Paducah, KY"</span><span class="p">,</span><span class="w">
                             </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"your_key"</span><span class="p">,</span><span class="w">
                             </span><span class="n">language</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"en"</span><span class="p">,</span><span class="w">
                             </span><span class="n">simplify</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">TRUE</span><span class="p">)</span><span class="w">

</span><span class="n">ann_text</span><span class="w"> </span><span class="o"><-</span><span class="w"> </span><span class="n">data.frame</span><span class="p">(</span><span class="n">x</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">c</span><span class="p">(</span><span class="n">chicago</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">stjospeh</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">annarbor</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">detroit</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">burlington</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">ashtabula</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">pittsburgh</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">marietta</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">maysville</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class="n">lng</span><span class="p">,</span><span class="w">
                             </span><span class="n">louisville</span><span class="o">$</span><span class="n">results</span><span class="o">$</span><span class="n">geometry</span><span class="o">$</span><span class="n">location</span><span class="o">$</span><span class...

To leave a comment for the author, please follow the link and comment on their blog: Shirin's playgRound.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)