2
R의 Google 장소 API에서 레스토랑 정보를 가져 오려고합니다. Google에서 제공하는 20 개의 결과를 성공적으로 얻을 수는 있지만, next_page_token
을 반환하기 때문에 결과가 있음을 알게됩니다. 다른 결과 (논리적 인 것은 내가 찾고있는 위치의 50km 반경 주변에 20 개 이상의 레스토랑이 있음). 그러나 next_page_token
을 사용하면 NULL
을 반환합니다. 다음은 내 코드입니다 :다음 페이지 토큰 R Google Places API
install.packages("googleway")
library(googleway)
key <- 'my key'
df_places <- google_places(search_string = "restaurant",
location = c(-33, 151),
page_token = "next_page_token",
radius = 50000,
key = key)
df_places$results$name
df_places$results$rating
df_places$results$formatted_address
df_places$results$geometry$location
그리고 여기가 next_page_token
없이 반환 것입니다 :
> df_places$results$name
NULL
: 등
[1] "Gennaro's Italian Restaurant"
[2] "Mount Broke Wines & Restaurant"
[3] "Oak Dairy Bar"
[4] "Bimbadgen"
[5] "Subway Restaurant"
[6] "Muse Restaurant"
[7] "Ocean Restaurant"
... 여기
그것이next_page_token
로 반환 것입니다
내가 반복적으로 다시하는 것이 잘못되어 있는지 궁금하다. NULL
?
이것은 완벽하게 작동했습니다! –