A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/jessecambon/tidygeocoder/issues/88 below:

geocode() misaligns results when limit

Since results and addresses are combined with cbind(), limit > 1 can cause addresses to be misaligned to results when using geocode().

In this example, address is from the input dataset whiledisplay_name is from the geocoder results:

library(tidygeocoder)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
tibble(address = c('Tokyo', 'Paris', 'Rome')) %>%
  geocode(address, method = 'osm', limit = 3, full_results = TRUE) %>%
  select(address, display_name)
#>   address                                                        display_name
#> 1   Tokyo                                                        東京都, 日本
#> 2   Paris 東京, 鍛冶橋通り, 丸の内2, 丸の内, 千代田区, 東京都, 100-0005, 日本
#> 3    Rome             東京, 丸の内1, 丸の内, 千代田区, 東京都, 100-0005, 日本
#> 4   Tokyo                 Paris, Île-de-France, France métropolitaine, France
#> 5   Paris                 Paris, Île-de-France, France métropolitaine, France
#> 6    Rome                    Paris, Lamar County, Texas, 75460, United States
#> 7   Tokyo                                  Roma, Roma Capitale, Lazio, Italia
#> 8   Paris   Rome, City of Rome, Oneida County, New York, 13440, United States
#> 9    Rome                          Rome, Floyd County, Georgia, United States

Created on 2021-03-18 by the reprex package (v1.0.0)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4