0

我正在寻找从开放数据中提取数据。

https://data.cityofnewyork.us/Transportation/For-Hire-Vehicles-FHV-Active-and-Inactive-Vehicles/8wbx-tsch

但我注意到,当我现在有更多数据时,我的代码只生成了 1000 行数据。我哪里错了?

#libraries
library(RJSONIO)

#pull data
a <- fromJSON("https://data.cityofnewyork.us/resource/k5sk-y8y9.json?$query= SELECT Base_number, Base_name, Base_type, Base_Address")

#loop to extract (I'm aware that sapply or 
#lapply may be better functions, how would I approach this issue with those?)
empty_a = NULL
for (i in a) {
  print(i)
  empty_a = rbind(empty_a, i)
}

empty_a = as.data.frame(empty_a)
4

0 回答 0