-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in rbind(deparse. level, ...) #19
Comments
Thank you for the full explanation behind the error. We have provided a patch on this, but is not yet on CRAN. You can download the fix at [https://github.com/Chicago/RSocrata/releases/tag/v1.5.1]. It can be installed with: install.packages("/path/to/RSocrata-1.5.1.tar.gz", repos=NULL, type='source') This issue is related (but explained more clearly) to issue #7 |
Thanks, Tom. I'm actually having the same issue after installing 1.5.1 > install.packages("RSocrata-1.5.1.tar.gz", repos=NULL, type='source')
Installing package into ‘/home/hugh/R/i686-pc-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
Warning in untar2(tarfile, files, list, exdir, restore_times) :
skipping pax global extended headers
* installing *source* package ‘RSocrata’ ...
** R
** preparing package for lazy loading
** help
No man pages found in package ‘RSocrata’
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (RSocrata)
> library(RSocrata)
> social <- read.socrata("https://data.cityofchicago.org/resource/kn9c-c2s2.json")
Error in rbind(deparse.level, ...) :
numbers of columns of arguments do not match
In addition: Warning message:
'guess_media' is deprecated.
Use 'mime::guess_type' instead.
See help("Deprecated") |
I'm seeing this issue in the github version. The problem is that the data from Socrata is missing fields. If you go to https://data.cityofchicago.org/Health-Human-Services/Census-Data-Selected-socioeconomic-indicators-in-C/kn9c-c2s2 and scroll to the bottom, the Community Area Number (a numeric field) contains text, and the HARDSHIP INDEX is blank. In the JSON response these fields are missing which causes the I reported this to Socrata as https://support.socrata.com/hc/requests/7131 |
Yes, it's possible that a dataset may contain incompatible data types. This is being deprecated with the new version of the API, but it will be awhile before that is entirely resolved in existing datasets. I've tested with 1.6.0 build 7 on master branch (82a1375) and it seems to be able to download that dataset. You can use it now and the next version on CRAN will support it (ETA: March) |
I am still seeing this error. I did
The DESCRIPTION of the installed RSocrata says
so I seem to have the correct version... Is there a specific changeset that is supposed to fix this? |
Ah, this error will occur when using the .json format. It turns out the error still exists when using the Will look at this and resolve. I'll remove the duplicate tag and prioritize accordingly. In the meantime, if you run across this error, please use the alternative formulations. Thanks for digging into this. |
Yes, error is in the .json format. I am using the .csv. I hope you can fix the .json as well. |
This has been fixed in the sprint7 branch, and I added an informal test; |
@nicklucius to add a test for downloading uneven columns to support why we need |
I think I know why the tests are not failing when The "missing fields issue" that we see in some rows of JSON files can wreak havoc at two points: POINT 1. When combining 1000 or fewer rows within a single page ( Before #102 was merged, the failure point for all the examples we had was POINT 1. There are no examples I know of that would test POINT 2. If we use So I don't think we can test for this until we come across a dataset with a column of all NAs in the first 1000 rows. @geneorama let me know what you think. |
Here's an example where you can find all NAs in the first 1000, 25000, or 50000 rows: |
Thanks @geneorama! I made a test using that URL, which fails with |
can you please provide us with final steps on how to install the related packages that would allow us to bypass this error |
Hi @Jagoul. We have uploaded the fix to CRAN, so the current version of RSocrata on CRAN should no longer have this bug. Try installing RSocrata again and see if that works. If you are still having an issue, let us know what you're trying to run and we can take a look at it. |
install.packages("/path/to/RSocrata-1.5.1.tar.gz", repos=NULL, type='source') , this is the line of code that i am trying to run. could you please try to solve this error for me , i am trying to download a csv file from a website online and it gives me the following error : installing the package again gave me the following error : |
@Jagoul- RSocrata is now in version 1.7.1, and it looks like you might be running 1.5.1. You can install the new version with |
Hey nicklucius, the package is downloaded now but i still have the following error : Retrieving administrative levels... |
@Jagoul- Could you copy and paste the |
i am not using the library now in my code, but i want to get rid of the error mentioned above so i thought the using of Rscorata would help binding the datasets. sessionInfo() locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
@Jagoul- Unfortunately if you're getting that error and you're not using |
I am getting the same error message when using |
@Momut1 this exact error message is a common error message encountered with If you have a new question, StackOverflow would be a more appropriate venue for getting support / help on that. |
The real problem may the fact you have blank columns that the file still thinks are there. I had 20 data files, mostly with the same column names. Some of them were r-binding and others weren't. The column names that were extra on the end were blank except for the names. I simply highlighted them and pressed backspace, thinking I deleted the columns and thereby making all 20 files the same. However, I kept receiving the same error you all have received. I opened up all of the files, high-lighted all of the rows in excel, and right-clicked and selected delete rows. I shut all of the files and attempted to rbind all twenty and it started working. |
I encountered the following error using
read.socrata
The text was updated successfully, but these errors were encountered: