1
에서 추출합니다. Google지도 API의 주변 검색을 기반으로 은행에서 데이터를 가져옵니다. 어떤 경우에는 하나 이상의 은행을 끌어 당깁니다 (일부 은행은 서로 가깝기 때문에). 각 은행에 대한 자세한 정보를 검색하기 위해 두 번째 api pull (장소 ID 기반)을 수행 할 수 있도록 반환 된 각 개별 JSON 객체를 추출하려면 어떻게해야합니까? 내 코드는 다음과 같습니다.JSON의 Google API 요청 행을 R
require(jsonlite)
require(utils)
plcUrl <- "https://maps.googleapis.com/maps/api/place/nearbysearch/json?"
key <- "myKEY"
location <- paste0("41.0272, -81.51345")
address <- "XXXXXXXXXXXXXXXXX"
type <- "bank"
radius <- "500"
name = "XXXXX"
strurl <- as.character(paste(plcUrl ,
"&location=",location,
"&address=",address,
#"&name=",name,
"&radius=",radius,
"&type=",type,
"&key=",key,
sep=""))
setInternet2(TRUE)
rd <- fromJSON(URLencode(strurl))
rd$results$place_id
아직 개원 시간은 없습니까? 그 사실로 인해 나는 당신의 패키지에서 멀리 떨어져있었습니다. 그것이 내가 원하는 것입니다. 감사! – CooperBuckeye05
@ CooperBuckeye05 - 확실히 내 편집을 참조하십시오 – SymbolixAU
끝내 주셔서 감사합니다. – CooperBuckeye05