R interface to wolfram alpha [closed]
Asked Answered
B

2

6

The wolfram alpha web interface suffers (like Mr. Wolfram) from massive hubris. There is some very useful data behind that interface; however, and I'd like to access it programmatically. There appears to be a python library to do this. Is anyone aware of an R package for wolfram alpha? How would I go start building it, if it does not exist?

Backbend answered 11/7, 2011 at 18:1 Comment(0)
F
5

In terms of putting together such a package yourself, there are a few pointers that might be helpful:

First is to check out the API for Wolfram Alpha: http://products.wolframalpha.com/api/

There you'll see the various URL calls that one can make and what the return formats would be.

Next, check out some packages that are doing similar things with other APIs. There are some examples at www.omegahat.org (particularly under the "REST-related packages" subsection, but there are others strewn about), as well as multiple packages on CRAN such as package "infochimps" by Drew Conway, RLastFM by Greg Hirson, as well as the "twitteR" and "RStackExchange" packages by me.

Looking at how these packages interact with their respective web APIs should get you started - it's a fairly straightforward process. The basic strategy is to build up the URL you need for a call w/ the parameters that you want and then to use R to send that to the server & retrieve the output (typically either in JSON or XML) and then parse that result back into an R object.

Ferren answered 12/7, 2011 at 14:42 Comment(0)
M
2

Perhaps calling that package from R: http://rpython.r-forge.r-project.org/

Mons answered 11/7, 2011 at 18:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.