Using R and Odata Package to Download PA Open Data

90 views
Skip to first unread message

Ben C

unread,
Nov 18, 2016, 10:20:55 AM11/18/16
to Open Data Philly
Hi Folks,
I am using R to analyze data on PA Open Data. 
Here is one of the datasets on that site: 


Here's what I've tried:
library(Odata)

I've also tried:
bridges.raw<-retrieveData("https://data.pa.gov/OData.svc/we8x-iva4")

Each command returns the following error:
Error in file(con, "r") : cannot open the connection

Any thoughts on how to proceed? Any successes using R and Odata to tap PA Open Data?

Thanks!
B

Mark Headd

unread,
Nov 18, 2016, 10:34:34 AM11/18/16
to opendat...@googlegroups.com
Hey, Ben - 

You may want to check out this project from the City of Chicago that's specific to using R with data on Socrata portals (like the PA Open Data Portal).


Hope this helps.

--
You received this message because you are subscribed to the Google Groups "Open Data Philly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendataphilly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kelly O'Day

unread,
Dec 9, 2016, 6:41:16 PM12/9/16
to Open Data Philly
Hi Ben

It may be to late, I just saw your question. I also use R, really like RSocrata.

Here's my simple R script to get the list of bridges:

    library(RSocrata)
   # Pa Structurally Deficient  Bridges API Endpoint "https://data.pa.gov/resource/naza-5mua.json"
    ## Here's my RSocrata R query.
     bridge_query <- read.socrata("https://data.pa.gov/resource/naza-5mua.json")
    (nrow(bridge_query))
 
 The query returned 741 bridges.

Kelly O'Day

Ben C

unread,
Jan 2, 2017, 12:08:40 PM1/2/17
to opendat...@googlegroups.com
Kelly,
Thanks much! I shall give it a try!
Are you the Kelly o'Day of @dkod  ?  I'm at @bac3917
Thanks again...
Ben

--
You received this message because you are subscribed to a topic in the Google Groups "Open Data Philly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opendataphilly/HJDAYE3z0sA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opendataphilly+unsubscribe@googlegroups.com.

Kelly O'Day

unread,
Jan 3, 2017, 10:14:54 AM1/3/17
to Open Data Philly
Ben - that's me. We both like GIS and R, a great combo.
To unsubscribe from this group and all its topics, send an email to opendataphill...@googlegroups.com.

Ben C

unread,
Jan 3, 2017, 10:21:45 AM1/3/17
to opendat...@googlegroups.com
Cool....nice to be in touch. Perhaps we can help one another as we work through various analysis/data science hurdles...

I work at a no -profit that does, mainly, education work:

Best,
Ben

To unsubscribe from this group and all its topics, send an email to opendataphilly+unsubscribe@googlegroups.com.

Ben C

unread,
Jan 23, 2017, 1:12:31 PM1/23/17
to Open Data Philly
Mark, 
Thanks very much.  Only now seeing your message....
Best,
Ben


On Friday, November 18, 2016 at 10:34:34 AM UTC-5, Mark Headd wrote:
Hey, Ben - 

You may want to check out this project from the City of Chicago that's specific to using R with data on Socrata portals (like the PA Open Data Portal).


Hope this helps.
On Fri, Nov 18, 2016 at 10:20 AM, Ben C <bac...@gmail.com> wrote:
Hi Folks,
I am using R to analyze data on PA Open Data. 
Here is one of the datasets on that site: 


Here's what I've tried:
library(Odata)

I've also tried:
bridges.raw<-retrieveData("https://data.pa.gov/OData.svc/we8x-iva4")

Each command returns the following error:
Error in file(con, "r") : cannot open the connection

Any thoughts on how to proceed? Any successes using R and Odata to tap PA Open Data?

Thanks!
B

--
You received this message because you are subscribed to the Google Groups "Open Data Philly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendataphill...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages