-
Notifications
You must be signed in to change notification settings - Fork 25
Visualization APIs
The out-of-the-box visualization APIs dispatch to opencpu in order to generate statistical plots using R. When a request is sent to a visualization API, it is proxied by ohmage to opencpu. opencpu then calls back into ohmage and uses survey_response/read to retrieve data to plot.
- Survey Response Count Visualization
- Survey Response Count by Privacy State Visualization
- Survey Response Count by Privacy State Time Series Visualization
- Prompt Distribution Visualization
- Prompt Time Series Visualization
- User Time Series Visualization
- Scatter Plot Visualization
- 2D Density Visualization
- 2D Density Visualization
Returns a PNG image showing the number of survey responses for each survey within a particular campaign.
/viz/survey_response_count/read
TODO
- (r) auth_token = The authentication token for the requester.
- (r) client = A short description of the software client making the request.
- (r) campaign_urn = The URN of the campaign whose aggregated survey response count you desire.
- (r) width = The desired width of the resulting image.
- (r) height = The desired height of the resulting image.
- (o) privacy_state = "shared" to plot only shared responses.
- (o) start_date = A start date for the time range of the request. It must be of the format "yyyy-MM-dd".
- (o) end_date = A end date for the time range of the request. It must be of the format "yyyy-MM-dd".
POST /app/viz/survey_response_count/read HTTP/1.1
Host: dev.ohmage.org
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Content-Length: byte-length-of-content
Content-Type: application/x-www-form-urlencoded
auth_token=b1457284-536d-11e1-a713-c82a142568c4
&client=ohmage=gwt
&campaign_urn=urn:some:campaign
&width=800
&height=600
The requested plot is returned as an PNG image in the HTTP stream.
See the error page for a description of error codes and their associated descriptions.
Returns a PNG image showing the number of survey responses for each survey by privacy state within a particular campaign.
viz/survey_responses_privacy_state/read
TODO
- (r) auth_token = The authentication token for the requester.
- (r) client = A short description of the software client making the request.
- (r) campaign_urn = The URN of the campaign whose aggregated survey response count you desire.
- (r) width = The desired width of the resulting image.
- (r) height = The desired height of the resulting image.
- (o) start_date = A start date for the time range of the request. It must be of the format "yyyy-MM-dd".
- (o) end_date = A end date for the time range of the request. It must be of the format "yyyy-MM-dd".
POST /app/viz/survey_responses_privacy_state/read HTTP/1.1
Host: dev.ohmage.org
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Content-Length: byte-length-of-content
Content-Type: application/x-www-form-urlencoded
auth_token=c74f82f4-536d-11e1-b1a5-c82a142568c4
&client=ohmage=gwt
&campaign_urn=urn:some:campaign
&width=800
&height=600
&start_date=2012-01-01
&end_date=2012-02-01
The requested plot is returned as an PNG image in the HTTP stream.
See the error page for a description of error codes and their associated descriptions.
Returns a PNG image showing the number of survey responses for each survey within a particular campaign as a time series.
viz/survey_responses_privacy_state_time/read
TODO
- (r) auth_token = The authentication token for the requester.
- (r) client = A short description of the software client making the request.
- (r) campaign_urn = The URN of the campaign whose aggregated survey response count you desire.
- (r) width = The desired width of the resulting image.
- (r) height = The desired height of the resulting image.
- (o) start_date = A start date for the time range of the request. It must be of the format "yyyy-MM-dd".
- (o) end_date = A end date for the time range of the request. It must be of the format "yyyy-MM-dd".
POST /app/viz/survey_responses_privacy_state_time/read HTTP/1.1
Host: dev.ohmage.org
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
Content-Length: byte-length-of-content
Content-Type: application/x-www-form-urlencoded
auth_token=23a2fbc4-5370-11e1-baed-c82a142568c4
&client=ohmage=gwt
&campaign_urn=urn:some:campaign
&width=800
&height=600
&start_date=2012-01-01
&end_date=2012-02-01
The requested plot is returned as an PNG image in the HTTP stream.
See the error page for a description of error codes and their associated descriptions.