rtelmore/RDSTK — pull request #3 by petewarden (2013-05-14 02:10:22+00:00)
Title: Added support for new sentiment and geostats APIs

Hi Ryan,
I'm an R newbie, but it's been great to have an R interface to the DSTK, so I tried to add support for a couple of new APIs that will be going live soon. Let me know how it looks, I haven't tried any packaging before in the language!

I've got a temporary server up until I do the main switch, so you should be able to test it like this:
options("RDSTK_api_base"="http://ec2-54-234-201-12.compute-1.amazonaws.com")
> coordinates2statistics(37.769456, -122.429128, 'population_density')
location.latitude location.longitude statistics.population_density.description statistics.population_density.value
1 37.76946 -122.4291 The number of inhabitants per square kilometer around this point. 13543
statistics.population_density.source_name
1 NASA Socioeconomic Data and Applications Center (SEDAC) â\u0080\u0093 Hosted by CIESIN at Columbia University
> text2sentiment("I love this hotel!")
$score
[1] 3

cheers,
Pete