1

I can not throttle-up my downloads by using the token issued to my app (on data.chicago.com portal, where I had to register)

Error 1:

token <- "___my_app_token__";
fdf <- read.socrata("h___s://data.cityofchicago.org/resource/7edu-s3u7.csv?$where=station_name=\"Foster Weather Station\"", token)

2016-10-06 10:39:53.685 getResponse:

Error in httr GET: 403  h___s://data.cityofchicago.org/resource/7edu-s3u7.csv?%24where=station_name%3D%22Foster%20Weather%20Station%22&app_token=%2524%2524app_token%3D___my_app_token_______

I have NO IDEA where did the first 'token' (2524 2524) come from, do you? Can somebody tell me? Maybe the author of the package is here?

Non-error:

fdf <- read.socrata("h___s://data.cityofchicago.org/resource/7edu-s3u7.csv?$where=station_name=\"Foster Weather Station\"")

WITHOUT A TOKEN (and not throttled-up) works perfectly well!

and this 'open source' h___s://github.com/Chicago/RSocrata/blob/master/R/RSocrata.R doesn't answer the question as well.

Alex Fedotov
  • 497
  • 3
  • 8
  • try to use proper formatting for your question. you can see how other questions and answers are written. Simply click on the 'edit' button and you will see how they are using formatting – mfaani Oct 06 '16 at 16:38

1 Answers1

0

It looks like the syntax you're using to pass your app token is wrong. I'm no R expert, but I found this example in the documentation for the RSocrata library:

df <- read.socrata("http://soda.demo.socrata.com/resource/4334-bgaj.csv", 
                    app_token = "__my_app_token__")

Try passing your app token as a named parameter instead of an indexed parameter, and see if that helps.

chrismetcalf
  • 1,556
  • 1
  • 8
  • 7
  • Nope. The problem is: as soon as I add ANY SoQL parameters to the end point URL the version with the token that had been working perfectly fine - stops working, but the version WITHOUT a token (which is throttled down) - still works fine. – Alex Fedotov Oct 06 '16 at 20:45
  • This applies to both ... app_token = "___") AND to ..., token) versions of passing the string to the function. – Alex Fedotov Oct 06 '16 at 20:49
  • @AlexF. It looks like you've also submitted this question via RSocrata's GitHub Issues forum: https://github.com/Chicago/RSocrata/issues/105 That's the more appropriate place for this bug report, so I'll follow up there. – chrismetcalf Oct 11 '16 at 01:20
  • Thank you. I'll be watching that one. – Alex Fedotov Oct 12 '16 at 18:33