Reputation: 794
I am testing out RSocrata with some federal data. I followed the github documentation for using API to read datasets. What I don't understand is why read.socrata()
works when I use the url, but not when I use the API endpoint provided with the dataset.
Instead I am getting rbind error saying the number of columns do not match when using the API endpoint key.
> token = "MYTOKEN"
> df.url <- read.socrata("https://data.medicare.gov/Hospital-Compare/Hospital-General-
+ Information/xubh-q36u", app_token = token)
> nrow(df.url)
[1] 4818
>
>
> df.api <- read.socrata("https://data.medicare.gov/resource/rbry-mqwu.json", app_token = token)
Error in rbind(deparse.level, ...) :
numbers of columns of arguments do not match
> nrow(df.api)
Error in nrow(df.api) : object 'df.api' not found
Upvotes: 0
Views: 304
Reputation: 1566
I think your question will be answered in this issue in the RSocrata repo
Upvotes: 1