jSonarR: jSonar Analytics Platform API for R

Description Details See Also Examples

Description

This package enables users to access MongoDB by running queries and returning their results in R data frames. Usually, data in MongoDB is only available in the form of a JSON document. jSonarR uses data processing and conversion capabilities in the jSonar Analytics Platform and the JSON Studio Gateway (http://www.jsonstudio.com), to convert it to a tabular format which is easy to use with existing R packages.

Details

To use jSonarR, you must have access to a server running JSON Studio. Create a connection using using new.SonarConnection. Now you can run a saved query against a collection in the database using the connection object and sonarAgg or sonarFind.

See Also

MongoDB http://www.mongodb.org

JSON Studio http://www.jsonstudio.com

Examples

1
2
3
4
5
6
7
8
9
connection <- new.SonarConnection('https://example.com', 'localhost', 'test')

ny_by_day <- sonarAgg(connection, 'delays_by_day', 'NYCFlights')
summary(ny_by_day)

tx_to_co <- sonarFind(connection, 'flights_to', 'TXFlights',
  bind=list(state="CO"),
  colClasses=c(DAY_OF_MONTH='factor', DEST_AIRPORT_ID='factor'))
summary(tx_to_co$DEST_AIRPORT_ID)

jSonarR documentation built on May 30, 2017, 8:16 a.m.