The package contains a few examples JSON files corresponding to output from the API.
::ibmsunburst(system.file( ibmsunburst"extdata", "profiles", "en_v2.json", package = "ibmsunburst" ),version = "v2")
::ibmsunburst(system.file( ibmsunburst"extdata", "profiles", "en_v3.json", package = "ibmsunburst" ),version = "v3")
If you use the wrong version argument, then the widget will be blank.
The actual use of the package is to apply it on the output from IBM
Personality Insight API.
accept the data as list, JSON or path to file.
Say you have a text file of someone’s writing, called “sample.txt”. Here’s how you could query the API. There is no R wrapper for it… yet?
= "your-key-not-this" key = "https://gateway.watsonplatform.net/personality-insights/api/v3/profile?version=2017-10-13" url ="your-username-not-this" uname="your-password" pwordlibrary(httr) =POST(url, crauthenticate(uname, pword), content_type("text/plain;charset=utf-8"), accept_json(), body=upload_file("sample.txt") )= content(cr)insightdata
The result is a list, that you can directly pass to
::ibmsunburst(insightdata, ibmsunburstversion = "v3")
Enjoy visualizing IBM Personality Insights!